Bug 453878 - Allow configuring the applet to use more than one dictionary, but not all of them
Summary: Allow configuring the applet to use more than one dictionary, but not all of ...
Alias: None
Product: kdeplasma-addons
Classification: Unclassified
Component: dictionary (show other bugs)
Version: 5.24.5
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
Depends on:
Reported: 2022-05-16 09:55 UTC by Gergely HORVÁTH
Modified: 2022-05-26 08:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Note You need to log in before you can comment on or make changes to this bug.
Description Gergely HORVÁTH 2022-05-16 09:55:50 UTC
It is rather a feature request than a bug. I'm using the dictionary applet on my tray and it searches great, the results are relevant. All nice and good.

However I use multiple dictionaries simultaneously so I either change between them in the settings, or enable every dictionary (All dictionaries). In this case I have the results for every query, but sometimes I have to scroll a lot. Would it be possible to change the Dictionaries view into a checkbox list so I can hand pick the dictionaries I would like to search in?

Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version:  5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2022-05-16 18:24:29 UTC
Seems reasonable.
Comment 2 Fushan Wen 2022-05-18 14:38:22 UTC
Looks possible by using command pipelining.

Comment 3 Bug Janitor Service 2022-05-19 10:44:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/159
Comment 4 Fushan Wen 2022-05-26 01:17:35 UTC
Git commit bc8d35bae6d8f67bda734261a84ef4488b2738a7 by Fushan Wen.
Committed on 25/05/2022 at 15:29.
Pushed by fusionfuture into branch 'master'.

dict: don't early return when no definition is found

We don't want to abort loading when one dict returns no definition.

M  +3    -2    dict/dictengine.cpp
M  +1    -1    dict/dictengine.h

Comment 5 Fushan Wen 2022-05-26 01:17:43 UTC
Git commit 04773128a2d268a79ca9274cb2bd3d56afc03591 by Fushan Wen.
Committed on 25/05/2022 at 15:29.
Pushed by fusionfuture into branch 'master'.

dict: support multiple dicts in the engine

The dict protocol supports "Command Pipelining", so the engine can
concatenate multiple DEFINE commands into one command.

See also: https://datatracker.ietf.org/doc/html/rfc2229#section-4

M  +11   -7    dict/dictengine.cpp
M  +2    -2    dict/dictengine.h

Comment 6 Fushan Wen 2022-05-26 01:17:51 UTC
Git commit be5f636c0baa63de4981b89b6970ba02fe2abb87 by Fushan Wen.
Committed on 26/05/2022 at 01:06.
Pushed by fusionfuture into branch 'master'.

applets/dict: support multiple dictionaries in the config dialog

Multiple dictionaries are saved in a string, split with comma ",".
FIXED-IN: 5.26

A  +77   -0    applets/dict/package/contents/ui/AvailableDictSheet.qml     [License: GPL(v2.0+)]
M  +76   -42   applets/dict/package/contents/ui/ConfigDictionaries.qml
A  +59   -0    applets/dict/package/contents/ui/DictItemDelegate.qml     [License: GPL(v2.0+)]

Comment 7 Fushan Wen 2022-05-26 01:17:59 UTC
Git commit 988bcc37b008a8cb4cecbdb18fa985417f1a7aec by Fushan Wen.
Committed on 25/05/2022 at 15:56.
Pushed by fusionfuture into branch 'master'.

applets/dict: add EnabledDictModel to show enabled dictionaries

The model will be initialized after the dict list is fetched.

M  +2    -0    applets/dict/plugin/dict_plugin.cpp
M  +230  -1    applets/dict/plugin/dictionariesmodel.cpp
M  +51   -4    applets/dict/plugin/dictionariesmodel.h

Comment 8 Gergely HORVÁTH 2022-05-26 08:39:44 UTC
Thank you for solving it! How can I test the code? I have kdesrc build already setup, I intendt to compile it and run until 5.26 hits the Arch repos.