2006-02-12 [colin] 2.0.0cvs45
[claws.git] / src / main.c
index 21f5bf70361499c7abd6de91a1a76baa1b43ce58..324a9d6c2f89d922bdd4f3b8c229235054ea340b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -261,7 +261,7 @@ static gboolean migrate_old_config(const gchar *old_cfg_dir, const gchar *new_cf
        GtkWidget *window = NULL;
        if (alertpanel(_("Migration of configuration"),
                       message,
-                      GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
+                      GTK_STOCK_NO, GTK_STOCK_YES, NULL) != G_ALERTALTERNATE)
                return FALSE;
        
        window = label_window_create(_("Copying configuration..."));
@@ -521,6 +521,15 @@ int main(int argc, char *argv[])
 
        plugin_load_all("GTK2");
        
+       if (!folder_have_mailbox()) {
+               alertpanel_error(_("Sylpheed-Claws has detected a configured "
+                                  "mailbox, but could not load it. It is "
+                                  "probably provided by an out-of-date "
+                                  "external plugin. Please reinstall the "
+                                  "plugin and try again."));
+               exit(1);
+       }
+       
        static_mainwindow = mainwin;
 
 #ifdef HAVE_STARTUP_NOTIFICATION
@@ -614,7 +623,7 @@ static void exit_sylpheed(MainWindow *mainwin)
 
        lock_socket_remove();
 
-       main_window_destroy(mainwin);
+       main_window_destroy_all();
        
        plugin_unload_all("GTK2");
 
@@ -882,8 +891,8 @@ void app_will_exit(GtkWidget *widget, gpointer data)
        if (prefs_common.warn_queued_on_exit && get_queued_message_num() > 0) {
                if (alertpanel(_("Queued messages"),
                               _("Some unsent messages are queued. Exit now?"),
-                              GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
-                   != G_ALERTDEFAULT)
+                              GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL)
+                   != G_ALERTALTERNATE)
                        return;
                manage_window_focus_in(mainwin->window, NULL, NULL);
        }