aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/menubar.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index 6dd802b..03d15e1 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -33,6 +33,8 @@ private class IndicatorMenuItem : Gtk.MenuItem
this.hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 3);
this.add (this.hbox);
this.hbox.show ();
+ this.add_events (Gdk.EventMask.SCROLL_MASK);
+ this.scroll_event.connect (this.scrolled_cb);
if (entry.label != null)
{
@@ -65,6 +67,14 @@ private class IndicatorMenuItem : Gtk.MenuItem
{
visible = has_visible_child ();
}
+
+ public bool scrolled_cb (Gtk.Widget pWidget, Gdk.EventScroll pEvent)
+ {
+ Indicator.Object pObject = pWidget.get_data ("indicator-object");
+ GLib.Signal.emit_by_name (pObject, "entry-scrolled", 1, pEvent.direction);
+
+ return false;
+ }
}
public class MenuBar : Gtk.MenuBar
@@ -449,6 +459,7 @@ public class MenuBar : Gtk.MenuBar
debug ("Adding indicator object %p at position %d", entry, pos);
var menuitem = new IndicatorMenuItem (entry);
+ menuitem.set_data ("indicator-object", object);
insert (menuitem, pos);
}