mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 17:18:23 -04:00
Increase open recent hardcoded limit to 10
This commit is contained in:
parent
5fb88482fb
commit
c850cc5b55
@ -63,7 +63,8 @@ void Configuration::updateOpenRecentList (QString path)
|
||||
QStringList list = openRecentList();
|
||||
list.removeAll(path);
|
||||
list.prepend(path);
|
||||
while (list.length() > 5)
|
||||
//TODO: Make list lenght configurable
|
||||
while (list.length() > 10)
|
||||
{
|
||||
list.removeLast();
|
||||
}
|
||||
|
@ -219,7 +219,8 @@ void MainWindowViewer::createActions()
|
||||
connect(openFolderAction, SIGNAL(triggered()), this, SLOT(openFolder()));
|
||||
|
||||
QAction* recentFileAction = 0;
|
||||
for (int i = 0; i < 5; i++)
|
||||
//TODO: Replace limit with a configurable value
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
recentFileAction = new QAction(this);
|
||||
recentFileAction->setVisible(false);
|
||||
@ -665,8 +666,8 @@ void MainWindowViewer::refreshRecentFilesActionList()
|
||||
{
|
||||
QStringList recentFilePaths = Configuration::getConfiguration().openRecentList();
|
||||
|
||||
//TODO: Replace "5" with something configurable
|
||||
int iteration = (recentFilePaths.size() < 5) ? recentFilePaths.size() : 5;
|
||||
//TODO: Replace limit with something configurable
|
||||
int iteration = (recentFilePaths.size() < 10) ? recentFilePaths.size() : 10;
|
||||
|
||||
for (int i = 0; i < iteration; i++)
|
||||
{
|
||||
@ -676,7 +677,7 @@ void MainWindowViewer::refreshRecentFilesActionList()
|
||||
recentFilesActionList.at(i)->setVisible(true);
|
||||
}
|
||||
|
||||
for (int i = iteration; i < 5; i++)
|
||||
for (int i = iteration; i < 10; i++)
|
||||
{
|
||||
recentFilesActionList.at(i)->setVisible(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user