[gnome-mines/arnaudb/wip/gtk4: 6/36] Delay setting settings.



commit 66addd2a4e361c2f3c8299faf6fc08cf22b29328
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Apr 16 21:25:47 2020 +0200

    Delay setting settings.
    
    Settings could have been applied and
    not be anymore in the delayed state.

 src/gnome-mines.vala           | 2 +-
 src/theme-selector-dialog.vala | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 7b21941..b20c2e9 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -168,7 +168,6 @@ public class Mines : Gtk.Application
         Environment.set_application_name (_("Mines"));
 
         settings = new GLib.Settings ("org.gnome.Mines");
-        settings.delay ();
 
         if (game_mode != -1)
             settings.set_int (KEY_MODE, game_mode);
@@ -527,6 +526,7 @@ public class Mines : Gtk.Application
         base.shutdown ();
 
         /* Save window state */
+        settings.delay ();
         settings.set_int ("window-width", window_width);
         settings.set_int ("window-height", window_height);
         settings.set_boolean (KEY_USE_ANIMATIONS, Gtk.Settings.get_default ().gtk_enable_animations);
diff --git a/src/theme-selector-dialog.vala b/src/theme-selector-dialog.vala
index ad31e9b..7f5217c 100644
--- a/src/theme-selector-dialog.vala
+++ b/src/theme-selector-dialog.vala
@@ -153,7 +153,6 @@ public class ThemeSelectorDialog : Gtk.Dialog
     private void switch_theme_preview (int to_index, List<string> themes)
     {
         settings.set_string ("theme", themes.nth_data (to_index));
-        settings.apply ();
         this.queue_draw ();
         this.get_window ().invalidate_rect (null, true);
         this.present ();


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