Commit f16ba683 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement historyswitchfolder

parent 28280c32
Pipeline #88191 passed with stage
in 24 minutes and 48 seconds
......@@ -37,11 +37,13 @@ void HistorySwitchFolderManager::changeCollection(const Akonadi::Collection &cur
void HistorySwitchFolderManager::undo()
{
qDebug() << " void HistorySwitchFolderManager::undo()";
mUndoStack->undo();
}
void HistorySwitchFolderManager::redo()
{
qDebug() << " void HistorySwitchFolderManager::redo()";
mUndoStack->redo();
}
......
......@@ -3513,6 +3513,18 @@ void KMMainWidget::setupActions()
mRestartAccountSettings = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("Restart Account"), this);
actionCollection()->addAction(QStringLiteral("resource_restart"), mRestartAccountSettings);
connect(mRestartAccountSettings, &QAction::triggered, this, &KMMainWidget::slotRestartAccount);
{
auto act = new QAction(i18n("Previous Selected Folder"), this); // TODO fix me i18n
actionCollection()->setDefaultShortcut(act, QKeySequence(Qt::ALT | Qt::Key_Tab));
actionCollection()->addAction(QStringLiteral("previous_folder"), act);
connect(act, &QAction::triggered, mHistorySwitchFolderManager, &HistorySwitchFolderManager::undo);
act = new QAction(i18n("Next Selected Folder"), this); // TODO fix me i18n
actionCollection()->addAction(QStringLiteral("next_folder"), act);
actionCollection()->setDefaultShortcut(act, QKeySequence(Qt::ALT | Qt::Key_Tab | Qt::CTRL));
connect(act, &QAction::triggered, mHistorySwitchFolderManager, &HistorySwitchFolderManager::redo);
}
}
void KMMainWidget::slotAddFavoriteFolder()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment