[PATCH]: gnome-applet mixer: popup mixer with wheel



	Hi, here a little guadec hacking now resending to mailling list.


	The patch allow bring up the volume popup when scrolling with the wheel when the mouse is over the apple (without clicking first). I think this behaviour is better, and more aproximated to old applt (i.e: raise the volume only with the wheel.

Salu2


--- mixer.c.orig	Thu Apr  4 13:04:38 2002
+++ mixer.c	Thu Apr  4 15:00:56 2002
@@ -466,6 +466,18 @@
 	return FALSE;
 }
 
+
+static gboolean
+applet_scroll_event_cb (GtkWidget *widget, GdkEventKey *event, MixerData *data)
+{
+	if (event->type = GDK_SCROLL) {
+		if (data->popup == NULL)
+			mixer_popup_show (data);
+		return TRUE;
+	}
+	return FALSE;
+}
+
 static void
 mixer_popup_show (MixerData *data)
 {
@@ -921,6 +933,12 @@
 			  (GCallback) applet_key_press_event_cb,
 			  data);
 	
+	g_signal_connect (data->applet,
+			  "scroll-event",
+			  (GCallback) applet_scroll_event_cb,
+			  data);
+	
+
         data->adj = GTK_ADJUSTMENT (
 		gtk_adjustment_new (-50,
 				    -VOLUME_MAX,
-- 
Fernando Herrera de las Heras
Onírica: análisis, diseño e implantación de soluciones informáticas
http://www.onirica.com



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