diff options
author | Pablo Barciela <[email protected]> | 2019-12-28 22:20:19 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2020-01-11 16:21:20 +0100 |
commit | ead4c3415da8acbbcc61d06365e0c83e8da089fb (patch) | |
tree | 8625fd8deb4c3d1d83a439b47cb6bffb07c200a1 /pluma/pluma-tab.c | |
parent | 2738265fa574493db5a7db9f23307742d3ba2ef7 (diff) | |
download | pluma-ead4c3415da8acbbcc61d06365e0c83e8da089fb.tar.bz2 pluma-ead4c3415da8acbbcc61d06365e0c83e8da089fb.tar.xz |
avoid to make new Gsettings variables
use Gsettings 'pluma_prefs_manager' instead
Diffstat (limited to 'pluma/pluma-tab.c')
-rw-r--r-- | pluma/pluma-tab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pluma/pluma-tab.c b/pluma/pluma-tab.c index daff4dd0..505b64b7 100644 --- a/pluma/pluma-tab.c +++ b/pluma/pluma-tab.c @@ -43,6 +43,7 @@ #include "pluma-progress-message-area.h" #include "pluma-debug.h" #include "pluma-prefs-manager-app.h" +#include "pluma-prefs-manager-private.h" #include "pluma-enum-types.h" #define PLUMA_TAB_KEY "PLUMA_TAB_KEY" @@ -2603,7 +2604,6 @@ _pluma_tab_can_close (PlumaTab *tab) { PlumaDocument *doc; PlumaTabState ts; - GSettings *settings; g_return_val_if_fail (PLUMA_IS_TAB (tab), FALSE); @@ -2611,15 +2611,13 @@ _pluma_tab_can_close (PlumaTab *tab) doc = pluma_tab_get_document (tab); - settings = g_settings_new ("org.mate.pluma"); - /* if we are loading or reverting, the tab can be closed */ if ((ts == PLUMA_TAB_STATE_LOADING) || (ts == PLUMA_TAB_STATE_LOADING_ERROR) || (ts == PLUMA_TAB_STATE_REVERTING) || (ts == PLUMA_TAB_STATE_REVERTING_ERROR) || /* CHECK: I'm not sure this is the right behavior for REVERTING ERROR */ (!gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (doc))) || - (!g_settings_get_boolean (settings, "show-save-confirmation"))) + (!g_settings_get_boolean (pluma_prefs_manager->settings, "show-save-confirmation"))) return TRUE; /* Do not close tab with saving errors */ |