summaryrefslogtreecommitdiff
path: root/mate-volume-control/gvc-stream-status-icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-volume-control/gvc-stream-status-icon.c')
-rw-r--r--mate-volume-control/gvc-stream-status-icon.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c
index 8ca2849..ef1124a 100644
--- a/mate-volume-control/gvc-stream-status-icon.c
+++ b/mate-volume-control/gvc-stream-status-icon.c
@@ -35,6 +35,7 @@
struct _GvcStreamStatusIconPrivate
{
+ GSettings *sound_settings;
gchar **icon_names;
GtkWidget *dock;
GtkWidget *bar;
@@ -689,6 +690,8 @@ gvc_stream_status_icon_init (GvcStreamStatusIcon *icon)
icon->priv = gvc_stream_status_icon_get_instance_private (icon);
+ icon->priv->sound_settings = g_settings_new ("org.mate.sound");
+
g_signal_connect (G_OBJECT (icon),
"activate",
G_CALLBACK (on_status_icon_activate),
@@ -745,6 +748,17 @@ gvc_stream_status_icon_init (GvcStreamStatusIcon *icon)
gvc_channel_bar_set_orientation (GVC_CHANNEL_BAR (icon->priv->bar),
GTK_ORIENTATION_VERTICAL);
+ gvc_channel_bar_set_show_mark_text (GVC_CHANNEL_BAR (icon->priv->bar),
+ FALSE);
+
+ g_settings_bind (icon->priv->sound_settings, "volume-overamplifiable",
+ icon->priv->bar, "show-marks",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (icon->priv->sound_settings, "volume-overamplifiable",
+ icon->priv->bar, "extended",
+ G_SETTINGS_BIND_GET);
+
/* Set volume control frame, slider and toplevel window to follow panel theme */
GtkWidget *toplevel = gtk_widget_get_toplevel (icon->priv->dock);
GtkStyleContext *context;
@@ -781,6 +795,8 @@ gvc_stream_status_icon_finalize (GObject *object)
on_icon_theme_change,
icon);
+ g_clear_object (&icon->priv->sound_settings);
+
G_OBJECT_CLASS (gvc_stream_status_icon_parent_class)->finalize (object);
}