[Xfce4-commits] <ristretto:master> Remove image from recently-used list on error

Stephan Arts noreply at xfce.org
Sun Oct 2 11:52:01 CEST 2011


Updating branch refs/heads/master
         to 36d60df2c7ed7822a2e3110705e94edaa5b97e95 (commit)
       from d4269f415a7f3faf33e5feacf06ae2b4c1e0aa73 (commit)

commit 36d60df2c7ed7822a2e3110705e94edaa5b97e95
Author: Stephan Arts <stephan at xfce.org>
Date:   Sun Oct 2 10:54:03 2011 +0200

    Remove image from recently-used list on error

 src/main_window.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index 0c6671a..2efa57d 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -2295,6 +2295,14 @@ cb_rstto_main_window_open_recent(GtkRecentChooser *chooser, RsttoMainWindow *win
                                         _("Could not open file"));
         gtk_dialog_run (GTK_DIALOG (err_dialog));
         gtk_widget_destroy (err_dialog);
+
+        /* Something is wrong with the file (perhaps it was removed?),
+         * remove the item from the recently-used list.
+         */
+        gtk_recent_manager_remove_item (
+                window->priv->recent_manager,
+                uri,
+                NULL);
     }
 
     rstto_main_window_update_buttons (window);


More information about the Xfce4-commits mailing list