[frogr] Hide the new 'frogr' menu in OSX
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Hide the new 'frogr' menu in OSX
- Date: Mon, 9 Apr 2012 22:25:30 +0000 (UTC)
commit 69da37744e40479300fb8440170dd3f5615e8f35
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Tue Apr 10 00:24:54 2012 +0200
Hide the new 'frogr' menu in OSX
data/gtkbuilder/frogr-main-view.xml | 2 +-
src/frogr-main-view.c | 23 ++++++-----------------
2 files changed, 7 insertions(+), 18 deletions(-)
---
diff --git a/data/gtkbuilder/frogr-main-view.xml b/data/gtkbuilder/frogr-main-view.xml
index 56c9a3b..ae86f53 100644
--- a/data/gtkbuilder/frogr-main-view.xml
+++ b/data/gtkbuilder/frogr-main-view.xml
@@ -281,7 +281,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkMenuItem" id="menuitem1">
+ <object class="GtkMenuItem" id="frogr_menu_item">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 28c8520..108a281 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -279,16 +279,8 @@ _tweak_menu_bar_for_mac (FrogrMainView *self)
gtk_osxapplication_insert_app_menu_item (osx_app, gtk_separator_menu_item_new (), 6);
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, "contents_menu_item"));
- gtk_widget_hide (menu_item);
- menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "separator2"));
- gtk_widget_hide (menu_item);
- menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "separator3"));
- gtk_widget_hide (menu_item);
- menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "separator4"));
- gtk_widget_hide (menu_item);
- menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "quit_menu_item"));
+ /* Hide the traditional application menu that won't be shown in the Mac */
+ menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "frogr_menu_item"));
gtk_widget_hide (menu_item);
}
#endif
@@ -1649,10 +1641,6 @@ frogr_main_view_init (FrogrMainView *self)
priv->add_to_set_menu_item =
GTK_WIDGET (gtk_builder_get_object (builder, "add_to_set_menu_item"));
-#ifdef MAC_INTEGRATION
- _tweak_menu_bar_for_mac (self);
-#endif
-
/* populate accounts submenu from model */
_populate_accounts_submenu (self);
@@ -1772,13 +1760,14 @@ frogr_main_view_init (FrogrMainView *self)
/* Show the UI */
gtk_widget_show_all (GTK_WIDGET(priv->window));
- /* Update UI */
- _update_ui (FROGR_MAIN_VIEW (self));
-
#ifdef MAC_INTEGRATION
+ _tweak_menu_bar_for_mac (self);
gtk_osxapplication_ready(osx_app);
#endif
+ /* Update UI */
+ _update_ui (FROGR_MAIN_VIEW (self));
+
/* Show the auth dialog, if needed, on idle */
g_idle_add ((GSourceFunc) _maybe_show_auth_dialog_on_idle, self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]