[eog/gnome-2-32: 8/34] Reorder menu items to make menus more intuitive and less confusing



commit 07485994a6744e27d49cc338b2cfaad830e3e72f
Author: Felix Riemann <friemann gnome org>
Date:   Wed Apr 28 20:25:24 2010 +0200

    Reorder menu items to make menus more intuitive and less confusing
    
    Based on a proposal by Hylke Bons. Most visible change is the 'File'
    menu now being more specifically called as 'Image' now as that's what
    we're talking about in this case.
    Also the action names were adjusted to be in line with the others.
    This causes custom toolbars to loose these items on the first start.
    (bug 614457)

 data/eog-toolbar.xml |    8 +++---
 data/eog-ui.xml      |   57 +++++++++++++++++++++++------------------------
 src/eog-window.c     |   59 ++++++++++++++++++++++++-------------------------
 3 files changed, 61 insertions(+), 63 deletions(-)
---
diff --git a/data/eog-toolbar.xml b/data/eog-toolbar.xml
index 4554a90..38e895c 100644
--- a/data/eog-toolbar.xml
+++ b/data/eog-toolbar.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <toolbars version="1.0">
 <available>
-    <toolitem name="FileOpen"/>
-    <toolitem name="FileSave"/>
-    <toolitem name="FilePrint"/>
-    <toolitem name="FileProperties"/>
+    <toolitem name="ImageOpen"/>
+    <toolitem name="ImageSave"/>
+    <toolitem name="ImagePrint"/>
+    <toolitem name="ImageProperties"/>
     <toolitem name="ViewImageCollection"/>
     <toolitem name="ViewFullscreen"/>
     <toolitem name="ViewSlideshow"/>
diff --git a/data/eog-ui.xml b/data/eog-ui.xml
index 75cac6e..f320eb8 100644
--- a/data/eog-ui.xml
+++ b/data/eog-ui.xml
@@ -1,25 +1,33 @@
 <ui>
   <menubar name="MainMenu">
-    <menu action="File">
-      <menuitem action="FileOpen"/>
-      <menu action='FileOpenWith'>
+    <menu action="Image">
+      <menuitem action="ImageOpen"/>
+      <menu action='ImageOpenWith'>
          <placeholder name="Applications Placeholder"/>
       </menu>
       <separator/>
-      <menuitem action="FileSave"/>
-      <menuitem action="FileSaveAs"/>
+      <menuitem action="ImageSave"/>
+      <menuitem action="ImageSaveAs"/>
+      <separator/>
+      <menuitem action="ImagePrint"/>
       <separator/>
-      <menuitem action="FilePrint"/>
+      <menuitem action="ImageSetAsWallpaper"/>
       <separator/>
-      <menuitem action="FileProperties"/>
+      <menuitem action="ImageProperties"/>
       <separator/>
       <placeholder name="RecentDocuments"/>
       <separator/>
-      <menuitem action="FileClose"/>
+      <menuitem action="ImageClose"/>
     </menu>
     <menu action="Edit">
       <menuitem action="EditUndo"/>
       <separator/>
+      <menuitem action="EditFlipHorizontal"/>
+      <menuitem action="EditFlipVertical"/>
+      <separator/>
+      <menuitem action="EditRotate90"/>
+      <menuitem action="EditRotate270"/>
+      <separator/>
       <menuitem action="EditMoveToTrash"/>
       <separator/>
       <menuitem action="EditToolbar"/>
@@ -39,15 +47,6 @@
       <menuitem action="ViewZoomNormal"/>
       <menuitem action="ViewZoomFit"/>
     </menu>
-    <menu action="Image">
-      <menuitem action="EditFlipHorizontal"/>
-      <menuitem action="EditFlipVertical"/>
-      <separator/>
-      <menuitem action="EditRotate90"/>
-      <menuitem action="EditRotate270"/>
-      <separator/>
-      <menuitem action="SetAsWallpaper"/>
-    </menu>
     <menu action="Go">
       <menuitem name="GoPrevious" action="GoPrevious"/>
       <menuitem name="GoNext" action="GoNext"/>
@@ -103,35 +102,35 @@
   </toolbar>
 
   <popup name="ThumbnailPopup">
-    <menu action='FileOpenWith'>
+    <menu action='ImageOpenWith'>
        <placeholder name="Applications Placeholder"/>
     </menu>
     <separator/>
-    <menuitem action="FileSave"/>
-    <menuitem action="FileSaveAs"/>
+    <menuitem action="ImageSave"/>
+    <menuitem action="ImageSaveAs"/>
     <separator/>
-    <menuitem action="FilePrint"/>
+    <menuitem action="ImagePrint"/>
     <separator/>
     <menuitem action="EditMoveToTrash"/>
     <separator/>
-    <menuitem action="FileProperties"/>
-    <menuitem action="SetAsWallpaper"/>
+    <menuitem action="ImageProperties"/>
+    <menuitem action="ImageSetAsWallpaper"/>
   </popup>
 
   <popup name="ViewPopup">
-    <menu action='FileOpenWith'>
+    <menu action='ImageOpenWith'>
        <placeholder name="Applications Placeholder"/>
     </menu>
     <separator/>
-    <menuitem action="FileSave"/>
-    <menuitem action="FileSaveAs"/>
+    <menuitem action="ImageSave"/>
+    <menuitem action="ImageSaveAs"/>
     <separator/>
-    <menuitem action="FilePrint"/>
+    <menuitem action="ImagePrint"/>
     <separator/>
     <menuitem action="EditMoveToTrash"/>
     <separator/>
-    <menuitem action="FileProperties"/>
-    <menuitem action="SetAsWallpaper"/>
+    <menuitem action="ImageProperties"/>
+    <menuitem action="ImageSetAsWallpaper"/>
   </popup>
 
   <accelerator name="ControlEqualAccel" action="ControlEqual"/>
diff --git a/src/eog-window.c b/src/eog-window.c
index d216654..91add2a 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -589,9 +589,9 @@ eog_window_can_save_changed_cb (GConfClient *client,
 	priv->save_disabled = save_disabled;
 
 	action_save =
-		gtk_action_group_get_action (priv->actions_image, "FileSave");
+		gtk_action_group_get_action (priv->actions_image, "ImageSave");
 	action_save_as =
-		gtk_action_group_get_action (priv->actions_image, "FileSaveAs");
+		gtk_action_group_get_action (priv->actions_image, "ImageSaveAs");
 
 	if (priv->save_disabled) {
 		gtk_action_set_sensitive (action_save, FALSE);
@@ -854,7 +854,7 @@ update_action_groups_state (EogWindow *window)
 
 	action_print =
 		gtk_action_group_get_action (priv->actions_image,
-					     "FilePrint");
+					     "ImagePrint");
 
 	g_assert (action_collection != NULL);
 	g_assert (action_sidebar != NULL);
@@ -959,7 +959,7 @@ update_selection_ui_visibility (EogWindow *window)
 
 	wallpaper_action =
 		gtk_action_group_get_action (priv->actions_image,
-					     "SetAsWallpaper");
+					     "ImageSetAsWallpaper");
 
 	if (n_selected == 1) {
 		gtk_action_set_sensitive (wallpaper_action, TRUE);
@@ -1205,7 +1205,7 @@ eog_window_update_openwith_menu (EogWindow *window, EogImage *image)
 
                 gtk_ui_manager_add_ui (priv->ui_mgr,
                                 priv->open_with_menu_id,
-                                "/MainMenu/File/FileOpenWith/Applications Placeholder",
+                                "/MainMenu/Image/ImageOpenWith/Applications Placeholder",
                                 name,
                                 name,
                                 GTK_UI_MANAGER_MENUITEM,
@@ -1213,20 +1213,20 @@ eog_window_update_openwith_menu (EogWindow *window, EogImage *image)
 
                 gtk_ui_manager_add_ui (priv->ui_mgr,
                                 priv->open_with_menu_id,
-                                "/ThumbnailPopup/FileOpenWith/Applications Placeholder",
+                                "/ThumbnailPopup/ImageOpenWith/Applications Placeholder",
                                 name,
                                 name,
                                 GTK_UI_MANAGER_MENUITEM,
                                 FALSE);
                 gtk_ui_manager_add_ui (priv->ui_mgr,
                                 priv->open_with_menu_id,
-                                "/ViewPopup/FileOpenWith/Applications Placeholder",
+                                "/ViewPopup/ImageOpenWith/Applications Placeholder",
                                 name,
                                 name,
                                 GTK_UI_MANAGER_MENUITEM,
                                 FALSE);
 
-                path = g_strdup_printf ("/MainMenu/File/FileOpenWith/Applications Placeholder/%s", name);	
+                path = g_strdup_printf ("/MainMenu/Image/ImageOpenWith/Applications Placeholder/%s", name);	
 
                 menuitem = gtk_ui_manager_get_widget (priv->ui_mgr, path);
 
@@ -1235,7 +1235,7 @@ eog_window_update_openwith_menu (EogWindow *window, EogImage *image)
 
                 g_free (path);
 
-                path = g_strdup_printf ("/ThumbnailPopup/FileOpenWith/Applications Placeholder/%s", name);	
+                path = g_strdup_printf ("/ThumbnailPopup/ImageOpenWith/Applications Placeholder/%s", name);	
 
                 menuitem = gtk_ui_manager_get_widget (priv->ui_mgr, path);
 
@@ -1244,7 +1244,7 @@ eog_window_update_openwith_menu (EogWindow *window, EogImage *image)
 
                 g_free (path);
 
-                path = g_strdup_printf ("/ViewPopup/FileOpenWith/Applications Placeholder/%s", name);	
+                path = g_strdup_printf ("/ViewPopup/ImageOpenWith/Applications Placeholder/%s", name);	
 
                 menuitem = gtk_ui_manager_get_widget (priv->ui_mgr, path);
 
@@ -1526,7 +1526,7 @@ eog_job_load_cb (EogJobLoad *job, gpointer data)
 			 window);
 	}
 
-	action_save = gtk_action_group_get_action (priv->actions_image, "FileSave");
+	action_save = gtk_action_group_get_action (priv->actions_image, "ImageSave");
 	action_undo = gtk_action_group_get_action (priv->actions_image, "EditUndo");
 
 	/* Set Save and Undo sensitive according to image state.
@@ -1570,7 +1570,7 @@ eog_job_transform_cb (EogJobTransform *job, gpointer data)
 	action_undo =
 		gtk_action_group_get_action (window->priv->actions_image, "EditUndo");
 	action_save =
-		gtk_action_group_get_action (window->priv->actions_image, "FileSave");
+		gtk_action_group_get_action (window->priv->actions_image, "ImageSave");
 
 	image = eog_window_get_image (window);
 
@@ -2888,7 +2888,7 @@ eog_job_save_cb (EogJobSave *job, gpointer user_data)
 
 	update_status_bar (window);
 	action_save = gtk_action_group_get_action (window->priv->actions_image,
-						   "FileSave");
+						   "ImageSave");
 	gtk_action_set_sensitive (action_save, FALSE);
 }
 
@@ -2924,7 +2924,7 @@ eog_job_copy_cb (EogJobCopy *job, gpointer user_data)
 	gtk_statusbar_pop (GTK_STATUSBAR (window->priv->statusbar),
 			   window->priv->copy_file_cid);
 	action = gtk_action_group_get_action (window->priv->actions_image,
-					      "SetAsWallpaper");
+					      "ImageSetAsWallpaper");
 	gtk_action_set_sensitive (action, TRUE);
 
 	window->priv->copy_job = NULL;
@@ -3228,7 +3228,7 @@ eog_window_cmd_wallpaper (GtkAction *action, gpointer user_data)
 		GtkAction *action;
 
 		action = gtk_action_group_get_action (window->priv->actions_image,
-						      "SetAsWallpaper");
+						      "ImageSetAsWallpaper");
 		gtk_action_set_sensitive (action, FALSE);
 
 		priv->copy_file_cid = gtk_statusbar_get_context_id (GTK_STATUSBAR (priv->statusbar),
@@ -3709,18 +3709,17 @@ eog_window_cmd_go_random (GtkAction *action, gpointer user_data)
 }
 
 static const GtkActionEntry action_entries_window[] = {
-	{ "File",  NULL, N_("_File") },
+	{ "Image", NULL, N_("_Image") },
 	{ "Edit",  NULL, N_("_Edit") },
 	{ "View",  NULL, N_("_View") },
-	{ "Image", NULL, N_("_Image") },
 	{ "Go",    NULL, N_("_Go") },
 	{ "Tools", NULL, N_("_Tools") },
 	{ "Help",  NULL, N_("_Help") },
 
-	{ "FileOpen", GTK_STOCK_OPEN,  N_("_Openâ?¦"), "<control>O",
+	{ "ImageOpen", GTK_STOCK_OPEN,  N_("_Openâ?¦"), "<control>O",
 	  N_("Open a file"),
 	  G_CALLBACK (eog_window_cmd_file_open) },
-	{ "FileClose", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
+	{ "ImageClose", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
 	  N_("Close window"),
 	  G_CALLBACK (eog_window_cmd_close_window) },
 	{ "EditToolbar", NULL, N_("T_oolbar"), NULL,
@@ -3753,19 +3752,19 @@ static const GtkToggleActionEntry toggle_entries_window[] = {
 };
 
 static const GtkActionEntry action_entries_image[] = {
-	{ "FileSave", GTK_STOCK_SAVE, N_("_Save"), "<control>s",
+	{ "ImageSave", GTK_STOCK_SAVE, N_("_Save"), "<control>s",
 	  N_("Save changes in currently selected images"),
 	  G_CALLBACK (eog_window_cmd_save) },
-	{ "FileOpenWith", NULL, N_("Open _with"), NULL,
+	{ "ImageOpenWith", NULL, N_("Open _with"), NULL,
 	  N_("Open the selected image with a different application"),
 	  NULL},
-	{ "FileSaveAs", GTK_STOCK_SAVE_AS, N_("Save _Asâ?¦"), "<control><shift>s",
+	{ "ImageSaveAs", GTK_STOCK_SAVE_AS, N_("Save _Asâ?¦"), "<control><shift>s",
 	  N_("Save the selected images with a different name"),
 	  G_CALLBACK (eog_window_cmd_save_as) },
-	{ "FilePrint", GTK_STOCK_PRINT, N_("_Printâ?¦"), "<control>p",
+	{ "ImagePrint", GTK_STOCK_PRINT, N_("_Printâ?¦"), "<control>p",
 	  N_("Print the selected image"),
 	  G_CALLBACK (eog_window_cmd_print) },
-	{ "FileProperties", GTK_STOCK_PROPERTIES, N_("Prope_rties"), "<alt>Return",
+	{ "ImageProperties", GTK_STOCK_PROPERTIES, N_("Prope_rties"), "<alt>Return",
 	  N_("Show the properties and metadata of the selected image"),
 	  G_CALLBACK (eog_window_cmd_properties) },
 	{ "EditUndo", GTK_STOCK_UNDO, N_("_Undo"), "<control>z",
@@ -3783,7 +3782,7 @@ static const GtkActionEntry action_entries_image[] = {
 	{ "EditRotate270", "object-rotate-left", N_("Rotate Counterc_lockwise"), "<ctrl><shift>r",
 	  N_("Rotate the image 90 degrees to the left"),
 	  G_CALLBACK (eog_window_cmd_rotate_270) },
-	{ "SetAsWallpaper", NULL, N_("Set as _Desktop Background"),
+	{ "ImageSetAsWallpaper", NULL, N_("Set as _Desktop Background"),
 	  "<control>F8", N_("Set the selected image as the desktop background"),
 	  G_CALLBACK (eog_window_cmd_wallpaper) },
 	{ "EditMoveToTrash", "user-trash", N_("Move to _Trash"), NULL,
@@ -4067,7 +4066,7 @@ eog_window_update_recent_files_menu (EogWindow *window)
 		g_object_unref (action);
 
 		gtk_ui_manager_add_ui (priv->ui_mgr, priv->recent_menu_id,
-				       "/MainMenu/File/RecentDocuments",
+				       "/MainMenu/Image/RecentDocuments",
 				       action_name, action_name,
 				       GTK_UI_MANAGER_AUTO, FALSE);
 
@@ -4291,22 +4290,22 @@ eog_window_construct_ui (EogWindow *window)
 	gtk_widget_show (menubar);
 
 	menuitem = gtk_ui_manager_get_widget (priv->ui_mgr,
-			"/MainMenu/Image/EditFlipHorizontal");
+			"/MainMenu/Edit/EditFlipHorizontal");
 	gtk_image_menu_item_set_always_show_image (
 			GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
 
 	menuitem = gtk_ui_manager_get_widget (priv->ui_mgr,
-			"/MainMenu/Image/EditFlipVertical");
+			"/MainMenu/Edit/EditFlipVertical");
 	gtk_image_menu_item_set_always_show_image (
 			GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
 
 	menuitem = gtk_ui_manager_get_widget (priv->ui_mgr,
-			"/MainMenu/Image/EditRotate90");
+			"/MainMenu/Edit/EditRotate90");
 	gtk_image_menu_item_set_always_show_image (
 			GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
 
 	menuitem = gtk_ui_manager_get_widget (priv->ui_mgr,
-			"/MainMenu/Image/EditRotate270");
+			"/MainMenu/Edit/EditRotate270");
 	gtk_image_menu_item_set_always_show_image (
 			GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]