sync with sylpheed 0.4.66cvs6
[claws.git] / src / prefs_account.c
index f835032f26338a3ad7fd1daf89cb1b7dc148146c..fc7ef416d967f9e65ffe5e449fbc35c2a4c02a40 100644 (file)
@@ -314,6 +314,9 @@ static void prefs_account_privacy_create    (void);
 #endif /* USE_GPGME */
 static void prefs_account_advanced_create      (void);
 
+static gint prefs_account_deleted              (GtkWidget      *widget,
+                                                GdkEventAny    *event,
+                                                gpointer        data);
 static void prefs_account_key_pressed          (GtkWidget      *widget,
                                                 GdkEventKey    *event,
                                                 gpointer        data);
@@ -501,7 +504,7 @@ static void prefs_account_create(void)
        /* create dialog */
        prefs_dialog_create(&dialog);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "delete_event",
-                          GTK_SIGNAL_FUNC(prefs_account_cancel), NULL);
+                          GTK_SIGNAL_FUNC(prefs_account_deleted), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "key_press_event",
                           GTK_SIGNAL_FUNC(prefs_account_key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "focus_in_event",
@@ -1204,6 +1207,13 @@ static void prefs_account_advanced_create(void)
        advanced.domain_entry           = entry_domain;
 }
 
+static gint prefs_account_deleted(GtkWidget *widget, GdkEventAny *event,
+                                 gpointer data)
+{
+       prefs_account_cancel();
+       return TRUE;
+}
+
 static void prefs_account_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                      gpointer data)
 {