* Added support to reload a msg when the device gets online
[modest] / src / modest-main.c
index df5de2c..2f85ae8 100644 (file)
@@ -105,6 +105,7 @@ main (int argc, char *argv[])
 
        g_type_init ();         
        g_thread_init (NULL);
+       gdk_threads_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, options, NULL);
@@ -181,15 +182,13 @@ start_ui (const gchar* mailto, const gchar *cc, const gchar *bcc,
 /*                                             subject,    /\* subject *\/ */
 /*                                             body,    /\* body *\/ */
 /*                                             NULL);   /\* attachments *\/ */
-       } else
-#ifndef OLD_UI_STUFF
-       win = modest_ui_main_window (modest_ui);
-       gtk_widget_show (win);
-#else
-       modest_ui_show_main_window (modest_ui);
-#endif
-       gtk_main();
+       } else 
+               win = modest_ui_main_window (modest_ui);
        
+       if (win) {
+               gtk_widget_show (win);
+               gtk_main();
+       }       
 cleanup:
        if (modest_ui)
                g_object_unref (modest_ui);
@@ -208,10 +207,8 @@ hildon_init ()
                osso_initialize(PACKAGE, PACKAGE_VERSION,
                                TRUE, NULL);    
        if (!osso_context) {
-               g_printerr ("modest: failed to aquire osso context, exiting\n");
-
+               g_printerr ("modest: failed to acquire osso context\n");
                return FALSE;
-               
        }
        
 #endif /* MODEST_PLATFORM_ID==2 */