sync with sylpheed 0.4.66cvs6
[claws.git] / src / export.c
index 7020806cc350b4cdf8df30833ab4f085074f685f..37586f52997eb3f032271dd53a92dcc026cfdc57 100644 (file)
@@ -62,6 +62,7 @@ static void export_ok_cb(GtkWidget *widget, gpointer data);
 static void export_cancel_cb(GtkWidget *widget, gpointer data);
 static void export_srcsel_cb(GtkWidget *widget, gpointer data);
 static void export_filesel_cb(GtkWidget *widget, gpointer data);
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 gint export_mbox(FolderItem *default_src)
@@ -124,7 +125,7 @@ static void export_create(void)
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                          GTK_SIGNAL_FUNC(export_cancel_cb), NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
@@ -227,6 +228,12 @@ static void export_srcsel_cb(GtkWidget *widget, gpointer data)
                gtk_entry_set_text(GTK_ENTRY(src_entry), src->path);
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       export_cancel_cb(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)