Don't save config file on state related property changes
This commit is contained in:
parent
503ed3ac94
commit
e272fc04f2
1 changed files with 8 additions and 1 deletions
|
@ -596,8 +596,15 @@ settings_notify_cb (MidoriWebSettings* settings,
|
||||||
GParamSpec* pspec,
|
GParamSpec* pspec,
|
||||||
MidoriApp* app)
|
MidoriApp* app)
|
||||||
{
|
{
|
||||||
gchar* config_file = build_config_filename ("config");
|
|
||||||
GError* error = NULL;
|
GError* error = NULL;
|
||||||
|
gchar* config_file;
|
||||||
|
|
||||||
|
/* Skip state related properties to avoid disk IO */
|
||||||
|
if (g_str_has_prefix (pspec->name, "last-window-")
|
||||||
|
|| g_str_has_prefix (pspec->name, "last-panel-"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
config_file = build_config_filename ("config");
|
||||||
if (!settings_save_to_file (settings, app, config_file, &error))
|
if (!settings_save_to_file (settings, app, config_file, &error))
|
||||||
{
|
{
|
||||||
g_warning (_("The configuration couldn't be saved. %s"), error->message);
|
g_warning (_("The configuration couldn't be saved. %s"), error->message);
|
||||||
|
|
Loading…
Reference in a new issue