diff options
-rw-r--r-- | data/org.mate.pluma.gschema.xml.in | 5 | ||||
-rw-r--r-- | pluma/pluma-notebook.c | 19 | ||||
-rw-r--r-- | pluma/pluma-window.c | 8 |
3 files changed, 25 insertions, 7 deletions
diff --git a/data/org.mate.pluma.gschema.xml.in b/data/org.mate.pluma.gschema.xml.in index 8f97fdbe..75fe7d11 100644 --- a/data/org.mate.pluma.gschema.xml.in +++ b/data/org.mate.pluma.gschema.xml.in @@ -196,5 +196,10 @@ <summary>Active plugins</summary> <description>List of active plugins. It contains the "Location" of the active plugins. See the .pluma-plugin file for obtaining the "Location" of a given plugin.</description> </key> + <key name="show-tabs-with-side-pane" type="b"> + <default>true</default> + <summary>Show tabs with side pane</summary> + <description>If false, pluma doesn't show tabs in the notebook with the side pane active.</description> + </key> </schema> </schemalist> diff --git a/pluma/pluma-notebook.c b/pluma/pluma-notebook.c index 8afce33c..7fc7485a 100644 --- a/pluma/pluma-notebook.c +++ b/pluma/pluma-notebook.c @@ -48,6 +48,7 @@ #include "pluma-tab-label.h" #include "pluma-marshal.h" #include "pluma-window.h" +#include "pluma-prefs-manager.h" #define AFTER_ALL_TABS -1 #define NOT_IN_APP_WINDOWS -2 @@ -721,8 +722,9 @@ static void update_tabs_visibility (PlumaNotebook *nb, gboolean before_inserting) { - gboolean show_tabs; - guint num; + gboolean show_tabs; + guint num; + GSettings *settings; num = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb)); @@ -730,10 +732,17 @@ update_tabs_visibility (PlumaNotebook *nb, show_tabs = (nb->priv->always_show_tabs || num > 1); - if (pluma_prefs_manager_get_side_pane_visible ()) - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), FALSE); - else + settings = g_settings_new ("org.mate.pluma"); + + if (g_settings_get_boolean (settings, "show-tabs-with-side-pane")) gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs); + else + { + if (pluma_prefs_manager_get_side_pane_visible ()) + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), FALSE); + else + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs); + } } static void diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index 666e2c5d..5e9f8d94 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -3573,12 +3573,16 @@ static void side_panel_visibility_changed (GtkWidget *side_panel, PlumaWindow *window) { - gboolean visible; + gboolean visible; GtkAction *action; + GSettings *settings; visible = gtk_widget_get_visible (side_panel); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (window->priv->notebook), !visible); + settings = g_settings_new ("org.mate.pluma"); + + if (!g_settings_get_boolean (settings, "show-tabs-with-side-pane")) + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (window->priv->notebook), !visible); if (pluma_prefs_manager_side_pane_visible_can_set ()) pluma_prefs_manager_set_side_pane_visible (visible); |