mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 11:14:06 +00:00
opt: don't focus on the main window if word comes from headword dialog
This commit is contained in:
parent
d4db51f278
commit
acbfef0870
|
@ -3730,13 +3730,6 @@ void MainWindow::wordReceived( const QString & word )
|
||||||
respondToTranslationRequest( word, false );
|
respondToTranslationRequest( word, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::headwordReceived( const QString & word, const QString & ID )
|
|
||||||
{
|
|
||||||
toggleMainWindow( true );
|
|
||||||
setInputLineText( word, WildcardPolicy::EscapeWildcards, NoPopupChange );
|
|
||||||
respondToTranslationRequest( word, false, ArticleView::scrollToFromDictionaryId( ID ), false );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::updateFavoritesMenu()
|
void MainWindow::updateFavoritesMenu()
|
||||||
{
|
{
|
||||||
if ( ui.favoritesPane->isVisible() ) {
|
if ( ui.favoritesPane->isVisible() ) {
|
||||||
|
@ -4141,7 +4134,13 @@ void MainWindow::showDictionaryHeadwords( Dictionary::Class * dict )
|
||||||
headwordsDlg = new DictHeadwords( this, cfg, dict );
|
headwordsDlg = new DictHeadwords( this, cfg, dict );
|
||||||
addGlobalActionsToDialog( headwordsDlg );
|
addGlobalActionsToDialog( headwordsDlg );
|
||||||
addGroupComboBoxActionsToDialog( headwordsDlg, groupList );
|
addGroupComboBoxActionsToDialog( headwordsDlg, groupList );
|
||||||
connect( headwordsDlg, &DictHeadwords::headwordSelected, this, &MainWindow::headwordReceived );
|
connect( headwordsDlg,
|
||||||
|
&DictHeadwords::headwordSelected,
|
||||||
|
this,
|
||||||
|
[ this ]( QString const & headword, QString const & dictID ) {
|
||||||
|
setInputLineText( headword, WildcardPolicy::EscapeWildcards, NoPopupChange );
|
||||||
|
respondToTranslationRequest( headword, false, ArticleView::scrollToFromDictionaryId( dictID ), false );
|
||||||
|
} );
|
||||||
connect( headwordsDlg,
|
connect( headwordsDlg,
|
||||||
&DictHeadwords::closeDialog,
|
&DictHeadwords::closeDialog,
|
||||||
this,
|
this,
|
||||||
|
|
|
@ -67,7 +67,6 @@ public slots:
|
||||||
void messageFromAnotherInstanceReceived( QString const & );
|
void messageFromAnotherInstanceReceived( QString const & );
|
||||||
void showStatusBarMessage( QString const &, int, QPixmap const & );
|
void showStatusBarMessage( QString const &, int, QPixmap const & );
|
||||||
void wordReceived( QString const & );
|
void wordReceived( QString const & );
|
||||||
void headwordReceived( QString const &, QString const & );
|
|
||||||
void headwordFromFavorites( QString const &, QString const & );
|
void headwordFromFavorites( QString const &, QString const & );
|
||||||
void quitApp();
|
void quitApp();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue