]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
The "Recently Closed Tabs" action menu now has a limit of 10, before it could just...
[dolphin.git] / 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);
 }