[frogr] Redesign the menu bar in GNOME too to prepare frogr for the global menu in GNOME Shell.



commit e3931feac9d3ebfaa165ca05e54419f6221ac029
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Mon Apr 9 23:33:21 2012 +0200

    Redesign the menu bar in GNOME too to prepare frogr for the global menu in GNOME Shell.
    
    Renamed 'File' to 'Frogr', moved 'add'/'remove' menu items to 'Actions', moved the 'Help' and
    'About' menu items to the new 'Frogr' menu and removed the 'Help' menu from the menu bar.

 data/gtkbuilder/frogr-main-view.xml |   96 ++++++++++++++++-------------------
 src/frogr-main-view.c               |    4 +-
 2 files changed, 45 insertions(+), 55 deletions(-)
---
diff --git a/data/gtkbuilder/frogr-main-view.xml b/data/gtkbuilder/frogr-main-view.xml
index e176d5b..56c9a3b 100644
--- a/data/gtkbuilder/frogr-main-view.xml
+++ b/data/gtkbuilder/frogr-main-view.xml
@@ -285,71 +285,71 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="use_action_appearance">False</property>
-        <property name="label" translatable="yes">_File</property>
+        <property name="label" translatable="yes">_Frogr</property>
         <property name="use_underline">True</property>
         <child type="submenu">
           <object class="GtkMenu" id="menu1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
-              <object class="GtkImageMenuItem" id="add_pictures_menu_item">
+              <object class="GtkMenuItem" id="accounts_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">add_pictures_action</property>
+                <property name="use_action_appearance">False</property>
+                <property name="label" translatable="yes">Accou_nts</property>
                 <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkImageMenuItem" id="remove_pictures_menu_item">
+              <object class="GtkMenuItem" id="authorize_frogr_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">remove_pictures_action</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
+                <property name="related_action">auth_action</property>
               </object>
             </child>
             <child>
-              <object class="GtkSeparatorMenuItem" id="separator2">
+              <object class="GtkSeparatorMenuItem" id="separator3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="use_action_appearance">False</property>
               </object>
             </child>
             <child>
-              <object class="GtkMenuItem" id="accounts_menu_item">
+              <object class="GtkImageMenuItem" id="preferences_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">Accou_nts</property>
+                <property name="related_action">preferences_action</property>
                 <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkMenuItem" id="authorize_frogr_menu_item">
+              <object class="GtkSeparatorMenuItem" id="separator4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">auth_action</property>
+                <property name="use_action_appearance">False</property>
               </object>
             </child>
             <child>
-              <object class="GtkSeparatorMenuItem" id="separator3">
+              <object class="GtkImageMenuItem" id="contents_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
+                <property name="related_action">help_action</property>
+                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkImageMenuItem" id="preferences_menu_item">
+              <object class="GtkImageMenuItem" id="about_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">preferences_action</property>
+                <property name="related_action">about_action</property>
                 <property name="use_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkSeparatorMenuItem" id="separator4">
+              <object class="GtkSeparatorMenuItem" id="separator8">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="use_action_appearance">False</property>
@@ -380,6 +380,31 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
+              <object class="GtkImageMenuItem" id="add_pictures_menu_item">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="related_action">add_pictures_action</property>
+                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkImageMenuItem" id="remove_pictures_menu_item">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="related_action">remove_pictures_action</property>
+                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkSeparatorMenuItem" id="separator2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
+              </object>
+            </child>
+            <child>
               <object class="GtkImageMenuItem" id="edit_details_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -550,38 +575,5 @@
         </child>
       </object>
     </child>
-    <child>
-      <object class="GtkMenuItem" id="help_menu_item">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="use_action_appearance">False</property>
-        <property name="label" translatable="yes">_Help</property>
-        <property name="use_underline">True</property>
-        <child type="submenu">
-          <object class="GtkMenu" id="help_submenu">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <child>
-              <object class="GtkImageMenuItem" id="contents_menu_item">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="related_action">help_action</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkImageMenuItem" id="about_menu_item">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="related_action">about_action</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
-      </object>
-    </child>
   </object>
 </interface>
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 00d0bb8..28c8520 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -280,9 +280,7 @@ _tweak_menu_bar_for_mac (FrogrMainView *self)
   gtk_widget_show_all (menu_item);
 
   /* Hide menus, menu items and separators that won't be shown in the Mac */
-  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "help_submenu"));
-  gtk_widget_hide (menu_item);
-  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "help_menu_item"));
+  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "contents_menu_item"));
   gtk_widget_hide (menu_item);
   menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "separator2"));
   gtk_widget_hide (menu_item);



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