diff options
author | Bolian Yin <bolian.yin@sun.com> | 2003-06-19 10:27:12 +0800 |
---|---|---|
committer | Bolian Yin <byin@src.gnome.org> | 2003-06-19 10:27:12 +0800 |
commit | 243441287ff8b44896fe5d8bc26b81a8fad9eeb2 (patch) | |
tree | fddad89ce4980874e7238b0520319f3619f64f95 /widgets | |
parent | 8c76dae0e38e2be7cbfed34cdbb299dc859102f7 (diff) | |
download | gsoc2013-evolution-243441287ff8b44896fe5d8bc26b81a8fad9eeb2.tar.gz gsoc2013-evolution-243441287ff8b44896fe5d8bc26b81a8fad9eeb2.tar.zst gsoc2013-evolution-243441287ff8b44896fe5d8bc26b81a8fad9eeb2.zip |
accept event arg to be NULL.
2003-06-19 Bolian Yin <bolian.yin@sun.com>
* e-gui-utils.c (e_popup_menu): accept event arg to be NULL.
svn path=/trunk/; revision=21472
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-gui-utils.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c index 59c499e4c1..886fb3d7ca 100644 --- a/widgets/misc/e-gui-utils.c +++ b/widgets/misc/e-gui-utils.c @@ -48,15 +48,21 @@ e_popup_menu (GtkMenu *menu, GdkEvent *event) e_auto_kill_popup_menu_on_selection_done (menu); - if (event->type == GDK_KEY_PRESS) - gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, event->key.time); - else if ((event->type == GDK_BUTTON_PRESS) || - (event->type == GDK_BUTTON_RELEASE) || - (event->type == GDK_2BUTTON_PRESS) || - (event->type == GDK_3BUTTON_PRESS)){ - gtk_menu_popup (menu, NULL, NULL, 0, NULL, event->button.button, event->button.time); + if (event) { + if (event->type == GDK_KEY_PRESS) + gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, + event->key.time); + else if ((event->type == GDK_BUTTON_PRESS) || + (event->type == GDK_BUTTON_RELEASE) || + (event->type == GDK_2BUTTON_PRESS) || + (event->type == GDK_3BUTTON_PRESS)){ + gtk_menu_popup (menu, NULL, NULL, 0, NULL, + event->button.button, + event->button.time); + } } else - gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, GDK_CURRENT_TIME); + gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0, + GDK_CURRENT_TIME); } typedef struct { |