mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
close main window on ESC (additionally to Ctrl + F4). To achieve this remove ESC as a shortcut to switch focus to word input. This action is already performed by typing just any key on the ArticleView and with Alt+D and Ctrl+L key combinations on MainWindow.
This commit is contained in:
parent
28fd948b99
commit
0f5d4aa04e
|
@ -1148,7 +1148,7 @@ void MainWindow::handleEsc()
|
||||||
if ( dynamic_cast< ArticleView & >( *( ui.tabWidget->currentWidget() ) ).closeSearch() )
|
if ( dynamic_cast< ArticleView & >( *( ui.tabWidget->currentWidget() ) ).closeSearch() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
focusTranslateLine();
|
on_actionCloseToTray_activated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::focusTranslateLine()
|
void MainWindow::focusTranslateLine()
|
||||||
|
|
|
@ -218,7 +218,7 @@ private slots:
|
||||||
void translateInputChanged( QString const & );
|
void translateInputChanged( QString const & );
|
||||||
void translateInputFinished();
|
void translateInputFinished();
|
||||||
|
|
||||||
/// Closes any opened search in the article view, and focuses the translateLine.
|
/// Closes any opened search in the article view, and close main window to tray.
|
||||||
void handleEsc();
|
void handleEsc();
|
||||||
|
|
||||||
/// Gives the keyboard focus to the translateLine and selects all the text
|
/// Gives the keyboard focus to the translateLine and selects all the text
|
||||||
|
|
Loading…
Reference in a new issue