From: dooglus Date: Sun, 20 Apr 2008 15:58:08 +0000 (+0000) Subject: In the 'open > recent files' menu entry, only show files which still exist. Previous... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bb5ca9934af5fe36dcc3598a9e2441eed91fec92;p=synfig.git 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 --- 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)