Skip to content

Commit

Permalink
[fix] VocabBuilder: restore erroneously removed onShowVocabBuilder fu…
Browse files Browse the repository at this point in the history
…nction (#11915)

Fixes #11913.
  • Loading branch information
nairyosangha committed May 27, 2024
1 parent 9b1a21e commit c7a5914
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugins/vocabbuilder.koplugin/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1989,12 +1989,7 @@ function VocabBuilder:addToMainMenu(menu_items)
menu_items.vocabbuilder = {
text = _("Vocabulary builder"),
callback = function()
self.widget = VocabularyBuilderWidget:new{
title = _("Vocabulary builder"),
show_parent = self,
ui = self.ui
}
UIManager:show(self.widget)
self:onShowVocabBuilder()
end
}
end
Expand Down Expand Up @@ -2030,6 +2025,15 @@ function VocabBuilder:onDispatcherRegisterActions()
{category="none", event="ShowVocabBuilder", title=_("Open vocabulary builder"), general=true, separator=true})
end

function VocabBuilder:onShowVocabBuilder()
self.widget = VocabularyBuilderWidget:new{
title = _("Vocabulary builder"),
show_parent = self,
ui = self.ui
}
UIManager:show(self.widget)
end

-- Event sent by readerdictionary "WordLookedUp"
function VocabBuilder:onWordLookedUp(word, title, is_manual)
if not settings.enabled and not is_manual then return end
Expand Down

0 comments on commit c7a5914

Please sign in to comment.