summaryrefslogtreecommitdiff
path: root/gst-mixer/src/element.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-08 00:33:57 +0100
committerStefano Karapetsas <[email protected]>2012-11-08 00:33:57 +0100
commit4e46fd01ff3c5d1c9a6400a0533d36d4bc56dfb2 (patch)
treedbcf12ee51edaf93d861a905ea2e81b7a8f88210 /gst-mixer/src/element.c
parente7268ae0d2429f9f8895ac4ff5087cc83f7f00e5 (diff)
downloadmate-media-4e46fd01ff3c5d1c9a6400a0533d36d4bc56dfb2.tar.bz2
mate-media-4e46fd01ff3c5d1c9a6400a0533d36d4bc56dfb2.tar.xz
gst-mixer: allow to hide whitelist elementsmate-media-1.5.0
Diffstat (limited to 'gst-mixer/src/element.c')
-rw-r--r--gst-mixer/src/element.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gst-mixer/src/element.c b/gst-mixer/src/element.c
index 66a007c..aebdcbf 100644
--- a/gst-mixer/src/element.c
+++ b/gst-mixer/src/element.c
@@ -72,6 +72,8 @@ mate_volume_control_element_new ()
g_signal_connect (el->settings, "changed::" MATE_VOLUME_CONTROL_KEY_SHOWN_ELEMENTS,
G_CALLBACK (cb_gsettings), el);
+ g_signal_connect (el->settings, "changed::" MATE_VOLUME_CONTROL_KEY_HIDDEN_ELEMENTS,
+ G_CALLBACK (cb_gsettings), el);
return GTK_WIDGET (el);
}
@@ -190,20 +192,22 @@ mate_volume_control_element_is_to_show (GSettings *settings,
mate_volume_control_element_whitelist (mixer, NULL);
is_whitelist = mate_volume_control_element_whitelist (mixer, track);
+ name = get_gsettings_name (mixer, track);
if (is_whitelist == TRUE)
{
- return TRUE;
+ /* if element is in whitelis, user can set it hidden */
+ if (schemas_is_str_in_strv (settings, MATE_VOLUME_CONTROL_KEY_HIDDEN_ELEMENTS, name) == FALSE)
+ is_to_show = TRUE;
}
else
{
- name = get_gsettings_name (mixer, track);
- /* if element is not in whitelist, user can be set it to show */
+ /* if element is not in whitelist, user can set it to show */
if (schemas_is_str_in_strv (settings, MATE_VOLUME_CONTROL_KEY_SHOWN_ELEMENTS, name))
is_to_show = TRUE;
- g_free (name);
- return is_to_show;
}
+ g_free (name);
+ return is_to_show;
}
/*