2006-07-08 [colin] 2.3.1cvs74
[claws.git] / src / main.c
index db35939c6462fd97e978511d879d27405c3b36dc..43b722ee847da05b31c18c5f06bf6c8b1601fd5c 100644 (file)
@@ -348,6 +348,26 @@ int main(int argc, char *argv[])
                g_error(_("g_thread is not supported by glib.\n"));
        }
 
+       /* check that we're not on a too recent/old gtk+ */
+#if GTK_CHECK_VERSION(2, 9, 0)
+       if (gtk_check_version(2, 9, 0) != NULL) {
+               alertpanel_error(_("Sylpheed-Claws has been compiled with "
+                                  "a more recent GTK+ library than is "
+                                  "currently available. This will cause "
+                                  "crashes. Please upgrade GTK+ or recompile "
+                                  "Sylpheed-Claws."));
+               exit(1);
+       }
+#else
+       if (gtk_check_version(2, 9, 0) == NULL) {
+               alertpanel_error(_("Sylpheed-Claws has been compiled with "
+                                  "an an older GTK+ library than is "
+                                  "currently available. This will cause "
+                                  "crashes. Please recompile "
+                                  "Sylpheed-Claws."));
+               exit(1);
+       }
+#endif 
        /* parse gtkrc files */
        userrc = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".gtkrc-2.0",
                             NULL);
@@ -447,6 +467,7 @@ int main(int argc, char *argv[])
                
        mainwin = main_window_create
                (prefs_common.sep_folder | prefs_common.sep_msg << 1);
+       manage_window_focus_in(mainwin->window, NULL, NULL);
        folderview = mainwin->folderview;
 
        gtk_clist_freeze(GTK_CLIST(mainwin->folderview->ctree));
@@ -494,6 +515,7 @@ int main(int argc, char *argv[])
 
        /* if Sylpheed crashed, rebuild caches */
        if (!cmd.crash && crash_file_present) {
+               GTK_EVENTS_FLUSH();
                debug_print("Sylpheed-Claws crashed, checking for new messages in local folders\n");
                folder_item_update_thaw();
                folderview_check_new(NULL);
@@ -535,12 +557,17 @@ int main(int argc, char *argv[])
        }
        
        if (plugin_get_unloaded_list() != NULL) {
+               main_window_cursor_normal(mainwin);
                alertpanel_warning(_("Some plugin(s) failed to load. "
                                     "Check the Plugins configuration "
                                     "for more information."));
+               main_window_cursor_wait(mainwin);
        }
-       
+
+       plugin_load_standard_plugins ();
+       
        if (!folder_have_mailbox()) {
+               main_window_cursor_normal(mainwin);
                alertpanel_error(_("Sylpheed-Claws has detected a configured "
                                   "mailbox, but could not load it. It is "
                                   "probably provided by an out-of-date "