[epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 16/20] Stop duplicating items between menus
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 16/20] Stop duplicating items between menus
- Date: Thu, 26 Feb 2015 21:05:44 +0000 (UTC)
commit 4aabd486d726a9b6c43aa74f157b6e3ad407c6a7
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Aug 27 14:02:02 2014 -0500
Stop duplicating items between menus
Nowadays the app menu is shown in the header bar, so we don't want to
put these items in the window menu anymore.
Reducing the size of this menu also prepares us for using a popover
menu.
https://bugzilla.gnome.org/show_bug.cgi?id=735487
src/ephy-window.c | 51 -----------------------------------------
src/resources/epiphany-ui.xml | 8 ------
2 files changed, 0 insertions(+), 59 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e010831..6716973 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -365,8 +365,6 @@ struct _EphyWindowPrivate
EphyLocationController *location_controller;
- gulong app_menu_visibility_handler;
-
guint closing : 1;
guint has_size : 1;
guint fullscreen_mode : 1;
@@ -3082,13 +3080,6 @@ ephy_window_state_event (GtkWidget *widget,
static void
ephy_window_finalize (GObject *object)
{
- EphyWindow *window = EPHY_WINDOW (object);
- EphyWindowPrivate *priv = window->priv;
-
- if (priv->app_menu_visibility_handler != 0)
- g_signal_handler_disconnect (gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET
(window))),
- priv->app_menu_visibility_handler);
-
G_OBJECT_CLASS (ephy_window_parent_class)->finalize (object);
LOG ("EphyWindow finalised %p", object);
@@ -3302,39 +3293,6 @@ _gtk_css_provider_load_from_resource (GtkCssProvider* provider,
return res;
}
-static const gchar* app_actions[] = {
- "FileNewWindow",
- "FileNewWindowIncognito",
- "EditPreferences",
- "EditBookmarks",
- "EditHistory",
- "FileQuit",
- "HelpContents",
- "HelpAbout"
-};
-
-static void
-ephy_window_toggle_visibility_for_app_menu (EphyWindow *window)
-{
- const gchar *action_name;
- gboolean shows_app_menu;
- GtkSettings *settings;
- GtkAction *action;
- gint idx;
-
- settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)));
- g_object_get (settings,
- "gtk-shell-shows-app-menu", &shows_app_menu,
- NULL);
-
- for (idx = 0; idx < G_N_ELEMENTS (app_actions); idx++) {
- action_name = app_actions[idx];
- action = gtk_action_group_get_action (window->priv->action_group, action_name);
-
- gtk_action_set_visible (action, !shows_app_menu);
- }
-}
-
static GObject *
ephy_window_constructor (GType type,
guint n_construct_properties,
@@ -3492,15 +3450,6 @@ ephy_window_constructor (GType type,
chrome &= ~(EPHY_WINDOW_CHROME_MENU | EPHY_WINDOW_CHROME_TABSBAR);
}
- /* We never want the menubar shown, we merge the app menu into
- * our super menu manually when running outside the Shell. */
- gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), FALSE);
-
- ephy_window_toggle_visibility_for_app_menu (window);
- priv->app_menu_visibility_handler = g_signal_connect_swapped (gtk_settings_get_for_screen
(gtk_widget_get_screen (GTK_WIDGET (window))),
- "notify::gtk-shell-shows-app-menu",
- G_CALLBACK
(ephy_window_toggle_visibility_for_app_menu), window);
-
/* ensure the UI is updated */
gtk_ui_manager_ensure_update (priv->manager);
diff --git a/src/resources/epiphany-ui.xml b/src/resources/epiphany-ui.xml
index 343fc86..ed48e9a 100644
--- a/src/resources/epiphany-ui.xml
+++ b/src/resources/epiphany-ui.xml
@@ -9,8 +9,6 @@
</popup>
<popup name="PagePopup" action="PagePopupAction" accelerators="true">
- <menuitem name="FileNewWindowMenu" action="FileNewWindow"/>
- <menuitem name="FileNewWindowIncognitoMenu" action="FileNewWindowIncognito"/>
<menuitem name="FileNewTabMenu" action="FileNewTab"/>
<menuitem name="FileOpenMenu" action="FileOpen"/>
<separator name="FileSep1"/>
@@ -29,10 +27,7 @@
<separator name="EditSep4"/>
<menuitem name="FilePrintMenu" action="FilePrint"/>
<menuitem name="EditFindMenu" action="EditFind"/>
- <menuitem name="EditPreferencesMenu" action="EditPreferences"/>
<separator name="FileSep5"/>
- <menuitem name="HistoryEditMenu" action="EditHistory"/>
- <menuitem name="BookmarksEditMenu" action="EditBookmarks"/>
<menu name="BookmarksMenu" action="Bookmarks">
<menuitem name="BookmarksAddBookmarkMenu" action="FileBookmarkPage"/>
<separator name="BookmarksSep1"/>
@@ -43,9 +38,6 @@
</menu>
<menuitem name="ViewPageSourceMenu" action="ViewPageSource"/>
<separator name="FileSep7"/>
- <menuitem name="HelpContentsMenu" action="HelpContents"/>
- <menuitem name="HelpAboutMenu" action="HelpAbout"/>
- <menuitem name="FileQuitMenu" action="FileQuit"/>
</popup>
<accelerator name="AlwaysStopAccel" action="ViewAlwaysStop"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]