Dictionary plugin in XFCE
- From: David Schneider <dnschneid gmail com>
- To: Kupfer <kupfer-list gnome org>
- Subject: Dictionary plugin in XFCE
- Date: Mon, 5 Apr 2010 19:59:36 -0700
Attached is a small hack to attempt to launch the XFCE environment's dictionary program if GNOME's doesn't exist.
In reality there should be an option to select your dictionary program, which should have defaults for GNOME's, XFCE's, and KDE's (whatever that is), as well as the ability to input your own.
Alternatively, one could do it this way (with the addition of support for KDE), but it would be cleaner to check to see if the application exists first instead of just calling them one at a time.
-David
16,17c16,17
< utils.launch_commandline("gnome-dictionary --look-up='%s'" % text,
< _("Look Up"))
---
> if not utils.launch_commandline("gnome-dictionary --look-up='%s'" % text, _("Look Up")):
> utils.launch_commandline("xfce4-dict --dict '%s'" % text, _("Look Up"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]