From abfa3fff9d899ffd5b0c2ced055f12bcf5bfa6d0 Mon Sep 17 00:00:00 2001 From: Shaun Reich Date: Mon, 9 Mar 2009 18:10:35 +0000 Subject: [PATCH] The "Recently Closed Tabs" action menu now has a limit of 10, before it could just go on for practically ever, which would yield an annoyingly huge list of closed tabs. svn path=/trunk/KDE/kdebase/apps/; revision=937477 --- src/dolphinmainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index df3974572..aa72a2b9b 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -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); } -- 2.47.3