diff options
author | mbkma <[email protected]> | 2020-07-07 15:57:46 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-29 16:47:54 +0200 |
commit | 2edb465b646f671f3372c70f020bd3d3076e86ad (patch) | |
tree | 0203909db2933fef2bff19084b67ae8f4ccfef19 /pluma/pluma-io-error-message-area.c | |
parent | 8f02e21f3703c9549fb357986f77c9534186f2ab (diff) | |
download | pluma-2edb465b646f671f3372c70f020bd3d3076e86ad.tar.bz2 pluma-2edb465b646f671f3372c70f020bd3d3076e86ad.tar.xz |
Port main program to GSettings
Remove pluma_prefs_manager.
Plugins were already ported to GSettings.
Based on: https://gitlab.gnome.org/GNOME/gedit/-/commit/4215be0e8924f45170683493beaa2695e8e2e483
Diffstat (limited to 'pluma/pluma-io-error-message-area.c')
-rw-r--r-- | pluma/pluma-io-error-message-area.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pluma/pluma-io-error-message-area.c b/pluma/pluma-io-error-message-area.c index 937bc880..846cb0e8 100644 --- a/pluma/pluma-io-error-message-area.c +++ b/pluma/pluma-io-error-message-area.c @@ -42,10 +42,10 @@ #include <glib/gi18n.h> #include <gio/gio.h> +#include "pluma-settings.h" #include "pluma-utils.h" #include "pluma-document.h" #include "pluma-io-error-message-area.h" -#include "pluma-prefs-manager.h" #include <pluma/pluma-encodings-combo-box.h> #define MAX_URI_IN_DIALOG_LENGTH 50 @@ -933,6 +933,8 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri, gchar *full_formatted_uri; gchar *uri_for_display; gchar *temp_uri_for_display; + gboolean create_backup_copy; + GSettings *editor_settings; g_return_val_if_fail (uri != NULL, NULL); g_return_val_if_fail (error != NULL, NULL); @@ -976,9 +978,14 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri, vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0); - // FIXME: review this messages + editor_settings = g_settings_new (PLUMA_SCHEMA_ID); + + create_backup_copy = g_settings_get_boolean (editor_settings, + PLUMA_SETTINGS_CREATE_BACKUP_COPY); + g_object_unref (editor_settings); - if (pluma_prefs_manager_get_create_backup_copy ()) + // FIXME: review this messages + if (create_backup_copy) primary_text = g_strdup_printf (_("Could not create a backup file while saving %s"), uri_for_display); else |