[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics/kghostview
From: Andrew Coles <andrew_coles () yahoo ! co ! uk>
Date: 2004-10-08 14:39:05
Message-ID: 20041008143905.4297116A2D () office ! kde ! org
[Download RAW message or body]
CVS commit by coles:
Added the code from kviewshell.cpp that removes non-existent files
from the 'Open recent' menu when the application is loaded.
M +16 -0 kgvshell.cpp 1.92
--- kdegraphics/kghostview/kgvshell.cpp #1.91:1.92
@@ -195,4 +195,20 @@ KGVShell::readSettings()
{
recent->loadEntries( KGlobal::config() );
+ QStringList items = recent->items();
+
+// Code copied from kviewshell.cpp:
+// Constant source of annoyance in KDVI < 1.0: the 'recent-files'
+// menu contains lots of files which don't exist (any longer). Thus,
+// we'll sort out the non-existent files here.
+
+ for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
+ KURL url(*it);
+ if (url.isLocalFile()) {
+ QFileInfo info(url.path());
+ if (!info.exists())
+ recent->removeURL(url);
+ }
+ }
+
applyMainWindowSettings(KGlobal::config(), "MainWindow");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic