aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-04-04 10:02:18 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-04-04 10:02:18 -0400
commitab30eadeaaee5ba003feaa5207c77820cc021684 (patch)
treed7e824f30f893a4039c34594a3202a3a2a3ffb55 /src/indicator-sound.c
parent52375af2e5266de12fb9430d41a4941bd937c15b (diff)
parent15c7802a9f753b0d06e7690ae24402644cd12bfe (diff)
downloadayatana-indicator-sound-ab30eadeaaee5ba003feaa5207c77820cc021684.tar.gz
ayatana-indicator-sound-ab30eadeaaee5ba003feaa5207c77820cc021684.tar.bz2
ayatana-indicator-sound-ab30eadeaaee5ba003feaa5207c77820cc021684.zip
Import upstream version 0.6.6.1
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 042bf89..5002463 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));
@@ -452,6 +459,12 @@ new_voip_slider_widget (DbusmenuMenuitem * newitem,
io = g_object_get_data (G_OBJECT (client), "indicator");
IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(INDICATOR_SOUND (io));
+ if (priv->voip_widget != NULL){
+ voip_input_widget_tidy_up (priv->voip_widget);
+ gtk_widget_destroy (priv->voip_widget);
+ priv->voip_widget = NULL;
+ }
+
voip_widget = voip_input_widget_new (newitem);
priv->voip_widget = voip_widget;