mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 16:04: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 );
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
if ( ui.favoritesPane->isVisible() ) {
|
||||
|
@ -4141,7 +4134,13 @@ void MainWindow::showDictionaryHeadwords( Dictionary::Class * dict )
|
|||
headwordsDlg = new DictHeadwords( this, cfg, dict );
|
||||
addGlobalActionsToDialog( headwordsDlg );
|
||||
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,
|
||||
&DictHeadwords::closeDialog,
|
||||
this,
|
||||
|
|
|
@ -67,7 +67,6 @@ public slots:
|
|||
void messageFromAnotherInstanceReceived( QString const & );
|
||||
void showStatusBarMessage( QString const &, int, QPixmap const & );
|
||||
void wordReceived( QString const & );
|
||||
void headwordReceived( QString const &, QString const & );
|
||||
void headwordFromFavorites( QString const &, QString const & );
|
||||
void quitApp();
|
||||
|
||||
|
|
Loading…
Reference in a new issue