aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-04-01 13:59:32 +0100
committerConor Curran <conor.curran@canonical.com>2011-04-01 13:59:32 +0100
commit0a3977efd6bec63c3223d6d4973945caf7588031 (patch)
tree39d88fd5f8d4ff6516690e4788f8cfe4411ea98e /src/indicator-sound.c
parent73827ae57eb2027121e71a85af1858cc59fd5943 (diff)
downloadayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.tar.gz
ayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.tar.bz2
ayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.zip
make sure that even if the service crashes there are no visual indications on the indicator (i.e. no two slider scenario
)
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 042bf89..626f3b8 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -137,6 +137,7 @@ indicator_sound_init (IndicatorSound *self)
IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(self);
priv->volume_widget = NULL;
+ priv->voip_widget = NULL;
priv->dbus_proxy = NULL;
GList* t_list = NULL;
priv->transport_widgets_list = t_list;
@@ -407,8 +408,14 @@ new_volume_slider_widget(DbusmenuMenuitem * newitem,
g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
io = g_object_get_data (G_OBJECT (client), "indicator");
- volume_widget = volume_widget_new (newitem, io);
IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(INDICATOR_SOUND (io));
+
+ if (priv->volume_widget != NULL){
+ volume_widget_tidy_up (priv->volume_widget);
+ gtk_widget_destroy (priv->volume_widget);
+ priv->volume_widget = NULL;
+ }
+ volume_widget = volume_widget_new (newitem, io);
priv->volume_widget = volume_widget;
GtkWidget* ido_slider_widget = volume_widget_get_ido_slider(VOLUME_WIDGET(priv->volume_widget));