aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-02-08 14:42:30 +0000
committerConor Curran <conor.curran@canonical.com>2010-02-08 14:42:30 +0000
commitf9ef87f71c488f6791e32b1cf7205fb65db81ce8 (patch)
treea3891347530ef81463595a2332ede9fc5161c1b0 /src/indicator-sound.c
parent470e751be8af2da3bbc69a1115d2ce19590cac5a (diff)
downloadayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.tar.gz
ayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.tar.bz2
ayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.zip
automatic volume updates in progress
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 2b20c48..9ceebd1 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -90,6 +90,7 @@ static gboolean slider_value_changed_event_cb(GtkRange *range, gpointer user_da
static DBusGProxy *sound_dbus_proxy = NULL;
static void connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer userdata);
static void catch_signal_sink_input_while_muted(DBusGProxy * proxy, gint sink_index, gboolean value, gpointer userdata);
+void catch_signal_sink_volume_update(DBusGProxy * proxy, gint sink_volume, gpointer userdata);
/****Volume States 'members' ***/
static const gint STATE_MUTED = 0;
@@ -192,6 +193,9 @@ connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer u
g_debug("about to connect to the signals");
dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_INVALID);
dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_CALLBACK(catch_signal_sink_input_while_muted), NULL, NULL);
+ dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_UPDATE_SINK_VOLUME, G_TYPE_INT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_UPDATE_SINK_VOLUME, G_CALLBACK(catch_signal_sink_volume_update), NULL, NULL);
+
}
} else {
@@ -207,6 +211,11 @@ static void catch_signal_sink_input_while_muted(DBusGProxy * proxy, gint sink_in
g_debug("signal caught - I don't believe it ! with index %i and value %i", sink_index, value);
}
+void catch_signal_sink_volume_update(DBusGProxy * proxy, gint sink_volume, gpointer userdata)
+{
+ g_debug("signal caught - update sink volume with value : %i", sink_volume);
+}
+
static void
indicator_sound_dispose (GObject *object)
{