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

Sync settings on exit

parent 11fbe0fe
......@@ -163,7 +163,6 @@ gedit_main (gboolean service)
{
GeditPluginsEngine *engine;
GeditApp *app;
gboolean restored = FALSE;
const gchar *dir;
gchar *icon_dir;
......@@ -185,19 +184,27 @@ gedit_main (gboolean service)
gedit_debug_message (DEBUG_APP, "Init session manager");
gedit_session_init ();
if (!service && gedit_session_is_restored ())
if (!service)
{
restored = gedit_session_load ();
}
gboolean restored = FALSE;
if (!service && !restored)
{
gedit_main_window ();
if (gedit_session_is_restored ())
{
restored = gedit_session_load ();
}
if (!restored)
{
gedit_main_window ();
}
}
gedit_debug_message (DEBUG_APP, "Start gtk-main");
gtk_main ();
/* Make sure settings are saved */
g_settings_sync ();
/* Cleanup */
g_object_unref (engine);
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