From bb5ca9934af5fe36dcc3598a9e2441eed91fec92 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 20 Apr 2008 15:58:08 +0000 Subject: [PATCH] In the 'open > recent files' menu entry, only show files which still exist. Previously, I was saving documents into /tmp, then rebooting. /tmp had been emptied, but the files were still showing up in the menu. git-svn-id: http://svn.voria.com/code@2025 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/app.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 4728423..217174e 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1624,10 +1624,13 @@ App::load_settings() { if(!window_size_broken && !file_window_size) window_size_broken = true; - if(!window_size_broken) - add_recent_file(recent_file,recent_file_window_size); - else - add_recent_file(recent_file); + if (std::ifstream(recent_file.c_str())) + { + if(!window_size_broken) + add_recent_file(recent_file,recent_file_window_size); + else + add_recent_file(recent_file); + } } } if(!window_size_broken && file_window_size) -- 2.7.4