Over two years ago, I announced that I had written a dictionary plugin for KRunner. Many expected it would be merged immediately, but there was an unfortunate hiccup. Because of the particulars of KRunner’s threading, and the fact that the dictionary data engine needed to only be accessed from the main thread, Aaron Seigo said that he would add an AbstractRunner property called setReentrant that would allow for easily accessing data engines from the KRunner’s match thread. This never materialized. I waited, and nothing ever came, and eventually I just presumed the plasma developers weren’t interested in adding this API themselves.

Not a problem, though. Now, two years since, I’ve decided to resurrect the runner, and rewrite it using mutexes to work around the API’s threading limitations. The result turned out very cleanly, and so far in my testing it works without fail.

It’s currently in kde-review, but I’m hoping to move it into plasma-addons and ship it with 4.10, now that it works well.

For the eager, you can try it out now with these commands:

svn co svn://anonsvn.kde.org/home/kde/trunk/kdereview/plasma/runners/dictionary dictionary-krunner
cd dictionary-krunner
cmake . -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix)
make
sudo make install
kbuildsycoca4
kquitapp krunner
krunner
August 18, 2012 · [Print]

18 Comments to “KRunner Dictionary Plugin: Complete”

  1. David (FSF Supporter) says:

    Running Kubuntu 12/04 the following errors occurred:

    cmake . -DCMAKE_INSTALL_PREFIX=$(kde4-config –prefix)– The C compiler identification is GNU
    – The CXX compiler identification is GNU
    – Check for working C compiler: /usr/bin/gcc
    – Check for working C compiler: /usr/bin/gcc — works
    – Detecting C compiler ABI info
    – Detecting C compiler ABI info – done
    – Check for working CXX compiler: /usr/bin/c++
    – Check for working CXX compiler: /usr/bin/c++ — works
    – Detecting CXX compiler ABI info
    – Detecting CXX compiler ABI info – done
    CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
    ERROR: cmake/modules/FindKDE4Internal.cmake not found in
    /home/owner/.kde/share/apps;/usr/share/kubuntu-default-settings/kde4-profile/default/share/apps;/usr/share/kde4/apps
    Call Stack (most recent call first):
    CMakeLists.txt:4 (find_package)

    CMake Warning (dev) in CMakeLists.txt:
    No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 2.8)

    should be added at the top of the file. The version specified may be lower
    if you wish to support older CMake versions for this project. For more
    information run “cmake –help-policy CMP0000″.
    This warning is for project developers. Use -Wno-dev to suppress it.

    – Configuring incomplete, errors occurred!

  2. Laszlo Papp says:

    Nice to see there is such an interest.

    I have been also working on a dictionary and translator application for KDE Edu for about two years now (Mula in playground).

    We will provide a full-fledged translator and dictionary capability in KDE. :-)

  3. Eduard Gotwig says:

    What about support for languages, as German?

  4. Fuchs says:

    Looks interesting and works here, unfortunately the main issue is, as with the dictionary plasmoid, that unless you can choose the language, it is quite useless for many people out there.

    There is a very old bug report against the dictionary plugin which has the same issue. Note that not everybody speaks english or only english, and would like to look up words in other languages.

    However, you are not the one to blame for that, so thanks a lot for this runner. It looks really interesting and brings a functionality that I missed since I saw it in OS X.

  5. By mutexes, does it mean it is callback friendly. Sorry, I’m more familiar with web terms :D

  6. Laszlo Papp says:

    Akhmad*

    I am sorry for the typo. Please accept my apologize for that.

  7. Johannes Huber says:

    How about moving to git?

  8. Migue Chan says:

    You need to install the packages:
    -build-essential
    -cmake

    Try again after installing those.

  9. [...] Instala KDE SC 4.9 en Kubuntu 12.04, Twitter se une a la Fundación Linux Fuente – zx2c4var [...]

  10. Nick says:

    there is a dataengine that provides access to stardict dictionaries:

    http://qstardict.svn.sourceforge.net/viewvc/qstardict/trunk/kdeplasma/

Leave a Reply to Jason Donenfeld