if (folder_read_list() < 0) {
if (!run_wizard(mainwin, TRUE))
exit(1);
+ main_window_reflect_prefs_all_now();
folder_write_list();
}
exit_sylpheed(mainwin);
}
+
+ toolbar_main_set_sensitive(mainwin);
+ main_window_set_menu_sensitive(mainwin);
+
main_window_popup(mainwin);
#ifdef HAVE_LIBETPAN
folder_item_write_cache(item);
}
+static gboolean sc_exiting = FALSE;
+
static void exit_sylpheed(MainWindow *mainwin)
{
gchar *filename;
+ sc_exiting = TRUE;
+
debug_print("shutting down\n");
inc_autocheck_timer_remove();
{
MainWindow *mainwin = data;
+ if (sc_exiting == TRUE) {
+ debug_print("exit pending\n");
+ return;
+ }
+ sc_exiting = TRUE;
+ debug_print("exiting\n");
if (compose_get_compose_list()) {
gint val = alertpanel(_("Really quit?"),
_("Composing message exists."),
_("_Save to Draft"), _("_Discard them"), _("Do_n't quit"));
switch (val) {
case G_ALERTOTHER:
+ sc_exiting = FALSE;
return;
case G_ALERTALTERNATE:
break;
_("Some unsent messages are queued. Exit now?"),
GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL)
!= G_ALERTALTERNATE) {
+ sc_exiting = FALSE;
return;
}
manage_window_focus_in(mainwin->window, NULL, NULL);
gtk_main_quit();
}
+gboolean sylpheed_is_exiting(void)
+{
+ return sc_exiting;
+}
+
/*
* CLAWS: want this public so crash dialog can delete the
* lock file too