summaryrefslogtreecommitdiff
path: root/mixer/applet.c
diff options
context:
space:
mode:
authorCallum McKenzie <callum@src.gnome.org>2009-02-17 02:50:31 +0000
committerCallum McKenzie <callum@src.gnome.org>2009-02-17 02:50:31 +0000
commit95dd582164897a1366f07d3c4fce8c6bad262845 (patch)
tree96eab1ae925f881a8f95b75692bc53bebf2c21dd /mixer/applet.c
parentd1f5d2d9d711e625e6ef3e50fa44ca48d2fb3003 (diff)
Reload the mixer's channel list to detect device changes.
svn path=/trunk/; revision=11292
Diffstat (limited to 'mixer/applet.c')
-rw-r--r--mixer/applet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mixer/applet.c b/mixer/applet.c
index e75de9b1d..11f3a67eb 100644
--- a/mixer/applet.c
+++ b/mixer/applet.c
@@ -43,6 +43,10 @@
#define IS_PANEL_HORIZONTAL(o) \
(o == PANEL_APPLET_ORIENT_UP || o == PANEL_APPLET_ORIENT_DOWN)
+/* This is defined is load.c, we're doing this instead of creating a load.h file
+ * because nothing else is exported. */
+GList * gnome_volume_applet_create_mixer_collection (void);
+
static void gnome_volume_applet_class_init (GnomeVolumeAppletClass *klass);
static void gnome_volume_applet_init (GnomeVolumeApplet *applet);
static void gnome_volume_applet_dispose (GObject *object);
@@ -1292,6 +1296,9 @@ cb_gconf (GConfClient *client,
}
key += strlen (keyroot);
g_free (keyroot);
+
+ g_list_free(applet->elements);
+ applet->elements = gnome_volume_applet_create_mixer_collection ();
if ((value = gconf_entry_get_value (entry)) != NULL &&
(value->type == GCONF_VALUE_STRING) &&
@@ -1421,6 +1428,9 @@ cb_verb (BonoboUIComponent *uic,
} else {
if (applet->prefs)
return;
+
+ g_list_free(applet->elements);
+ applet->elements = gnome_volume_applet_create_mixer_collection ();
applet->prefs = gnome_volume_applet_preferences_new (PANEL_APPLET (applet),
applet->elements,