diff options
author | vanadiae <vanadiae35@gmail.com> | 2020-12-22 23:04:57 +0100 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2021-01-11 09:48:46 +0000 |
commit | ff0e69a7dedfa49099621b3774a4497a1e57a564 (patch) | |
tree | fe200e2e9f8f9cb308d08b69b1f4b6ceb028e326 /src | |
parent | 01f01d01eedb8d3024e1c6c3e30819025782bfb9 (diff) | |
download | epiphany-ff0e69a7dedfa49099621b3774a4497a1e57a564.tar.gz |
prefs-dialog: Only save settings when closing the dialog
Currently, each time a modification is made the settings are written to
the disk.
But it isn't really needed to do it for each changes, saving only once
when closing the preferences is enough. This saves a lot of disk writes
when doing several changes for the same setting (like changing the name
of a search engine).
Diffstat (limited to 'src')
-rw-r--r-- | src/preferences/ephy-prefs-dialog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/preferences/ephy-prefs-dialog.c b/src/preferences/ephy-prefs-dialog.c index 7efddfe52..6089b0860 100644 --- a/src/preferences/ephy-prefs-dialog.c +++ b/src/preferences/ephy-prefs-dialog.c @@ -27,6 +27,7 @@ #include "ephy-embed-utils.h" #include "ephy-gui.h" #include "ephy-prefs-dialog.h" +#include "ephy-settings.h" #include "passwords-view.h" #include "prefs-general-page.h" @@ -60,6 +61,7 @@ on_delete_event (EphyPrefsDialog *prefs_dialog) { prefs_general_page_on_pd_delete_event (prefs_dialog->general_page); gtk_widget_destroy (GTK_WIDGET (prefs_dialog)); + g_settings_apply (EPHY_SETTINGS_MAIN); } static void @@ -131,4 +133,6 @@ ephy_prefs_dialog_init (EphyPrefsDialog *dialog) gtk_window_set_icon_name (GTK_WINDOW (dialog), APPLICATION_ID); ephy_gui_ensure_window_group (GTK_WINDOW (dialog)); + + g_settings_delay (EPHY_SETTINGS_MAIN); } |