*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
{
while(gtk_events_pending())
gtk_main_iteration();
+ usleep(50000);
+}
+
+gboolean defer_check_all(void *data)
+{
+ gboolean autochk = GPOINTER_TO_INT(data);
+
+ inc_all_account_mail(static_mainwindow, autochk,
+ prefs_common.newmail_notify_manu);
+
+ return FALSE;
+}
+
+gboolean defer_check(void *data)
+{
+ inc_mail(static_mainwindow, prefs_common.newmail_notify_manu);
+
+ return FALSE;
}
int main(int argc, char *argv[])
gtk_window_set_default_icon(icon);
folderview_initialize();
+
mh_gtk_init();
imap_gtk_init();
news_gtk_init();
(prefs_common.sep_folder | prefs_common.sep_msg << 1);
folderview = mainwin->folderview;
+ gtk_clist_freeze(GTK_CLIST(mainwin->folderview->ctree));
+ folder_item_update_freeze();
+
/* register the callback of unix domain socket input */
#ifdef G_OS_UNIX
lock_socket_tag = gdk_input_add(lock_socket,
/* make one all-folder processing before using sylpheed */
main_window_cursor_wait(mainwin);
folder_func_to_all_folders(initial_processing, (gpointer *)mainwin);
- main_window_cursor_normal(mainwin);
/* if Sylpheed crashed, rebuild caches */
if (!cmd.crash && crash_file_present) {
#ifdef HAVE_STARTUP_NOTIFICATION
startup_notification_complete(FALSE);
#endif
+ folder_item_update_thaw();
+ gtk_clist_thaw(GTK_CLIST(mainwin->folderview->ctree));
+ main_window_cursor_normal(mainwin);
if (cmd.receive_all)
- inc_all_account_mail(mainwin, FALSE,
- prefs_common.newmail_notify_manu);
+ g_timeout_add(1000, defer_check_all, GINT_TO_POINTER(FALSE));
else if (prefs_common.chk_on_startup)
- inc_all_account_mail(mainwin, TRUE,
- prefs_common.newmail_notify_manu);
+ g_timeout_add(1000, defer_check_all, GINT_TO_POINTER(TRUE));
else if (cmd.receive)
- inc_mail(mainwin, prefs_common.newmail_notify_manu);
+ g_timeout_add(1000, defer_check, NULL);
else
gtk_widget_grab_focus(folderview->ctree);
void app_will_exit(GtkWidget *widget, gpointer data)
{
MainWindow *mainwin = data;
-
+
if (compose_get_compose_list()) {
gint val = alertpanel(_("Really quit?"),
_("Composing message exists."),
- _("Draft them"), _("Discard them"), _("Don't quit"));
+ _("_Save to Draft"), _("_Discard them"), _("Do_n't quit"));
switch (val) {
case G_ALERTOTHER:
return;
default:
draft_all_messages();
}
-
+
manage_window_focus_in(mainwin->window, NULL, NULL);
}