#include "prefs_account.h"
#include "compose.h"
#include "manage_window.h"
+#include "inc.h"
#include "gtkutils.h"
#include "utils.h"
#include "alertpanel.h"
static void account_set_default (void);
static void account_edit_close (void);
+static gint account_delete_event (GtkWidget *widget,
+ GdkEventAny *event,
+ gpointer data);
static void account_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer data);
void account_edit_open(void)
{
+ inc_autocheck_timer_remove();
+
if (compose_get_compose_list()) {
alertpanel_notice(_("Some composing windows are open.\n"
"Please close all the composing windows before editing the accounts."));
+ inc_autocheck_timer_set();
return;
}
PrefsAccount *ac_prefs;
ac_prefs = prefs_account_open(NULL);
+ inc_autocheck_timer_remove();
if (!ac_prefs) return;
gtk_window_set_title (GTK_WINDOW (window), _("Edit accounts"));
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
- GTK_SIGNAL_FUNC (account_edit_close), NULL);
+ GTK_SIGNAL_FUNC (account_delete_event), NULL);
gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
GTK_SIGNAL_FUNC (account_key_pressed), NULL);
gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
Xstrdup_a(ac_name, ac_prefs->account_name, return);
prefs_account_open(ac_prefs);
+ inc_autocheck_timer_remove();
if (!prev_default && ac_prefs->is_default)
account_set_as_default(ac_prefs);
main_window_reflect_prefs_all();
gtk_widget_hide(edit_account.window);
+
+ inc_autocheck_timer_set();
+}
+
+static gint account_delete_event(GtkWidget *widget, GdkEventAny *event,
+ gpointer data)
+{
+ account_edit_close();
+ return TRUE;
}
static void account_key_pressed(GtkWidget *widget, GdkEventKey *event,