[epiphany/wip/exalm/elementary3: 5/5] notebook: Always show tab bar on Pantheon



commit 514d1bfb6023122359c71eb2874b08fd382ee5da
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Mon Sep 23 13:21:37 2019 +0500

    notebook: Always show tab bar on Pantheon
    
    This is a prerequisite of showing new tab button in the tab bar.

 data/org.gnome.epiphany.gschema.xml | 2 +-
 src/ephy-notebook.c                 | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index 39542e888..e32d33167 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -85,7 +85,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), “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>
+                       <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). This setting is ignored in Pantheon desktop, and “always” value is 
used.</description>
                </key>
                <key type="b" name="keep-window-open">
                        <default>false</default>
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 91b108eda..479fba87c 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -371,8 +371,11 @@ update_tabs_visibility (EphyNotebook *nb,
   if (before_inserting)
     num++;
 
-  policy = g_settings_get_enum (EPHY_SETTINGS_UI,
-                                EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY);
+  if (is_desktop_pantheon ())
+    policy = EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS;
+  else
+    policy = g_settings_get_enum (EPHY_SETTINGS_UI,
+                                  EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY);
 
   if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION &&
       nb->adaptive_mode != EPHY_ADAPTIVE_MODE_NARROW &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]