aboutsummaryrefslogtreecommitdiffstats
path: root/smime
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-11-30 02:12:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-11-30 02:24:24 +0800
commitd2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a (patch)
tree0a0da6f348d8c41ac3e7712a5c18abe78e23d891 /smime
parent67024e23ee07266a7b9854648454739e1824f91c (diff)
downloadgsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar.gz
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar.bz2
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar.lz
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar.xz
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.tar.zst
gsoc2013-evolution-d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a.zip
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.
Diffstat (limited to 'smime')
-rw-r--r--smime/gui/certificate-manager.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index acddc8a974..a48442f50b 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -325,16 +325,21 @@ report_and_free_error (CertPage *cp,
static gboolean
treeview_header_clicked (GtkWidget *widget,
- GdkEventButton *event,
+ GdkEvent *button_event,
gpointer user_data)
{
GtkMenu *menu = user_data;
+ guint event_button = 0;
+ guint32 event_time;
- if (event->button != 3)
+ gdk_event_get_button (button_event, &event_button);
+ event_time = gdk_event_get_time (button_event);
+
+ if (event_button != 3)
return FALSE;
gtk_widget_show_all (GTK_WIDGET (menu));
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
+ gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event_button, event_time);
return TRUE;
}