diff options
-rw-r--r-- | data/org.gnome.epiphany.gschema.xml | 2 | ||||
-rw-r--r-- | lib/ephy-prefs.h | 3 | ||||
-rw-r--r-- | src/ephy-notebook.c | 12 |
3 files changed, 9 insertions, 8 deletions
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml index 69386bdf1..d69c7ab57 100644 --- a/data/org.gnome.epiphany.gschema.xml +++ b/data/org.gnome.epiphany.gschema.xml @@ -88,7 +88,7 @@ <key name="tabs-bar-visibility-policy" enum="org.gnome.Epiphany.EphyPrefsUITabsBarVisibilityPolicy"> <default>'more-than-one'</default> <summary>The visibility policy for the tabs bar.</summary> - <description>Controls when the tabs bar is shown. Possible values are 'always' (the tabs bar is always shown) and 'more-than-one' (the tabs bar is only shown if there's two or more tabs).</description> + <description>Controls when the tabs bar is shown. Possible values are 'always' (the tabs bar is always shown), 'more-than-one' (the tabs bar is only shown if there's two or more tabs) and 'never' (the tabs bar is never shown).</description> </key> </schema> <schema path="/org/gnome/epiphany/web/" id="org.gnome.Epiphany.web"> diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h index a510f657a..d2a5f5884 100644 --- a/lib/ephy-prefs.h +++ b/lib/ephy-prefs.h @@ -46,7 +46,8 @@ typedef enum typedef enum { EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS, - EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE + EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE, + EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_NEVER } EphyPrefsUITabsBarVisibilityPolicy; typedef enum diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 5614ca707..1b73e7bfa 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -397,7 +397,7 @@ update_tabs_visibility (EphyNotebook *nb, gboolean before_inserting) { EphyEmbedShellMode mode; - gboolean show_tabs; + gboolean show_tabs = FALSE; guint num; EphyPrefsUITabsBarVisibilityPolicy policy; @@ -409,11 +409,11 @@ update_tabs_visibility (EphyNotebook *nb, policy = g_settings_get_enum (EPHY_SETTINGS_UI, EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY); - show_tabs = mode != EPHY_EMBED_SHELL_MODE_APPLICATION && - (policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS - || num > 1) && - priv->show_tabs == TRUE; - + if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION && + ((policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE && num > 1) || + policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS)) + show_tabs = TRUE; + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs); } |