[epiphany] Remove show-toolbars setting
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remove show-toolbars setting
- Date: Wed, 5 Feb 2014 17:12:41 +0000 (UTC)
commit dfb05e78f84b9980818039ce031388454bee87d9
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed Jan 29 11:12:29 2014 +0100
Remove show-toolbars setting
Epiphany doesn't have toolbars anymore and we don't want to hide the
headerbar.
data/epiphany.convert | 1 -
data/org.gnome.epiphany.gschema.xml | 4 ---
lib/ephy-prefs.h | 1 -
src/ephy-window.c | 48 +---------------------------------
4 files changed, 2 insertions(+), 52 deletions(-)
---
diff --git a/data/epiphany.convert b/data/epiphany.convert
index b73024c..bd93666 100644
--- a/data/epiphany.convert
+++ b/data/epiphany.convert
@@ -11,7 +11,6 @@ enable-caret-browsing = /apps/epiphany/web/browse_with_caret
[org.gnome.Epiphany.ui]
always-show-tabs-bar = /apps/epiphany/general/always_show_tabs_bar
-show-toolbars = /apps/epiphany/general/show_toolbars
toolbar-style = /apps/epiphany/general/toolbar_style
downloads-hidden = /apps/epiphany/dialogs/downloads_hidden
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index 8c879f8..f03cfef 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -68,10 +68,6 @@
</key>
</schema>
<schema path="/org/gnome/epiphany/ui/" id="org.gnome.Epiphany.ui">
- <key type="b" name="show-toolbars">
- <default>true</default>
- <summary>Show toolbars by default</summary>
- </key>
<key name="toolbar-style" enum="org.gnome.Epiphany.EphyPrefsUIToolbarStyle">
<default>'both-horiz'</default>
<summary>Toolbar style</summary>
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 7fe2aee..5c6afb0 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -69,7 +69,6 @@ typedef enum
#define EPHY_PREFS_UI_SCHEMA "org.gnome.Epiphany.ui"
#define EPHY_PREFS_UI_ALWAYS_SHOW_TABS_BAR "always-show-tabs-bar"
-#define EPHY_PREFS_UI_SHOW_TOOLBARS "show-toolbars"
#define EPHY_PREFS_UI_TOOLBAR_STYLE "toolbar-style"
#define EPHY_PREFS_UI_DOWNLOADS_HIDDEN "downloads-hidden"
#define EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY "tabs-bar-visibility-policy"
diff --git a/src/ephy-window.c b/src/ephy-window.c
index ddd7395..69a9d53 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -654,7 +654,6 @@ settings_changed_cb (GtkSettings *settings)
static void
get_chromes_visibility (EphyWindow *window,
- gboolean *show_toolbar,
gboolean *show_tabsbar,
gboolean *show_downloads_box)
{
@@ -663,12 +662,10 @@ get_chromes_visibility (EphyWindow *window,
if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
- *show_toolbar = TRUE;
*show_tabsbar = FALSE;
}
else
{
- *show_toolbar = (flags & EPHY_WEB_VIEW_CHROME_TOOLBAR) != 0;
*show_tabsbar = !(priv->is_popup || priv->fullscreen_mode);
}
@@ -679,35 +676,19 @@ static void
sync_chromes_visibility (EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
- gboolean show_toolbar, show_tabsbar, show_downloads_box;
+ gboolean show_tabsbar, show_downloads_box;
if (priv->closing) return;
get_chromes_visibility (window,
- &show_toolbar,
&show_tabsbar,
&show_downloads_box);
- g_object_set (priv->toolbar, "visible", show_toolbar, NULL);
-
ephy_notebook_set_tabs_allowed (EPHY_NOTEBOOK (priv->notebook), show_tabsbar);
gtk_widget_set_visible (priv->downloads_box, show_downloads_box);
}
static void
-set_toolbar_visibility (EphyWindow *window, gboolean show_toolbar)
-{
- EphyWindowPrivate *priv = window->priv;
-
- if (show_toolbar)
- priv->chrome |= EPHY_WEB_VIEW_CHROME_TOOLBAR;
- else
- priv->chrome &= ~EPHY_WEB_VIEW_CHROME_TOOLBAR;
-
- sync_chromes_visibility (window);
-}
-
-static void
sync_tab_load_status (EphyWebView *view,
WebKitLoadEvent load_event,
EphyWindow *window)
@@ -2857,15 +2838,7 @@ setup_notebook (EphyWindow *window)
static void
ephy_window_set_chrome (EphyWindow *window, EphyWebViewChrome mask)
{
- EphyWebViewChrome chrome_mask = mask;
-
- if (!g_settings_get_boolean (EPHY_SETTINGS_UI,
- EPHY_PREFS_UI_SHOW_TOOLBARS))
- {
- chrome_mask &= ~EPHY_WEB_VIEW_CHROME_TOOLBAR;
- }
-
- window->priv->chrome = chrome_mask;
+ window->priv->chrome = mask;
}
static void
@@ -3138,19 +3111,6 @@ allow_popups_notifier (GSettings *settings,
}
static void
-show_toolbars_setting_cb (GSettings *settings,
- char *key,
- EphyWindow *window)
-{
- gboolean show_toolbars;
-
- show_toolbars = g_settings_get_boolean (EPHY_SETTINGS_UI,
- EPHY_PREFS_UI_SHOW_TOOLBARS);
-
- set_toolbar_visibility (window, show_toolbars);
-}
-
-static void
sync_user_input_cb (EphyLocationController *action,
GParamSpec *pspec,
EphyWindow *window)
@@ -3444,10 +3404,6 @@ ephy_window_constructor (GType type,
"changed::" EPHY_PREFS_WEB_ENABLE_POPUPS,
G_CALLBACK (allow_popups_notifier), window);
- g_signal_connect (EPHY_SETTINGS_UI,
- "changed::" EPHY_PREFS_UI_SHOW_TOOLBARS,
- G_CALLBACK (show_toolbars_setting_cb), window);
-
/* Disable actions not needed for popup mode. */
toolbar_action_group = priv->toolbar_action_group;
action = gtk_action_group_get_action (toolbar_action_group, "FileNewTab");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]