Only use shutdown timeout in prestart mode.
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 25 May 2009 09:07:32 +0000 (11:07 +0200)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 25 May 2009 11:07:10 +0000 (13:07 +0200)
* src/modest-main.c: disable shutdown timeout by default.
* src/hildon2/modest.desktop.in: set a shutdown timeout for hildon 2.2
  .desktop (this way it will work for prestarted mode).

src/hildon2/modest.desktop.in
src/modest-main.c

index 0ed12b2..5405f4e 100644 (file)
@@ -4,7 +4,7 @@ Version=@PACKAGE_VERSION@
 Type=Application
 Name=mcen_ap_name
 Comment=mcen_ap_name_thumb
-Exec=@prefix@/bin/modest
+Exec=@prefix@/bin/modest -t 30
 X-Text-Domain=modest
 
 X-Osso-Service=com.nokia.modest
index f7bdf96..6165b45 100644 (file)
@@ -37,7 +37,7 @@
 #include "modest-ui-actions.h"
 
 static gboolean show_ui = FALSE;
-static gint shutdown_timeout = 30;
+static gint shutdown_timeout = 0;
 static GOptionEntry option_entries [] =
 {
        { "show-ui", 's', 0, G_OPTION_ARG_NONE, &show_ui, "Show UI immediately, so no wait for DBUS activation", NULL },
@@ -232,8 +232,10 @@ main (int argc, char *argv[])
                /* Remove new mail notifications if exist */
                modest_platform_remove_new_mail_notifications (FALSE);
        } else {
-               modest_runtime_set_allow_shutdown (FALSE);
-               shutdown_timeout_id = g_timeout_add_seconds (shutdown_timeout * 60, shutdown_timeout_handler, NULL);
+               if (shutdown_timeout > 0) {
+                       modest_runtime_set_allow_shutdown (FALSE);
+                       shutdown_timeout_id = g_timeout_add_seconds (shutdown_timeout * 60, shutdown_timeout_handler, NULL);
+               }
        }
 
        gtk_main ();