diff options
-rw-r--r-- | shell/main.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/shell/main.c b/shell/main.c index 32df7b3c5f..9b03c7c4cc 100644 --- a/shell/main.c +++ b/shell/main.c @@ -421,26 +421,32 @@ create_default_shell (void) EShell *shell; GConfClient *client; gboolean online = TRUE; + const gchar *key; GError *error = NULL; client = gconf_client_get_default (); + key = "/apps/evolution/shell/start_offline"; - if (start_online) + /* Requesting online or offline mode from the command-line + * should be persistent, just like selecting it in the UI. */ + + if (start_online) { online = TRUE; - else if (start_offline) + gconf_client_set_bool (client, key, FALSE, &error); + } else if (start_offline) { online = FALSE; - else { - const gchar *key; + gconf_client_set_bool (client, key, TRUE, &error); + } else { gboolean value; - key = "/apps/evolution/shell/start_offline"; value = gconf_client_get_bool (client, key, &error); if (error == NULL) online = !value; - else { - g_warning ("%s", error->message); - g_error_free (error); - } + } + + if (error != NULL) { + g_warning ("%s", error->message); + g_error_free (error); } shell = g_object_new ( |