Commit 91beda81 authored by Paolo Borelli's avatar Paolo Borelli

Sync settings on exit

parent 11fbe0fe
...@@ -163,7 +163,6 @@ gedit_main (gboolean service) ...@@ -163,7 +163,6 @@ gedit_main (gboolean service)
{ {
GeditPluginsEngine *engine; GeditPluginsEngine *engine;
GeditApp *app; GeditApp *app;
gboolean restored = FALSE;
const gchar *dir; const gchar *dir;
gchar *icon_dir; gchar *icon_dir;
...@@ -185,19 +184,27 @@ gedit_main (gboolean service) ...@@ -185,19 +184,27 @@ gedit_main (gboolean service)
gedit_debug_message (DEBUG_APP, "Init session manager"); gedit_debug_message (DEBUG_APP, "Init session manager");
gedit_session_init (); gedit_session_init ();
if (!service && gedit_session_is_restored ()) if (!service)
{ {
restored = gedit_session_load (); gboolean restored = FALSE;
}
if (!service && !restored) if (gedit_session_is_restored ())
{ {
gedit_main_window (); restored = gedit_session_load ();
}
if (!restored)
{
gedit_main_window ();
}
} }
gedit_debug_message (DEBUG_APP, "Start gtk-main"); gedit_debug_message (DEBUG_APP, "Start gtk-main");
gtk_main (); gtk_main ();
/* Make sure settings are saved */
g_settings_sync ();
/* Cleanup */ /* Cleanup */
g_object_unref (engine); g_object_unref (engine);
g_object_unref (app); g_object_unref (app);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment