From 6856359f7cb8544bd51a141fea9eeab28e6d1b25 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 24 Mar 2011 13:09:54 +0000 Subject: the beginnings of general source monitoring --- src/pulseaudio-mgr.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c index 95f4c06..2ead17c 100644 --- a/src/pulseaudio-mgr.c +++ b/src/pulseaudio-mgr.c @@ -76,7 +76,10 @@ static void pm_toggle_mute_for_every_sink_callback (pa_context *c, const pa_sink_info *sink, int eol, void* userdata); - +static void pm_source_output_info_callback (pa_context *c, + const pa_source_output_info *info, + int eol, + void *userdata); static gboolean reconnect_to_pulse (gpointer user_data); @@ -257,7 +260,6 @@ pm_subscribed_events_callback (pa_context *c, } break; case PA_SUBSCRIPTION_EVENT_SINK_INPUT: - // We don't care about sink input removals. g_debug ("sink input event"); if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { gint cached_index = device_get_current_sink_input_index (sink); @@ -270,12 +272,26 @@ pm_subscribed_events_callback (pa_context *c, } else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { g_debug ("some new sink input event ? - index = %i", index); - // Determine if its a VOIP app or a maybe blocking state. + // Maybe blocking state ?. pa_operation_unref (pa_context_get_sink_input_info (c, index, pm_sink_input_info_callback, userdata)); } break; + case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT: + g_debug ("source output event"); + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { + //gint cached_index = device_get_current_sink_input_index (sink); + //g_debug ("Just saw a sink input removal event - index = %i and cached index = %i", index, cached_index); + } + else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { + g_debug ("some new source output event ? - index = %i", index); + // Determine if its a VOIP app. + pa_operation_unref (pa_context_get_source_output_info (c, + index, + pm_source_output_info_callback, userdata)); + } + break; case PA_SUBSCRIPTION_EVENT_SERVER: g_debug("PA_SUBSCRIPTION_EVENT_SERVER event triggered."); pa_operation *o; @@ -333,6 +349,7 @@ pm_context_state_callback (pa_context *c, void *userdata) (PA_SUBSCRIPTION_MASK_SINK| PA_SUBSCRIPTION_MASK_SOURCE| PA_SUBSCRIPTION_MASK_SINK_INPUT| + PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT| PA_SUBSCRIPTION_MASK_SERVER), NULL, NULL))) { g_warning("pa_context_subscribe() failed"); @@ -500,6 +517,15 @@ pm_sink_input_info_callback (pa_context *c, } } +static void +pm_source_output_info_callback (pa_context *c, + const pa_source_output_info *info, + int eol, + void *userdata) +{ + +} + static void pm_update_device (pa_context *c, const pa_sink_info *info, -- cgit v1.2.3 From b4dc15ac004d49a46cba1b88c1c5cdf8c12755ba Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 24 Mar 2011 15:22:30 +0000 Subject: now using the source output --- src/device.c | 8 +++--- src/device.h | 4 +-- src/pulseaudio-mgr.c | 61 ++++++++++++++++++++++------------------------ src/voip-input-menu-item.c | 18 +++++++------- src/voip-input-menu-item.h | 4 +-- 5 files changed, 46 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/device.c b/src/device.c index 79b7b50..bf4a543 100644 --- a/src/device.c +++ b/src/device.c @@ -123,10 +123,10 @@ device_sink_update (Device* self, } gint -device_get_current_sink_input_index (Device* self) +device_get_voip_source_output_index (Device* self) { DevicePrivate* priv = DEVICE_GET_PRIVATE (self); - return voip_input_menu_item_get_sink_input_index (priv->voip_input_menu_item); + return voip_input_menu_item_get_source_output_index (priv->voip_input_menu_item); } static void @@ -211,11 +211,11 @@ device_is_sink_populated (Device* self) } void -device_activate_voip_item (Device* self, gint sink_input_index, gint client_index) +device_activate_voip_item (Device* self, gint source_output_index, gint client_index) { DevicePrivate* priv = DEVICE_GET_PRIVATE (self); if (voip_input_menu_item_is_interested (priv->voip_input_menu_item, - sink_input_index, + source_output_index, client_index)){ voip_input_menu_item_enable (priv->voip_input_menu_item, TRUE); } diff --git a/src/device.h b/src/device.h index 9c74344..ccaf4ea 100644 --- a/src/device.h +++ b/src/device.h @@ -68,8 +68,8 @@ void device_ensure_sink_is_unmuted (Device* self); // source and sinkinput/client related for VOIP functionality void device_update_voip_input_source (Device* sink, const pa_source_info* update); -void device_activate_voip_item (Device* sink, gint sink_input_index, gint client_index); -gint device_get_current_sink_input_index (Device* sink); +void device_activate_voip_item (Device* sink, gint source_output_index, gint client_index); +gint device_get_voip_source_output_index (Device* sink); gboolean device_is_voip_source_populated (Device* sink); gint device_get_source_index (Device* self); void device_determine_blocking_state (Device* self); diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c index 2ead17c..a31084a 100644 --- a/src/pulseaudio-mgr.c +++ b/src/pulseaudio-mgr.c @@ -260,17 +260,7 @@ pm_subscribed_events_callback (pa_context *c, } break; case PA_SUBSCRIPTION_EVENT_SINK_INPUT: - g_debug ("sink input event"); - if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { - gint cached_index = device_get_current_sink_input_index (sink); - - g_debug ("Just saw a sink input removal event - index = %i and cached index = %i", index, cached_index); - - if (index == cached_index){ - device_deactivate_voip_client (sink); - } - } - else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { g_debug ("some new sink input event ? - index = %i", index); // Maybe blocking state ?. pa_operation_unref (pa_context_get_sink_input_info (c, @@ -281,8 +271,11 @@ pm_subscribed_events_callback (pa_context *c, case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT: g_debug ("source output event"); if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { - //gint cached_index = device_get_current_sink_input_index (sink); - //g_debug ("Just saw a sink input removal event - index = %i and cached index = %i", index, cached_index); + gint cached_source_output_index = device_get_voip_source_output_index (sink); + if (index == cached_source_output_index){ + g_debug ("Just saw a source output removal event - index = %i and cached index = %i", index, cached_source_output_index); + device_deactivate_voip_client (sink); + } } else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { g_debug ("some new source output event ? - index = %i", index); @@ -487,21 +480,39 @@ pm_sink_input_info_callback (pa_context *c, g_warning("Sink input info callback : SINK INPUT INFO IS NULL or our user_data is not what we think it should be"); return; } + Device* a_sink = DEVICE (userdata); + // And finally check for the mute blocking state + if (device_get_sink_index (a_sink) == info->sink){ + device_determine_blocking_state (a_sink); + } + } +} - if (IS_DEVICE (userdata) == FALSE){ - g_warning ("sink input info callback - our user data is not what we think it should be"); +static void +pm_source_output_info_callback (pa_context *c, + const pa_source_output_info *info, + int eol, + void *userdata) +{ + if (eol > 0) { + return; + } + else { + if (info == NULL || IS_DEVICE (userdata) == FALSE) { + g_warning("Source output callback: SOURCE OUTPUT INFO IS NULL or our user_data is not what we think it should be"); return; } + // Check if this is Voip sink input gint result = pa_proplist_contains (info->proplist, PA_PROP_MEDIA_ROLE); Device* a_sink = DEVICE (userdata); if (result == 1){ - g_debug ("Sink input info has media role property"); + //g_debug ("Source output info has media role property"); const char* value = pa_proplist_gets (info->proplist, PA_PROP_MEDIA_ROLE); - g_debug ("prop role = %s", value); + //g_debug ("prop role = %s", value); if (g_strcmp0 (value, "phone") == 0 || g_strcmp0 (value, "production") == 0) { - g_debug ("And yes its a VOIP app ... sink input index = %i", info->index); + g_debug ("We have a VOIP/PRODUCTION ! - index = %i", info->index); device_activate_voip_item (a_sink, (gint)info->index, (gint)info->client); // TODO to start with we will assume our source is the same as what this 'client' // is pointing at. This should probably be more intelligent : @@ -509,23 +520,9 @@ pm_sink_input_info_callback (pa_context *c, // from the sink input ensure our voip item is using the right source. } } - - // And finally check for the mute blocking state - if (device_get_sink_index (a_sink) == info->sink){ - device_determine_blocking_state (a_sink); - } } } -static void -pm_source_output_info_callback (pa_context *c, - const pa_source_output_info *info, - int eol, - void *userdata) -{ - -} - static void pm_update_device (pa_context *c, const pa_sink_info *info, diff --git a/src/voip-input-menu-item.c b/src/voip-input-menu-item.c index e645e69..7cbdd45 100644 --- a/src/voip-input-menu-item.c +++ b/src/voip-input-menu-item.c @@ -35,7 +35,7 @@ struct _VoipInputMenuItemPrivate { pa_channel_map channel_map; pa_volume_t base_volume; gint source_index; - gint sink_input_index; + gint source_output_index; gint client_index; }; @@ -82,7 +82,7 @@ voip_input_menu_item_init (VoipInputMenuItem *self) FALSE ); priv->source_index = NOT_ACTIVE; - priv->sink_input_index = NOT_ACTIVE; + priv->source_output_index = NOT_ACTIVE; priv->client_index = NOT_ACTIVE; priv->mute = NOT_ACTIVE; } @@ -183,18 +183,18 @@ voip_input_menu_item_update (VoipInputMenuItem* item, gboolean voip_input_menu_item_is_interested (VoipInputMenuItem* item, - gint sink_input_index, + gint source_output_index, gint client_index) { VoipInputMenuItemPrivate* priv = VOIP_INPUT_MENU_ITEM_GET_PRIVATE (item); // Check to make sure we are not handling another voip beforehand and that we // have an active sink (might need to match up at start up) - if (priv->sink_input_index != NOT_ACTIVE && + if (priv->source_output_index != NOT_ACTIVE && priv->source_index != NOT_ACTIVE){ return FALSE; } - priv->sink_input_index = sink_input_index; + priv->source_output_index = source_output_index; priv->client_index = client_index; return TRUE; @@ -204,7 +204,7 @@ gboolean voip_input_menu_item_is_active (VoipInputMenuItem* item) { VoipInputMenuItemPrivate* priv = VOIP_INPUT_MENU_ITEM_GET_PRIVATE (item); - return (priv->sink_input_index != NOT_ACTIVE && priv->client_index != NOT_ACTIVE); + return (priv->source_output_index != NOT_ACTIVE && priv->client_index != NOT_ACTIVE); } @@ -223,11 +223,11 @@ voip_input_menu_item_get_index (VoipInputMenuItem* item) } gint -voip_input_menu_item_get_sink_input_index (VoipInputMenuItem* item) +voip_input_menu_item_get_source_output_index (VoipInputMenuItem* item) { VoipInputMenuItemPrivate* priv = VOIP_INPUT_MENU_ITEM_GET_PRIVATE (item); - return priv->sink_input_index; + return priv->source_output_index; } /** @@ -250,7 +250,7 @@ voip_input_menu_item_deactivate_voip_client (VoipInputMenuItem* item) { VoipInputMenuItemPrivate* priv = VOIP_INPUT_MENU_ITEM_GET_PRIVATE (item); priv->client_index = NOT_ACTIVE; - priv->sink_input_index = NOT_ACTIVE; + priv->source_output_index = NOT_ACTIVE; voip_input_menu_item_enable (item, FALSE); } diff --git a/src/voip-input-menu-item.h b/src/voip-input-menu-item.h index 30ada5a..1446e03 100644 --- a/src/voip-input-menu-item.h +++ b/src/voip-input-menu-item.h @@ -50,14 +50,14 @@ void voip_input_menu_item_update (VoipInputMenuItem* item, const pa_source_info* source); void voip_input_menu_item_enable (VoipInputMenuItem* item, gboolean active); gboolean voip_input_menu_item_is_interested (VoipInputMenuItem* item, - gint sink_input_index, + gint source_output_index, gint client_index); gboolean voip_input_menu_item_is_active (VoipInputMenuItem* item); gboolean voip_input_menu_item_is_populated (VoipInputMenuItem* item); // TODO rename get source index gint voip_input_menu_item_get_index (VoipInputMenuItem* item); -gint voip_input_menu_item_get_sink_input_index (VoipInputMenuItem* item); +gint voip_input_menu_item_get_source_output_index (VoipInputMenuItem* item); void voip_input_menu_item_deactivate_source (VoipInputMenuItem* item, gboolean visible); void voip_input_menu_item_deactivate_voip_client (VoipInputMenuItem* item); -- cgit v1.2.3 From 1c1adfebc0a8c9fc1a64f89fa879823ff316ecec Mon Sep 17 00:00:00 2001 From: Dylan McCall Date: Mon, 4 Apr 2011 20:14:19 -0700 Subject: Sound state manager volume notification is based on new volume instead of current (old) volume. Notifications use notification variants of audio-volume-* icons. --- src/Makefile.am | 4 ++++ src/device.c | 17 ++--------------- src/sound-state-manager.c | 14 ++++++++------ src/sound-state.c | 43 +++++++++++++++++++++++++++++++++++++++++++ src/sound-state.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 21 deletions(-) create mode 100644 src/sound-state.c create mode 100644 src/sound-state.h (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index ae0d55a..bafd6be 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,6 +10,8 @@ libsoundmenu_la_SOURCES = \ common-defs.h \ indicator-sound.h \ indicator-sound.c \ + sound-state.c \ + sound-state.h \ sound-state-manager.c \ sound-state-manager.h \ transport-widget.c \ @@ -90,6 +92,8 @@ indicator_sound_service_SOURCES = \ common-defs.h \ sound-service.h \ sound-service.c \ + sound-state.c \ + sound-state.h \ pulseaudio-mgr.h \ pulseaudio-mgr.c \ device.c \ diff --git a/src/device.c b/src/device.c index 79b7b50..a3e8019 100644 --- a/src/device.c +++ b/src/device.c @@ -23,6 +23,7 @@ with this program. If not, see . #include "mute-menu-item.h" #include "voip-input-menu-item.h" #include "pulseaudio-mgr.h" +#include "sound-state.h" typedef struct _DevicePrivate DevicePrivate; @@ -164,21 +165,7 @@ device_get_state_from_volume (Device* self) DBUSMENU_VOLUME_MENUITEM_LEVEL); gdouble volume_percent = g_variant_get_double (v); - SoundState state = LOW_LEVEL; - - if (volume_percent < 30.0 && volume_percent > 0) { - state = LOW_LEVEL; - } - else if (volume_percent < 70.0 && volume_percent >= 30.0) { - state = MEDIUM_LEVEL; - } - else if (volume_percent >= 70.0) { - state = HIGH_LEVEL; - } - else if (volume_percent == 0.0) { - state = ZERO_LEVEL; - } - return state; + return sound_state_get_from_volume ((int)volume_percent); } void diff --git a/src/sound-state-manager.c b/src/sound-state-manager.c index 7095a39..c851407 100644 --- a/src/sound-state-manager.c +++ b/src/sound-state-manager.c @@ -24,6 +24,7 @@ with this program. If not, see . #include "sound-state-manager.h" #include "dbus-shared-names.h" +#include "sound-state.h" typedef struct _SoundStateManagerPrivate SoundStateManagerPrivate; @@ -170,19 +171,20 @@ sound_state_manager_show_notification (SoundStateManager *self, char *icon; const int notify_value = CLAMP((int)value, -1, 101); - SoundState state = sound_state_manager_get_current_state (self); + + SoundState state = sound_state_get_from_volume ((int)value); if (state == ZERO_LEVEL) { // Not available for all the themes - icon = "audio-volume-off"; + icon = "notification-audio-volume-off"; } else if (state == LOW_LEVEL) { - icon = "audio-volume-low"; + icon = "notification-audio-volume-low"; } else if (state == MEDIUM_LEVEL) { - icon = "audio-volume-medium"; + icon = "notification-audio-volume-medium"; } else if (state == HIGH_LEVEL) { - icon = "audio-volume-high"; + icon = "notification-audio-volume-high"; } else { - icon = "audio-volume-muted"; + icon = "notification-audio-volume-muted"; } notify_notification_update(priv->notification, PACKAGE_NAME, NULL, icon); diff --git a/src/sound-state.c b/src/sound-state.c new file mode 100644 index 0000000..72e411a --- /dev/null +++ b/src/sound-state.c @@ -0,0 +1,43 @@ +/* +Copyright 2010 Canonical Ltd. + +Authors: + Conor Curran + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#include "config.h" + +#include "sound-state.h" + +SoundState +sound_state_get_from_volume (int volume_percent) +{ + SoundState state = LOW_LEVEL; + + if (volume_percent < 30 && volume_percent > 0) { + state = LOW_LEVEL; + } + else if (volume_percent < 70 && volume_percent >= 30) { + state = MEDIUM_LEVEL; + } + else if (volume_percent >= 70) { + state = HIGH_LEVEL; + } + else if (volume_percent <= 0) { + state = ZERO_LEVEL; + } + return state; +} + diff --git a/src/sound-state.h b/src/sound-state.h new file mode 100644 index 0000000..9527c8e --- /dev/null +++ b/src/sound-state.h @@ -0,0 +1,31 @@ +/* +Copyright 2011 Canonical Ltd. + +Authors: + Conor Curran + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#ifndef _SOUND_STATE_H_ +#define _SOUND_STATE_H_ + +#include +#include "common-defs.h" + +/* Helper functions for determining SOUNDSTATE */ + +SoundState sound_state_get_from_volume (int volume_percent); + +#endif /* _SOUND_STATE_H_ */ + -- cgit v1.2.3 From 3670698e2e0978adc1853507358864a98e1e92a3 Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Wed, 13 Apr 2011 01:10:51 -0400 Subject: Enabled "Sound Preferences" support for gnome-control-center 3 --- src/sound-service-dbus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index a22e648..d0fd765 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -200,7 +200,8 @@ show_sound_settings_dialog (DbusmenuMenuitem *mi, { GError * error = NULL; if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) && - !g_spawn_command_line_async("xfce4-mixer", &error)) + !g_spawn_command_line_async("gnome-control-center sound", &error) && + !g_spawn_command_line_async("xfce4-mixer", &error)) { g_warning("Unable to show dialog: %s", error->message); g_error_free(error); -- cgit v1.2.3 From 27708ccbbfa599955effc46d5ea155a08caf7d59 Mon Sep 17 00:00:00 2001 From: Nicolas Delvaux Date: Sat, 16 Apr 2011 19:30:36 +0200 Subject: Fix bug 654196 --- src/metadata-widget.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/metadata-widget.c b/src/metadata-widget.c index a37053b..a61e94e 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -106,8 +106,7 @@ metadata_widget_init (MetadataWidget *self) g_signal_connect(priv->album_art, "expose-event", G_CALLBACK(metadata_image_expose), - GTK_WIDGET(self)); - gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60); + GTK_WIDGET(self)); gtk_box_pack_start (GTK_BOX (priv->hbox), priv->album_art, @@ -190,23 +189,24 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user if(g_string_equal(priv->image_path, priv->old_image_path) == FALSE || priv->theme_change_occured == TRUE){ priv->theme_change_occured = FALSE; - GdkPixbuf* orig_pixbuf; - orig_pixbuf = gdk_pixbuf_new_from_file(priv->image_path->str, NULL); + GdkPixbuf* pixbuf; + pixbuf = gdk_pixbuf_new_from_file_at_size(priv->image_path->str, 60, 60, NULL); //g_debug("metadata_load_new_image -> pixbuf from %s", // priv->image_path->str); - if(GDK_IS_PIXBUF(orig_pixbuf) == FALSE){ + if(GDK_IS_PIXBUF(pixbuf) == FALSE){ //g_debug("problem loading the downloaded image just use the placeholder instead"); draw_album_art_placeholder(metadata); return TRUE; } - GdkPixbuf* pixbuf; - pixbuf = gdk_pixbuf_scale_simple(orig_pixbuf,60, 60, GDK_INTERP_BILINEAR); gtk_image_set_from_pixbuf(GTK_IMAGE(priv->album_art), pixbuf); + gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), + gdk_pixbuf_get_width(pixbuf), + gdk_pixbuf_get_height(pixbuf)); + g_string_erase(priv->old_image_path, 0, -1); g_string_overwrite(priv->old_image_path, 0, priv->image_path->str); - g_object_unref(pixbuf); - g_object_unref(orig_pixbuf); + g_object_unref(pixbuf); } return FALSE; } -- cgit v1.2.3 From 19f28a5707785dbb609a0b2185053b54a6369dfa Mon Sep 17 00:00:00 2001 From: Nicolas Delvaux Date: Sat, 16 Apr 2011 20:14:07 +0200 Subject: Fix a regression when calling "draw_album_art_placeholder" after diplaying one of those famous non-square cover. --- src/metadata-widget.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/metadata-widget.c b/src/metadata-widget.c index a61e94e..38ed529 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -195,6 +195,7 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user // priv->image_path->str); if(GDK_IS_PIXBUF(pixbuf) == FALSE){ //g_debug("problem loading the downloaded image just use the placeholder instead"); + gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60); draw_album_art_placeholder(metadata); return TRUE; } @@ -210,6 +211,7 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user } return FALSE; } + gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60); draw_album_art_placeholder(metadata); return TRUE; } -- cgit v1.2.3