diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-11-30 02:12:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-11-30 02:24:24 +0800 |
commit | d2fb5ee1a86539e49f02c1fe9ea10cf55b0b351a (patch) | |
tree | 0a0da6f348d8c41ac3e7712a5c18abe78e23d891 /calendar/alarm-notify | |
parent | 67024e23ee07266a7b9854648454739e1824f91c (diff) | |
download | gsoc2013-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 'calendar/alarm-notify')
-rw-r--r-- | calendar/alarm-notify/alarm-queue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/calendar/alarm-notify/alarm-queue.c b/calendar/alarm-notify/alarm-queue.c index f24a17b135..360a95edf2 100644 --- a/calendar/alarm-notify/alarm-queue.c +++ b/calendar/alarm-notify/alarm-queue.c @@ -1476,12 +1476,16 @@ open_alarm_dialog (TrayIconData *tray_data) static gint tray_icon_clicked_cb (GtkWidget *widget, - GdkEventButton *event, + GdkEvent *event, gpointer user_data) { if (event->type == GDK_BUTTON_PRESS) { + guint event_button = 0; + debug (("left click and %d alarms", g_list_length (tray_icons_list))); - if (event->button == 1 && g_list_length (tray_icons_list) > 0) { + + gdk_event_get_button (event, &event_button); + if (event_button == 1 && g_list_length (tray_icons_list) > 0) { GList *tmp; for (tmp = tray_icons_list; tmp; tmp = tmp->next) { open_alarm_dialog (tmp->data); |