┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShaun Reich <[email protected]>2009-03-09 18:10:35 +0000
committerShaun Reich <[email protected]>2009-03-09 18:10:35 +0000
commitabfa3fff9d899ffd5b0c2ced055f12bcf5bfa6d0 (patch)
tree62147d1aa0fcb2f487aa11d8a97af6232fe0cd35 /src
parent9d7103f6ef50ddf7ec16d376996cd5612abc6168 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp5
1 files changed, 5 insertions, 0 deletions
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);
}