diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-29 07:38:01 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-29 07:38:01 +0000 |
commit | 89c1a88dc87497470f5b5877b6abcc58d7a56117 (patch) | |
tree | cb5b67e50de4811f4bc06e2fda935f625b4fcd6d /utils/themeeditor | |
parent | 5106d938c65447a6bedf8e0409a57d19a08d6ac1 (diff) | |
download | rockbox-89c1a88dc87497470f5b5877b6abcc58d7a56117.tar.gz 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/themeeditor')
-rw-r--r-- | utils/themeeditor/gui/editorwindow.cpp | 12 |
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) | |||
110 | this, SLOT(tabTitleChanged(QString))); | 110 | this, SLOT(tabTitleChanged(QString))); |
111 | } | 111 | } |
112 | 112 | ||
113 | void EditorWindow::loadSettings() | 113 | void EditorWindow::loadSettings() |
114 | { | 114 | { |
115 | 115 | ||
116 | QSettings settings; | 116 | QSettings settings; |
@@ -918,6 +918,16 @@ void EditorWindow::projectToTop(QString file) | |||
918 | 918 | ||
919 | void EditorWindow::refreshRecentMenus() | 919 | void EditorWindow::refreshRecentMenus() |
920 | { | 920 | { |
921 | /* Clearing any deleted documents */ | ||
922 | for(int i = 0; i < recentDocs.count(); i++) | ||
923 | if(!QFile::exists(recentDocs[i])) | ||
924 | recentDocs.removeAt(i--); | ||
925 | |||
926 | /* Clearing any deleted projects */ | ||
927 | for(int i = 0; i < recentProjects.count(); i++) | ||
928 | if(!QFile::exists(recentProjects[i])) | ||
929 | recentProjects.removeAt(i--); | ||
930 | |||
921 | /* First hiding all the menu items */ | 931 | /* First hiding all the menu items */ |
922 | for(int i = 0; i < recentDocsMenu.count(); i++) | 932 | for(int i = 0; i < recentDocsMenu.count(); i++) |
923 | recentDocsMenu[i]->setVisible(false); | 933 | recentDocsMenu[i]->setVisible(false); |