Don't pass the header_list in GetMsgInfo, it's not needed
[modest] / src / modest-main.c
index ebfe628..563fe29 100644 (file)
@@ -37,7 +37,7 @@
 #include <widgets/modest-main-window.h>
 #include <string.h>
 
-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;