]> cloud.milkyroute.net Git - dolphin.git/commitdiff
The "Recently Closed Tabs" action menu now has a limit of 10, before it could just...
authorShaun Reich <shaun.reich@kdemail.net>
Mon, 9 Mar 2009 18:10:35 +0000 (18:10 +0000)
committerShaun Reich <shaun.reich@kdemail.net>
Mon, 9 Mar 2009 18:10:35 +0000 (18:10 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=937477

src/dolphinmainwindow.cpp

index df39745728a2d628450f3a0e8a53e96cc4d0fc97..aa72a2b9b6dd6798aed070940af39d25362cf333 100644 (file)
@@ -1348,6 +1348,11 @@ void DolphinMainWindow::rememberClosedTab(int index)
     } else {
         tabsMenu->insertAction(tabsMenu->actions().at(2), action);
     }
+    //10 is the limit, remove the oldest one to make room. It's actually 8, since
+    //the separator and the "Empty Recently Closed Tabs" entry count as one
+    if (tabsMenu->actions().size() > 8) {
+        tabsMenu->removeAction(tabsMenu->actions().last());
+    }
     actionCollection()->action("closed_tabs")->setEnabled(true);
 }