Updating branch refs/heads/master
         to cda920d515e925ecd15e426f031ba650f0e9af4a (commit)
       from aad58da05ab7d1b3d8b60dc00e843ad5d834ceb7 (commit)

commit cda920d515e925ecd15e426f031ba650f0e9af4a
Author: Stephan Arts <[email protected]>
Date:   Sun Aug 14 13:46:28 2011 +0200

    Make sure the cancel button cancels

 src/main_window.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index b227b97..8846a10 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -2059,6 +2059,11 @@ cb_rstto_main_window_open_image (GtkWidget *widget, 
RsttoMainWindow *window)
                     gtk_dialog_run(GTK_DIALOG(dialog));
                     gtk_widget_destroy(dialog);
                 }
+                else
+                {
+                    g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) 
rstto_main_window_add_file_to_recent_files, file, NULL);
+
+                }
 
                 _files_iter = g_slist_next (_files_iter);
             }
@@ -2534,12 +2539,13 @@ cb_rstto_main_window_clear_private_data (GtkWidget 
*widget, RsttoMainWindow *win
     gtk_recent_filter_add_application (recent_filter, "ristretto");
     gtk_recent_chooser_add_filter(GTK_RECENT_CHOOSER(dialog), recent_filter);
 
-    gtk_dialog_run (GTK_DIALOG (dialog));
-
-    uris = gtk_recent_chooser_get_uris (GTK_RECENT_CHOOSER(dialog), &n_uris);
-    for (i = 0; i < n_uris; ++i)
+    if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
     {
-        gtk_recent_manager_remove_item (window->priv->recent_manager, uris[i], 
NULL);
+        uris = gtk_recent_chooser_get_uris (GTK_RECENT_CHOOSER(dialog), 
&n_uris);
+        for (i = 0; i < n_uris; ++i)
+        {
+            gtk_recent_manager_remove_item (window->priv->recent_manager, 
uris[i], NULL);
+        }
     }
 
     gtk_widget_destroy (dialog);
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to