From fea9cf6f2c8f608c8e2edb38244b2235f1f66766 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Mon, 25 May 2009 11:07:32 +0200 Subject: [PATCH] Only use shutdown timeout in prestart mode. * 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 | 2 +- src/modest-main.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hildon2/modest.desktop.in b/src/hildon2/modest.desktop.in index 0ed12b2..5405f4e 100644 --- a/src/hildon2/modest.desktop.in +++ b/src/hildon2/modest.desktop.in @@ -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 diff --git a/src/modest-main.c b/src/modest-main.c index f7bdf96..6165b45 100644 --- a/src/modest-main.c +++ b/src/modest-main.c @@ -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 (); -- 1.7.9.5