Commit e3c02c1f authored by Aurélien Gâteau's avatar Aurélien Gâteau
Browse files

Turn the hardcoded esc shortcut to reduce level of details into a standard action.

CCBUG:187774

svn path=/trunk/KDE/kdegraphics/gwenview/; revision=958361
parent a189727e
...@@ -300,11 +300,10 @@ struct MainWindow::Private { ...@@ -300,11 +300,10 @@ struct MainWindow::Private {
connect(mDocumentPanel, SIGNAL(toggleFullScreenRequested()), connect(mDocumentPanel, SIGNAL(toggleFullScreenRequested()),
mFullScreenAction, SLOT(trigger()) ); mFullScreenAction, SLOT(trigger()) );
QAction* reduceLodAction = view->addAction("reduce_lod", mWindow, SLOT(reduceLevelOfDetails()));
QShortcut* reduceLevelOfDetailsShortcut = new QShortcut(mWindow); // FIXME Find a better text for this action
reduceLevelOfDetailsShortcut->setKey(Qt::Key_Escape); reduceLodAction->setText(i18nc("@action Go back to a more general page (start page <- list <- image)", "Back"));
connect(reduceLevelOfDetailsShortcut, SIGNAL(activated()), reduceLodAction->setShortcut(Qt::Key_Escape);
mWindow, SLOT(reduceLevelOfDetails()) );
mGoToPreviousAction = view->addAction("go_previous",mWindow, SLOT(goToPrevious())); mGoToPreviousAction = view->addAction("go_previous",mWindow, SLOT(goToPrevious()));
mGoToPreviousAction->setIcon(KIcon("media-skip-backward")); mGoToPreviousAction->setIcon(KIcon("media-skip-backward"));
...@@ -1038,6 +1037,8 @@ void MainWindow::reduceLevelOfDetails() { ...@@ -1038,6 +1037,8 @@ void MainWindow::reduceLevelOfDetails() {
d->mFullScreenAction->trigger(); d->mFullScreenAction->trigger();
} else if (d->mCurrentPageId == ViewPageId) { } else if (d->mCurrentPageId == ViewPageId) {
d->mBrowseAction->trigger(); d->mBrowseAction->trigger();
} else {
showStartPage();
} }
} }
......
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