aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_file_dlg.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-26 17:04:49 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-26 17:04:49 +0000
commit57ab05545cd46ba505b15d881a5bdb387438e5ca (patch)
tree635ef523ff85909aae7f59c3a2ff1cadcb21c0cb /gtk/capture_file_dlg.c
parentdce0761a4a1792ca381b44e992ddc93e9950d290 (diff)
Also destroy the window when failure to export/import color filters.
svn path=/trunk/; revision=24204
Diffstat (limited to 'gtk/capture_file_dlg.c')
-rw-r--r--gtk/capture_file_dlg.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk/capture_file_dlg.c b/gtk/capture_file_dlg.c
index 54fd33f22f..51e8e34c0f 100644
--- a/gtk/capture_file_dlg.c
+++ b/gtk/capture_file_dlg.c
@@ -1758,6 +1758,13 @@ file_color_import_ok_cb(GtkWidget *w, gpointer color_filters) {
dismiss the alert box popped up for the open error,
try again. */
g_free(cf_name);
+#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
+ /* XXX - as we cannot start a new event loop (using gtk_dialog_run()),
+ * as this will prevent the user from closing the now existing error
+ * message, simply close the dialog (this is the best we can do here). */
+ if (file_save_as_w)
+ window_destroy(GTK_WIDGET (fs));
+#endif
return;
}
@@ -1914,8 +1921,14 @@ file_color_export_ok_cb(GtkWidget *w, gpointer filter_list) {
/* The write failed; don't dismiss the open dialog box,
just leave it around so that the user can, after they
dismiss the alert box popped up for the error, try again. */
-
g_free(cf_name);
+#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
+ /* XXX - as we cannot start a new event loop (using gtk_dialog_run()),
+ * as this will prevent the user from closing the now existing error
+ * message, simply close the dialog (this is the best we can do here). */
+ if (file_save_as_w)
+ window_destroy(GTK_WIDGET (fs));
+#endif
return;
}