diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-03-26 05:41:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-03-26 05:41:49 +0000 |
commit | c0e22aef9eecfddde486a62a4d366edd45d86d00 (patch) | |
tree | da055d82ef1c632429fda4a701fb4ce3161085cc /src/folderview.c | |
parent | 7eba3af6a0470bf25ec360cc714c1ffd75cb3e7d (diff) |
src/folderview.c: enabled menu popup with Menu key.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3029 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/folderview.c')
-rw-r--r-- | src/folderview.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/folderview.c b/src/folderview.c index 69844bb9..252f4268 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2011 Hiroyuki Yamamoto + * Copyright (C) 1999-2012 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1663,11 +1663,6 @@ static gboolean folderview_menu_popup(FolderView *folderview, gboolean search_folder = FALSE; gboolean folder_property = FALSE; - if (!event) return FALSE; - - if (event->button != 3) - return FALSE; - if (!gtk_tree_selection_get_selected (folderview->selection, NULL, &iter)) return FALSE; @@ -1868,8 +1863,13 @@ static gboolean folderview_menu_popup(FolderView *folderview, syl_plugin_signal_emit("folderview-menu-popup", ifactory); - gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL, - event->button, event->time); + if (event) + gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL, + event->button, event->time); + else + gtk_menu_popup(GTK_MENU(popup), NULL, NULL, + menu_widget_position, folderview->treeview, + 0, GDK_CURRENT_TIME); return FALSE; } @@ -2016,6 +2016,9 @@ static gboolean folderview_key_pressed(GtkWidget *widget, GdkEventKey *event, } } break; + case GDK_Menu: + folderview_menu_popup(folderview, NULL); + return TRUE; default: break; } |