summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-29 07:38:01 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-29 07:38:01 +0000
commit89c1a88dc87497470f5b5877b6abcc58d7a56117 (patch)
treecb5b67e50de4811f4bc06e2fda935f625b4fcd6d /utils
parent5106d938c65447a6bedf8e0409a57d19a08d6ac1 (diff)
downloadrockbox-89c1a88dc87497470f5b5877b6abcc58d7a56117.tar.gz
rockbox-89c1a88dc87497470f5b5877b6abcc58d7a56117.tar.bz2
rockbox-89c1a88dc87497470f5b5877b6abcc58d7a56117.zip
Theme Editor: Recent documents/projects that no longer exist are now cleared from the menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27611 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-rw-r--r--utils/themeeditor/gui/editorwindow.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp
index f76fd8e88b..6bc40fbff6 100644
--- a/utils/themeeditor/gui/editorwindow.cpp
+++ b/utils/themeeditor/gui/editorwindow.cpp
@@ -110,7 +110,7 @@ void EditorWindow::loadConfigTab(ConfigDocument* doc)
this, SLOT(tabTitleChanged(QString)));
}
-void EditorWindow::loadSettings()
+void EditorWindow::loadSettings()
{
QSettings settings;
@@ -918,6 +918,16 @@ void EditorWindow::projectToTop(QString file)
void EditorWindow::refreshRecentMenus()
{
+ /* Clearing any deleted documents */
+ for(int i = 0; i < recentDocs.count(); i++)
+ if(!QFile::exists(recentDocs[i]))
+ recentDocs.removeAt(i--);
+
+ /* Clearing any deleted projects */
+ for(int i = 0; i < recentProjects.count(); i++)
+ if(!QFile::exists(recentProjects[i]))
+ recentProjects.removeAt(i--);
+
/* First hiding all the menu items */
for(int i = 0; i < recentDocsMenu.count(); i++)
recentDocsMenu[i]->setVisible(false);