diff --git a/articleview.cc b/articleview.cc index 57979517..7bdeb897 100644 --- a/articleview.cc +++ b/articleview.cc @@ -515,7 +515,7 @@ void ArticleView::showAnticipation() ui.definition->setCursor( Qt::WaitCursor ); } -void ArticleView::loadFinished( bool ) +void ArticleView::loadFinished( bool result ) { setZoomFactor(cfg.preferences.zoomFactor); QUrl url = ui.definition->url(); @@ -601,8 +601,11 @@ void ArticleView::loadFinished( bool ) } } - emit pageLoaded( this ); - + //the click audio url such as gdau://xxxx ,webview also emit a pageLoaded signal but with the result is false.need future investigation. + //the audio link click ,no need to emit pageLoaded signal + if(result){ + emit pageLoaded( this ); + } if( Utils::Url::hasQueryItem( ui.definition->url(), "regexp" ) ) highlightFTSResults(); } @@ -1118,6 +1121,7 @@ void ArticleView::openLink( QUrl const & url, QUrl const & ref, QString const & scrollTo, Contexts const & contexts_ ) { + audioPlayer->stop(); qDebug() << "open link url:" << url; Contexts contexts( contexts_ ); diff --git a/howto/How to use ocr together with GoldenDict.md b/howto/How to use ocr together with GoldenDict.md index f1106c33..a23caa4c 100644 --- a/howto/How to use ocr together with GoldenDict.md +++ b/howto/How to use ocr together with GoldenDict.md @@ -5,7 +5,9 @@ the technique used there is old and can not work crossplatform . with the help of another great tool [Capture2Text](https://sourceforge.net/projects/capture2text/) ,GoldenDict can work with ocr seamlessly. # Note -Capture2Text has offered Windows precompiled executable files.I think it would be easier and possible to make it work on Linux as some afforts have tried. +Capture2Text has offered Windows precompiled executable files.I have ported it to Linux https://github.com/xiaoyifang/Capture2Text + +Thanks to: - [Capture2Text Linux Port](https://github.com/GSam/Capture2Text ) - [another on nixos](https://github.com/sikmir/nur-packages/blob/7c876e3fb20160781207a8f652fb052647e6da0d/pkgs/misc/capture2text/default.nix) from [sikmir](https://github.com/goldendict/goldendict/issues/1445#issuecomment-1022972220)