gnome-media r4280 - in trunk/gnome-volume-control: . src



Author: hadess
Date: Thu Mar 12 21:48:35 2009
New Revision: 4280
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4280&view=rev

Log:
2009-03-12  Bastien Nocera  <hadess hadess net>

	* src/gvc-stream-status-icon.c (on_stream_decibel_notify),
	(gvc_stream_status_icon_set_mixer_stream): Also update the
	tooltip when decibels change, fixes the dB value pretty much
	always being wrong (the code notifies of the changed dB after the
	changed volume) (Closes: #575093)



Modified:
   trunk/gnome-volume-control/ChangeLog
   trunk/gnome-volume-control/src/gvc-stream-status-icon.c

Modified: trunk/gnome-volume-control/src/gvc-stream-status-icon.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-stream-status-icon.c	(original)
+++ trunk/gnome-volume-control/src/gvc-stream-status-icon.c	Thu Mar 12 21:48:35 2009
@@ -472,6 +472,15 @@
         /* FIXME: update dock too */
 }
 
+static void
+on_stream_decibel_notify (GObject             *object,
+                          GParamSpec          *pspec,
+                          GvcStreamStatusIcon *icon)
+{
+        update_icon (icon);
+        /* FIXME: update dock too */
+}
+
 void
 gvc_stream_status_icon_set_display_name (GvcStreamStatusIcon *icon,
                                          const char          *name)
@@ -501,6 +510,9 @@
                 g_signal_handlers_disconnect_by_func (icon->priv->mixer_stream,
                                                       G_CALLBACK (on_stream_is_muted_notify),
                                                       icon);
+                g_signal_handlers_disconnect_by_func (icon->priv->mixer_stream,
+                                                      G_CALLBACK (on_stream_decibel_notify),
+                                                      icon);
                 g_object_unref (icon->priv->mixer_stream);
                 icon->priv->mixer_stream = NULL;
         }
@@ -524,6 +536,10 @@
                                   "notify::is-muted",
                                   G_CALLBACK (on_stream_is_muted_notify),
                                   icon);
+                g_signal_connect (icon->priv->mixer_stream,
+                                  "notify::decibel",
+                                  G_CALLBACK (on_stream_decibel_notify),
+                                  icon);
         }
 
         update_icon (icon);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]