[Xfce4-commits] r27095 - in xfce4-mixer/trunk: . panel-plugin

Jannis Pohlmann jannis at xfce.org
Sat Jun 21 02:52:15 CEST 2008


Author: jannis
Date: 2008-06-21 00:52:15 +0000 (Sat, 21 Jun 2008)
New Revision: 27095

Modified:
   xfce4-mixer/trunk/ChangeLog
   xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c
Log:
	* panel-plugin/xfce-volume-button.c: Fix the button press
	  callback: Return TRUE when the middle button was pressed,
	  return FALSE otherwise.


Modified: xfce4-mixer/trunk/ChangeLog
===================================================================
--- xfce4-mixer/trunk/ChangeLog	2008-06-21 00:47:45 UTC (rev 27094)
+++ xfce4-mixer/trunk/ChangeLog	2008-06-21 00:52:15 UTC (rev 27095)
@@ -1,5 +1,11 @@
 2008-06-21	Jannis Pohlmann <jannis at xfce.org>
 
+	* panel-plugin/xfce-volume-button.c: Fix the button press
+	  callback: Return TRUE when the middle button was pressed, 
+	  return FALSE otherwise.
+
+2008-06-21	Jannis Pohlmann <jannis at xfce.org>
+
 	* panel-plugin/xfce-volume-button.c: Add support for toggling
 	  between minimum and last known volume using the middle 
 	  mouse button.

Modified: xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c
===================================================================
--- xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c	2008-06-21 00:47:45 UTC (rev 27094)
+++ xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c	2008-06-21 00:52:15 UTC (rev 27095)
@@ -51,26 +51,26 @@
 
 
 
-static void xfce_volume_button_class_init     (XfceVolumeButtonClass *klass);
-static void xfce_volume_button_init           (XfceVolumeButton      *button);
-static void xfce_volume_button_dispose        (GObject               *object);
-static void xfce_volume_button_finalize       (GObject               *object);
-static void xfce_volume_button_key_pressed    (GtkWidget             *widget,
-                                               GdkEventKey           *event,
-                                               XfceVolumeButton      *button);
-static void xfce_volume_button_button_pressed (GtkWidget             *widget,
-                                               GdkEventButton        *event,
-                                               XfceVolumeButton      *button);
-static void xfce_volume_button_enter          (GtkWidget             *widget,
-                                               GdkEventCrossing      *event);
-static void xfce_volume_button_leave          (GtkWidget             *widget,
-                                               GdkEventCrossing      *event);
-static void xfce_volume_button_update         (XfceVolumeButton      *button);
-static void xfce_volume_button_scrolled       (GtkWidget             *widget,
-                                               GdkEventScroll        *event,
-                                               XfceVolumeButton      *button);
-static void xfce_volume_button_volume_changed (XfceVolumeButton      *button,
-                                               gdouble                volume);
+static void     xfce_volume_button_class_init     (XfceVolumeButtonClass *klass);
+static void     xfce_volume_button_init           (XfceVolumeButton      *button);
+static void     xfce_volume_button_dispose        (GObject               *object);
+static void     xfce_volume_button_finalize       (GObject               *object);
+static void     xfce_volume_button_key_pressed    (GtkWidget             *widget,
+                                                   GdkEventKey           *event,
+                                                   XfceVolumeButton      *button);
+static gboolean xfce_volume_button_button_pressed (GtkWidget             *widget,
+                                                   GdkEventButton        *event,
+                                                   XfceVolumeButton      *button);
+static void     xfce_volume_button_enter          (GtkWidget             *widget,
+                                                   GdkEventCrossing      *event);
+static void     xfce_volume_button_leave          (GtkWidget             *widget,
+                                                   GdkEventCrossing      *event);
+static void     xfce_volume_button_update         (XfceVolumeButton      *button);
+static void     xfce_volume_button_scrolled       (GtkWidget             *widget,
+                                                   GdkEventScroll        *event,
+                                                   XfceVolumeButton      *button);
+static void     xfce_volume_button_volume_changed (XfceVolumeButton      *button,
+                                                   gdouble                volume);
 
 
 
@@ -260,11 +260,12 @@
 
 
 
-static void 
+static gboolean 
 xfce_volume_button_button_pressed (GtkWidget        *widget,
                                    GdkEventButton   *event,
                                    XfceVolumeButton *button)
 {
+  gboolean handled = FALSE;
   gdouble value;
   gdouble min_value;
 
@@ -284,11 +285,15 @@
           gtk_adjustment_set_value (GTK_ADJUSTMENT (button->adjustment), min_value);
           button->previous_value = value;
         }
+
+      handled = TRUE;
     }
 
   xfce_volume_button_update (button);
 
   g_signal_emit_by_name (button, "volume-changed", gtk_adjustment_get_value (GTK_ADJUSTMENT (button->adjustment)));
+
+  return handled;
 }
 
 



More information about the Xfce4-commits mailing list