[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/kolourpaint/mainWindow (silent)
From:       Clarence Dang <dang () kde ! org>
Date:       2007-10-09 8:13:35
Message-ID: 1191917615.999033.32201.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 723294 by dang:

SVN_SILENT +debug for recent files bug.  I don't have time to test this kdelibs patch yet:

Index: krecentfilesaction.cpp
===================================================================
--- krecentfilesaction.cpp      (revision 722449)
+++ krecentfilesaction.cpp      (working copy)
@@ -133,11 +133,11 @@ void KRecentFilesAction::addUrl( const K
         break;
       }
     }
-    // remove last item if already maxitems in list
+    // remove oldest item if already maxitems in list
     if( d->m_maxItems && selectableActionGroup()->actions().count() == d->m_maxItems )
     {
-        // remove last item
-        delete removeAction(selectableActionGroup()->actions().last());
+        // remove oldest added item
+        delete removeAction(selectableActionGroup()->actions().first());
     }

     if (d->m_noEntriesAction) removeAction(d->m_noEntriesAction)->deleteLater();



 M  +6 -0      kpMainWindow_File.cpp  


--- trunk/KDE/kdegraphics/kolourpaint/mainWindow/kpMainWindow_File.cpp #723293:723294
@@ -190,9 +190,15 @@
     // realize what other processes have done e.g. Settings / Show Path
     cfg->reparseConfiguration ();
 
+#if DEBUG_KP_MAIN_WINDOW
+    kDebug () << "\trecent URLs=" << d->actionOpenRecent->items ();
+#endif
     // HACK: Something might have changed interprocess.
     // If we could PROPAGATE: interprocess, then this wouldn't be required.
     d->actionOpenRecent->loadEntries (cfg->group (kpSettingsGroupRecentFiles));
+#if DEBUG_KP_MAIN_WINDOW
+    kDebug () << "\tafter loading config=" << d->actionOpenRecent->items ();
+#endif
 
     d->actionOpenRecent->addUrl (url);
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic