From d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 29 Nov 2012 13:12:41 -0500 Subject: Avoid using GdkEventButton directly in certain places. Prefer dealing with GdkEvent pointers and using accessor functions like gdk_event_get_button(). This is complicated by the fact that some GtkWidget method declarations still use GdkEventButton pointers, and synthesizing button events pretty much requires direct GdkEventButton access. But GDK seems to be nudging itself toward sealing the GdkEvent union. Likely to happen in GDK4. Mainly clean up signal handlers and leave method overrides alone for now. --- shell/e-shell-switcher.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'shell/e-shell-switcher.c') diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index 195dc7c896..9e8f9a3a44 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -609,15 +609,20 @@ tool_item_get_button (GtkWidget *widget) static gboolean tool_item_button_cb (GtkWidget *internal_widget, - GdkEventButton *event, + GdkEvent *button_event, GtkAction *action) { + guint event_button = 0; + g_return_val_if_fail (GTK_IS_ACTION (action), FALSE); - if (event->button == 2) { + gdk_event_get_button (button_event, &event_button); + + if (event_button == 2) { gtk_action_activate (action); return TRUE; } + return FALSE; } -- cgit v1.2.3