X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodest-main.c;h=563fe2992bd3ea32e68f3442a111bc19293251ad;hb=ab8f1b74bd81753cf93ec2d1664dc2d101ee2267;hp=ebfe628fc0660cc34f41f0e613148487daf7f437;hpb=71ee02905c83ab1eb1f0b4236384cdcc9ed2c8a3;p=modest diff --git a/src/modest-main.c b/src/modest-main.c index ebfe628..563fe29 100644 --- a/src/modest-main.c +++ b/src/modest-main.c @@ -37,7 +37,7 @@ #include #include -static gboolean + static gboolean on_idle_exit_modest (gpointer data) { /* Protect the Gtk calls */ @@ -90,6 +90,10 @@ main (int argc, char *argv[]) if (strcmp (argv[1], "showui") == 0) show_ui_without_top_application_method = TRUE; } + + if (!show_ui_without_top_application_method) { + g_print ("modest: use 'modest showui' to start from cmdline with UI\n"); + } if (!g_thread_supported()) g_thread_init (NULL); @@ -97,6 +101,12 @@ main (int argc, char *argv[]) gdk_threads_init (); gdk_threads_enter (); + if (!getenv("DISPLAY")) { + g_printerr ("modest: DISPLAY env variable is not set\n"); + retval = 1; + goto cleanup; + } + if (!gtk_init_check (&argc, &argv)) { g_printerr ("modest: failed to initialize gtk\n"); retval = 1; @@ -141,7 +151,7 @@ main (int argc, char *argv[]) gtk_widget_show_all (GTK_WIDGET(main_win)); /* Remove new mail notifications if exist */ - modest_platform_remove_new_mail_notifications (); + modest_platform_remove_new_mail_notifications (FALSE); } gtk_main (); @@ -149,9 +159,6 @@ main (int argc, char *argv[]) cleanup: gdk_threads_leave (); - /* Remove new mail notifications if exist */ -/* modest_platform_remove_new_mail_notifications (); */ - if (!modest_init_uninit ()) { g_printerr ("modest: modest_init_uninit failed\n"); retval = 1;