[gimp] Issue #4827 - Modified settings requiring a restart aren't saved
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #4827 - Modified settings requiring a restart aren't saved
- Date: Thu, 19 Mar 2020 10:40:51 +0000 (UTC)
commit ee2a65af0d74fef759850b7cb744870170fa255a
Author: Ell <ell_se yahoo com>
Date: Thu Mar 19 12:27:51 2020 +0200
Issue #4827 - Modified settings requiring a restart aren't saved
When checking for updates, write the new timestamp and version info
to Gimp::edit_config, instead of Gimp::config, and rely on its
auto-save mechanism to save the changes, in order to avoid having
to save Gimp::config on exit, which overrides modified settings
that require a restart, such as the UI language, as they are only
reflected in Gimp::edit_config.
This fixes the bug, but can cause the new update info to be
discarded if the Preferences dialog is open while checking for
updates, and is subsequently canceled. Ideally, the update info
should live in a separate file, rather than in gimprc.
app/app.c | 15 +++++----------
app/dialogs/dialogs-constructors.c | 2 +-
2 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/app/app.c b/app/app.c
index 903aacbb24..a93b3b1fe0 100644
--- a/app/app.c
+++ b/app/app.c
@@ -197,7 +197,6 @@ app_run (const gchar *full_prog_name,
GimpLangRc *temprc;
gchar *language = NULL;
GError *font_error = NULL;
- gboolean save_gimprc_at_exit = FALSE;
if (filenames && filenames[0] && ! filenames[1] &&
g_file_test (filenames[0], G_FILE_TEST_IS_DIR))
@@ -288,12 +287,6 @@ app_run (const gchar *full_prog_name,
gimp_load_config (gimp, alternate_system_gimprc, alternate_gimprc);
- /* We usually only save gimprc when Preferences are edited.
- * Thus we have to add a special flag when we make an update
- * check so that the timestamp is saved.
- */
- save_gimprc_at_exit = gimp_update_auto_check (gimp->config);
-
/* Initialize the error handling after creating/migrating the config
* directory because it will create some folders for backup and crash
* logs in advance. Therefore running this before
@@ -347,6 +340,11 @@ app_run (const gchar *full_prog_name,
*/
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
+ /* check for updates *after* enabling config autosave, so that the timestamp
+ * is saved
+ */
+ gimp_update_auto_check (gimp->edit_config);
+
loop = run_loop = g_main_loop_new (NULL, FALSE);
g_signal_connect_after (gimp, "exit",
@@ -444,9 +442,6 @@ app_run (const gchar *full_prog_name,
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
- if (save_gimprc_at_exit)
- gimp_rc_save (GIMP_RC (gimp->config));
-
g_main_loop_unref (loop);
gimp_gegl_exit (gimp);
diff --git a/app/dialogs/dialogs-constructors.c b/app/dialogs/dialogs-constructors.c
index 06ba9a4704..a64451decc 100644
--- a/app/dialogs/dialogs-constructors.c
+++ b/app/dialogs/dialogs-constructors.c
@@ -205,7 +205,7 @@ dialogs_about_get (GimpDialogFactory *factory,
GimpUIManager *ui_manager,
gint view_size)
{
- return about_dialog_create (context->gimp->config);
+ return about_dialog_create (context->gimp->edit_config);
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]