mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
fix: navigate through epwing dictionary restricted to certain dictionary
This commit is contained in:
parent
bb29fd5c94
commit
791da91645
|
@ -387,9 +387,10 @@ sptr< Dictionary::DataRequest > ArticleMaker::makeDefinitionFor( QString const &
|
|||
|
||||
unmutedDicts.reserve( activeDicts.size() );
|
||||
|
||||
for ( unsigned x = 0; x < activeDicts.size(); ++x )
|
||||
for ( unsigned x = 0; x < activeDicts.size(); ++x ) {
|
||||
if ( !mutedDicts.contains( QString::fromStdString( activeDicts[ x ]->getId() ) ) )
|
||||
unmutedDicts.push_back( activeDicts[ x ] );
|
||||
}
|
||||
|
||||
return std::make_shared< ArticleRequest >(
|
||||
word,
|
||||
|
|
|
@ -312,7 +312,8 @@ string Epwing::EpwingDictionary::epwing_previous_button( const int & articlePage
|
|||
{
|
||||
QString previousButton = QString( "p%1At%2" ).arg( articlePage ).arg( articleOffset );
|
||||
string previousLink = R"(<p><a class="epwing_previous_page" href="gdlookup://localhost/)"
|
||||
+ previousButton.toStdString() + "\">" + tr( "Previous Page" ).toStdString() + "</a></p>";
|
||||
+ previousButton.toStdString() + "?dictionaries=" + getId() + "\">" + tr( "Previous Page" ).toStdString()
|
||||
+ "</a></p>";
|
||||
|
||||
return previousLink;
|
||||
}
|
||||
|
@ -348,7 +349,7 @@ void EpwingDictionary::loadArticleNextPage( string & articleHeadword,
|
|||
string Epwing::EpwingDictionary::epwing_next_button( const int & articlePage, const int & articleOffset )
|
||||
{
|
||||
QString refLink = QString( "r%1At%2" ).arg( articlePage ).arg( articleOffset );
|
||||
string nextLink = R"(<p><a class="epwing_next_page" href="gdlookup://localhost/)" + refLink.toStdString() + "\">"
|
||||
string nextLink = R"(<p><a class="epwing_next_page" href="gdlookup://localhost/)" + refLink.toStdString() + "?dictionaries="+getId()+"\">"
|
||||
+ tr( "Next Page" ).toStdString() + "</a></p>";
|
||||
|
||||
return nextLink;
|
||||
|
|
Loading…
Reference in a new issue