[gnome-control-center] Update volume-control applet for GVC API changes.
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Update volume-control applet for GVC API changes.
- Date: Thu, 25 Aug 2011 22:59:33 +0000 (UTC)
commit 1488246ff22ce12a84f945fa43e4f30549d1d7c1
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Aug 18 15:01:01 2011 +0200
Update volume-control applet for GVC API changes.
"ready" and "connecting" signals were replaced by a single
"state-changed".
https://bugzilla.gnome.org/show_bug.cgi?id=645708
panels/sound/gvc-applet.c | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/panels/sound/gvc-applet.c b/panels/sound/gvc-applet.c
index ef94ac5..a73a845 100644
--- a/panels/sound/gvc-applet.c
+++ b/panels/sound/gvc-applet.c
@@ -164,18 +164,16 @@ update_default_sink (GvcApplet *applet)
}
static void
-on_control_ready (GvcMixerControl *control,
- GvcApplet *applet)
+on_control_state_changed (GvcMixerControl *control,
+ GvcMixerControlState new_state,
+ GvcApplet *applet)
{
- update_default_sink (applet);
- update_default_source (applet);
-}
-
-static void
-on_control_connecting (GvcMixerControl *control,
- GvcApplet *applet)
-{
- g_debug ("Connecting..");
+ if (new_state == GVC_STATE_READY) {
+ update_default_sink (applet);
+ update_default_source (applet);
+ } else if (new_state == GVC_STATE_CONNECTING) {
+ g_debug ("Connecting...");
+ }
}
static void
@@ -224,12 +222,8 @@ gvc_applet_constructor (GType type,
self->priv->control = gvc_mixer_control_new ("GNOME Volume Control Applet");
g_signal_connect (self->priv->control,
- "ready",
- G_CALLBACK (on_control_ready),
- self);
- g_signal_connect (self->priv->control,
- "connecting",
- G_CALLBACK (on_control_connecting),
+ "state-changed",
+ G_CALLBACK (on_control_state_changed),
self);
g_signal_connect (self->priv->control,
"default-sink-changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]