Package: alsamixergui
Version: 0.9.0rc2-1-9
Severity: whishlist

The attached patch allows using the mousewheel to increase/decrease the 
volume.

Cheers!

Uli
--- alsamixergui-0.9.0rc2-1.orig/src/Fl_AM.cxx	2002-05-09 17:41:35.000000000 +0200
+++ src/Fl_AM.cxx	2010-08-06 20:15:06.000000000 +0200
@@ -385,6 +384,28 @@ public:
 	}
 	int handle(int e)
 	{
+        switch(e) {
+        case FL_MOUSEWHEEL:
+            {
+                if(!Fl::event_inside(this))
+                    break;
+                Fl_AMGroup* g = (Fl_AMGroup*) this->parent();
+                mixer_focus_elem = g->elem_id;
+                double new_value = increment(value(), Fl::event_dy());
+                if (this==g->volumeL || g->lock->value()) {
+                    g->volumeL->value(new_value);
+                    mixer_volume_hard[MIXER_CHN_LEFT] = new_value;
+                }
+                if (this==g->volumeR || g->lock->value()) {
+                    g->volumeR->value(new_value);
+                    mixer_volume_hard[MIXER_CHN_RIGHT] = new_value;
+                }
+                gui_update();
+                return 1;
+            }
+        default:
+            break;
+        }
 		return Fl_Slider::handle(e);
 	}
 };

Reply via email to