From 013fd44c1e6f4941d7efd22bca75d8a9fd1353b2 Mon Sep 17 00:00:00 2001 From: Crispin Flowerday Date: Sat, 21 Jan 2006 19:14:36 +0000 Subject: Fix bookmark exporting, so that it can be cancelled. Fixes bug #327438 2006-01-21 Crispin Flowerday * src/bookmarks/ephy-bookmarks-editor.c (cmd_bookmarks_export): Fix bookmark exporting, so that it can be cancelled. Fixes bug #327438 --- src/bookmarks/ephy-bookmarks-editor.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/bookmarks/ephy-bookmarks-editor.c') diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 35841772f..9d0a3bb22 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -708,6 +708,12 @@ cmd_bookmarks_export (GtkAction *action, response = gtk_dialog_run (GTK_DIALOG (dialog)); + if (response != GTK_RESPONSE_ACCEPT) + { + gtk_widget_destroy (dialog); + return; + } + format = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); basename = g_path_get_basename (filename); @@ -727,10 +733,7 @@ cmd_bookmarks_export (GtkAction *action, } g_free (basename); } - while (response == GTK_RESPONSE_ACCEPT - && !ephy_gui_check_location_writable (GTK_WIDGET (dialog), filename)); - - gtk_widget_destroy (dialog); + while (!ephy_gui_check_location_writable (GTK_WIDGET (dialog), filename)); /* 0 for ephy RDF format, 1 for mozilla HTML format */ -- cgit v1.2.3