From 1f7a02524671165a276463acb4e84e8f6e3a2442 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Wed, 28 Jul 2004 17:19:17 +0000 Subject: move the File/Close item back to it's former position. Add an explanatory comment why it's placed there, in difference to the Gnome HIG. svn path=/trunk/; revision=11554 --- gtk/menu.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gtk/menu.c b/gtk/menu.c index 2770104c0d..d99a294494 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -143,6 +143,22 @@ static void auto_scroll_live_cb(GtkWidget *w _U_, gpointer d _U_); Item 6: extra data needed for ImageItem and StockItem (gtk2) */ +/* As a general GUI guideline, we try to follow the Gnome Human Interface Guidelines, which can be found at: + http://developer.gnome.org/projects/gup/hig/1.0/index.html + +Please note: there are some differences between the Gnome HIG menu suggestions and our implementation: + +File/Open Recent: the Gnome HIG suggests putting the list of recently used files as elements into the File menuitem. + As this is ok for only a few items, this will become unhandy for 10 or even more list entries. + For this reason, we use a submenu for this. + +File/Close: the Gnome HIG suggests putting this item just above the Quit item. + This results in unintuitive behaviour as both Close and Quit items are very near together. + By putting the Close item near the open item(s), it better suggests that it will close the + currently opened/captured file only. +*/ + + /* main menu */ static GtkItemFactoryEntry menu_items[] = { @@ -151,6 +167,8 @@ static GtkItemFactoryEntry menu_items[] = 0, GTK_STOCK_OPEN), ITEM_FACTORY_ENTRY("/File/Open _Recent", NULL, NULL, 0, "", NULL), ITEM_FACTORY_ENTRY("/File/_Merge...", NULL, file_merge_cmd_cb, 0, NULL, NULL), + ITEM_FACTORY_STOCK_ENTRY("/File/_Close", "W", file_close_cmd_cb, + 0, GTK_STOCK_CLOSE), ITEM_FACTORY_ENTRY("/File/", NULL, NULL, 0, "", NULL), ITEM_FACTORY_STOCK_ENTRY("/File/_Save", "S", file_save_cmd_cb, 0, GTK_STOCK_SAVE), @@ -173,8 +191,6 @@ static GtkItemFactoryEntry menu_items[] = ITEM_FACTORY_STOCK_ENTRY("/File/_Print...", "P", file_print_cmd_cb, 0, GTK_STOCK_PRINT), ITEM_FACTORY_ENTRY("/File/", NULL, NULL, 0, "", NULL), - ITEM_FACTORY_STOCK_ENTRY("/File/_Close", "W", file_close_cmd_cb, - 0, GTK_STOCK_CLOSE), ITEM_FACTORY_STOCK_ENTRY("/File/_Quit", "Q", file_quit_cmd_cb, 0, GTK_STOCK_QUIT), ITEM_FACTORY_ENTRY("/_Edit", NULL, NULL, 0, "", NULL), -- cgit v1.2.3