aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-gui-utils.c7
-rw-r--r--widgets/misc/e-gui-utils.h2
-rw-r--r--widgets/misc/e-popup-menu.c2
-rw-r--r--widgets/misc/e-popup-menu.h2
4 files changed, 8 insertions, 5 deletions
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index 86cb3c3b5c..0d3dcf0728 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -56,13 +56,16 @@ e_auto_kill_popup_menu_on_hide (GtkMenu *menu)
}
void
-e_popup_menu (GtkMenu *menu, GdkEventButton *event)
+e_popup_menu (GtkMenu *menu, GdkEvent *event)
{
g_return_if_fail (menu != NULL);
g_return_if_fail (GTK_IS_MENU (menu));
e_auto_kill_popup_menu_on_hide (menu);
- gtk_menu_popup (menu, NULL, NULL, 0, NULL, event->button, event->time);
+ if (event->type == GDK_KEY_PRESS)
+ gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, event->key.time);
+ else
+ gtk_menu_popup (menu, NULL, NULL, 0, NULL, event->button.button, event->button.time);
}
typedef struct {
diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h
index b6785aecdd..8ccc8d5df5 100644
--- a/widgets/misc/e-gui-utils.h
+++ b/widgets/misc/e-gui-utils.h
@@ -6,7 +6,7 @@
#include <libgnomeui/gnome-messagebox.h>
-void e_popup_menu (GtkMenu *menu, GdkEventButton *event);
+void e_popup_menu (GtkMenu *menu, GdkEvent *event);
void e_auto_kill_popup_menu_on_hide (GtkMenu *menu);
void e_notice (GtkWindow *window, const char *type, const char *format, ...);
void e_container_foreach_leaf (GtkContainer *container,
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 875182f4c6..0eadba4225 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -109,7 +109,7 @@ e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_m
}
void
-e_popup_menu_run (EPopupMenu *menu_list, GdkEventButton *event, guint32 disable_mask, guint32 hide_mask, void *closure)
+e_popup_menu_run (EPopupMenu *menu_list, GdkEvent *event, guint32 disable_mask, guint32 hide_mask, void *closure)
{
GtkMenu *menu;
diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h
index be78965a83..ef872ba39f 100644
--- a/widgets/misc/e-popup-menu.h
+++ b/widgets/misc/e-popup-menu.h
@@ -20,7 +20,7 @@ GtkMenu *e_popup_menu_create (EPopupMenu *menu_list,
void *closure);
void e_popup_menu_run (EPopupMenu *menu_list,
- GdkEventButton *event,
+ GdkEvent *event,
guint32 disable_mask,
guint32 hide_mask,
void *closure);