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. --- widgets/misc/e-map.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'widgets/misc/e-map.c') diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index 40fe589a8c..ebccf385d7 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -722,15 +722,18 @@ static gint e_map_button_press (GtkWidget *widget, GdkEventButton *event) { - if (!gtk_widget_has_focus (widget)) gtk_widget_grab_focus (widget); - return TRUE; + if (!gtk_widget_has_focus (widget)) + gtk_widget_grab_focus (widget); + + return TRUE; } static gint e_map_button_release (GtkWidget *widget, GdkEventButton *event) { - if (event->button != 1) return FALSE; + if (event->button != 1) + return FALSE; gdk_pointer_ungrab (event->time); return TRUE; -- cgit v1.2.3