From 636317d3a64a4077a3f663861fce05b1d84c21e0 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Wed, 8 Sep 2004 19:26:36 +0000 Subject: [PATCH] Fix a minor bug only with GTK2.4: if have a problem while saving a file (e.g. filename already exists) will lead to an unresponding file dialog. The fix will close the dialog, which isn't the best solution, but I don't see a better one. svn path=/trunk/; revision=11943 --- gtk/file_dlg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/file_dlg.c b/gtk/file_dlg.c index da570fe763..d93f402652 100644 --- a/gtk/file_dlg.c +++ b/gtk/file_dlg.c @@ -1395,7 +1395,15 @@ file_save_as_ok_cb(GtkWidget *w _U_, gpointer fs) { 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 + /* 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)); +#else gtk_widget_show(GTK_WIDGET (fs)); +#endif return; }