sync with sylpheed 0.4.66cvs6
[claws.git] / src / filesel.c
index 27093fc55d3956a0d2394d06317c41ba70a74546..1dd1500a06821007f1c42bc7fb0b9f752687e0bc 100644 (file)
@@ -35,6 +35,7 @@ static gboolean filesel_ack;
 static void filesel_create(const gchar *title);
 static void filesel_ok_cb(GtkWidget *widget, gpointer data);
 static void filesel_cancel_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);
 
 gchar *filesel_select_file(const gchar *title, const gchar *file)
@@ -98,7 +99,7 @@ static void filesel_create(const gchar *title)
                 "clicked", GTK_SIGNAL_FUNC(filesel_cancel_cb),
                 NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "delete_event",
-                          GTK_SIGNAL_FUNC(filesel_cancel_cb),
+                          GTK_SIGNAL_FUNC(delete_event),
                           NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
@@ -122,6 +123,12 @@ static void filesel_cancel_cb(GtkWidget *widget, gpointer data)
        gtk_main_quit();
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       filesel_cancel_cb(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)