[epiphany] Remove option to hide toolbars
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remove option to hide toolbars
- Date: Tue, 20 Dec 2011 16:56:29 +0000 (UTC)
commit 8b352f8b83a264c60f810a268c92dd4bf687f85e
Author: Xan Lopez <xan igalia com>
Date: Tue Dec 20 15:34:04 2011 +0100
Remove option to hide toolbars
We don't want this either for 3.4, remove it.
data/ui/epiphany-ui.xml | 9 ------
src/ephy-lockdown.c | 5 ---
src/ephy-window.c | 72 -----------------------------------------------
3 files changed, 0 insertions(+), 86 deletions(-)
---
diff --git a/data/ui/epiphany-ui.xml b/data/ui/epiphany-ui.xml
index 7411cd5..f380f6e 100644
--- a/data/ui/epiphany-ui.xml
+++ b/data/ui/epiphany-ui.xml
@@ -36,15 +36,6 @@
</menu>
<menu name="ViewMenu" action="View">
- <placeholder name="ViewTogglesGroup" position="top">
- <menu name="ToolbarMenu" action="Toolbar">
- <separator/>
- <placeholder name="ViewToolbarsGroup" position="top">
- </placeholder>
- <separator/>
- <menuitem name="ViewToolbarMenu" action="ViewToolbar"/>
- </menu>
- </placeholder>
<menuitem name="ViewDownloadsBar" action="ViewDownloadsBar"/>
<separator name="ViewSep1"/>
<menuitem name="ViewPopupsMenu" action="ViewPopupWindows"/>
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index bd40f2a..e946598 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -227,11 +227,6 @@ impl_attach_window (EphyExtension *extension,
action_group, window_actions,
G_N_ELEMENTS (window_actions));
- action = gtk_action_group_get_action (action_group, "ViewToolbar");
- g_settings_bind_writable (EPHY_SETTINGS_UI,
- EPHY_PREFS_UI_SHOW_TOOLBARS,
- action, "sensitive", FALSE);
-
action_group = find_action_group (manager, "PopupsActions");
bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN,
action_group, popup_actions,
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a915207..8b6b439 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -89,8 +89,6 @@ static void notebook_switch_page_cb (GtkNotebook *notebook,
GtkWidget *page,
guint page_num,
EphyWindow *window);
-static void ephy_window_view_toolbar_cb (GtkAction *action,
- EphyWindow *window);
static void ephy_window_view_popup_windows_cb (GtkAction *action,
EphyWindow *window);
static void sync_tab_load_status (EphyWebView *view,
@@ -268,9 +266,6 @@ static const GtkToggleActionEntry ephy_menu_toggle_entries [] =
/* View Menu */
- { "ViewToolbar", NULL, N_("_Hide Toolbars"), NULL,
- N_("Show or hide toolbar"),
- G_CALLBACK (ephy_window_view_toolbar_cb), FALSE },
{ "ViewDownloadsBar", NULL, N_("_Downloads Bar"), NULL,
N_("Show the active downloads for this window"),
NULL, FALSE },
@@ -1521,28 +1516,6 @@ connect_proxy_cb (GtkUIManager *manager,
}
static void
-update_chromes_actions (EphyWindow *window)
-{
- GtkActionGroup *action_group = window->priv->action_group;
- GtkAction *action;
- gboolean show_menubar, show_toolbar, show_tabsbar;
-
- get_chromes_visibility (window,
- &show_menubar,
- &show_toolbar,
- &show_tabsbar);
-
- action = gtk_action_group_get_action (action_group, "ViewToolbar");
- g_signal_handlers_block_by_func (G_OBJECT (action),
- G_CALLBACK (ephy_window_view_toolbar_cb),
- window);
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), !show_toolbar);
- g_signal_handlers_unblock_by_func (G_OBJECT (action),
- G_CALLBACK (ephy_window_view_toolbar_cb),
- window);
-}
-
-static void
setup_ui_manager (EphyWindow *window)
{
GtkActionGroup *action_group;
@@ -2662,7 +2635,6 @@ web_view_ready_cb (WebKitWebView *web_view,
window->priv->is_popup = TRUE;
window->priv->chrome = chrome_mask;
- update_chromes_actions (window);
sync_chromes_visibility (window);
}
@@ -3972,8 +3944,6 @@ ephy_window_constructor (GType type,
init_menu_updaters (window);
- update_chromes_actions (window);
-
sync_chromes_visibility (window);
ensure_location_entry (window);
@@ -4379,48 +4349,6 @@ ephy_window_set_zoom (EphyWindow *window,
}
static void
-sync_prefs_with_chrome (EphyWindow *window)
-{
- EphyWebViewChrome flags = window->priv->chrome;
-
- if (window->priv->should_save_chrome)
- {
- g_settings_set_boolean (EPHY_SETTINGS_UI,
- EPHY_PREFS_UI_SHOW_TOOLBARS,
- flags & EPHY_WEB_VIEW_CHROME_TOOLBAR);
-
- g_settings_set_boolean (EPHY_SETTINGS_LOCKDOWN,
- EPHY_PREFS_LOCKDOWN_MENUBAR,
- !(flags & EPHY_WEB_VIEW_CHROME_MENUBAR));
- }
-}
-
-static void
-sync_chrome_with_view_toggle (GtkAction *action,
- EphyWindow *window,
- EphyWebViewChrome chrome_flag,
- gboolean invert)
-{
- gboolean active;
-
- active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- window->priv->chrome = (active != invert) ?
- window->priv->chrome | chrome_flag :
- window->priv->chrome & (~chrome_flag);
-
- sync_chromes_visibility (window);
- sync_prefs_with_chrome (window);
-}
-
-static void
-ephy_window_view_toolbar_cb (GtkAction *action,
- EphyWindow *window)
-{
- sync_chrome_with_view_toggle (action, window,
- EPHY_WEB_VIEW_CHROME_TOOLBAR, TRUE);
-}
-
-static void
ephy_window_view_popup_windows_cb (GtkAction *action,
EphyWindow *window)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]