[Xfce4-commits] <xfce4-indicator-plugin:master> XfceIndicatorButton: add gdk_scroll_mask
Andrzej
noreply at xfce.org
Tue Sep 17 05:34:02 CEST 2013
Updating branch refs/heads/master
to 82fa77eac573b8610f413587231075a5d83cf253 (commit)
from 25f6fef8209d2caf1d16f32500e74e2fbf1b2fac (commit)
commit 82fa77eac573b8610f413587231075a5d83cf253
Author: Andrzej <ndrwrdck at gmail.com>
Date: Tue Sep 17 04:32:53 2013 +0100
XfceIndicatorButton: add gdk_scroll_mask
Fixes scroll events on indicator buttons.
panel-plugin/indicator-button.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index 88161a4..16504ee 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -46,7 +46,7 @@
static void xfce_indicator_button_finalize (GObject *object);
static gboolean xfce_indicator_button_button_press (GtkWidget *widget,
GdkEventButton *event);
-static gboolean xfce_indicator_button_scroll (GtkWidget *widget,
+static gboolean xfce_indicator_button_scroll_event (GtkWidget *widget,
GdkEventScroll *event);
static void xfce_indicator_button_menu_deactivate (XfceIndicatorButton *button,
GtkMenu *menu);
@@ -94,7 +94,7 @@ xfce_indicator_button_class_init (XfceIndicatorButtonClass *klass)
widget_class = GTK_WIDGET_CLASS (klass);
widget_class->button_press_event = xfce_indicator_button_button_press;
- widget_class->scroll_event = xfce_indicator_button_scroll;
+ widget_class->scroll_event = xfce_indicator_button_scroll_event;
widget_class->get_preferred_width = xfce_indicator_button_get_preferred_width;
widget_class->get_preferred_height = xfce_indicator_button_get_preferred_height;
}
@@ -112,6 +112,8 @@ xfce_indicator_button_init (XfceIndicatorButton *button)
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
gtk_widget_set_name (GTK_WIDGET (button), "indicator-button");
+ gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK);
+
button->io = NULL;
button->entry = NULL;
button->plugin = NULL;
@@ -340,7 +342,7 @@ xfce_indicator_button_button_press (GtkWidget *widget,
static gboolean
-xfce_indicator_button_scroll (GtkWidget *widget, GdkEventScroll *event)
+xfce_indicator_button_scroll_event (GtkWidget *widget, GdkEventScroll *event)
{
XfceIndicatorButton *button = XFCE_INDICATOR_BUTTON (widget);
More information about the Xfce4-commits
mailing list