[kupfer] plugin.applications: Add Desktop Env config to applications
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.applications: Add Desktop Env config to applications
- Date: Sun, 23 Aug 2009 11:28:05 +0000 (UTC)
commit f1ab07f2b521d372614c45c64282103f8e4d005e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sat Aug 22 04:38:41 2009 +0200
plugin.applications: Add Desktop Env config to applications
kupfer/plugin/applications.py | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/applications.py b/kupfer/plugin/applications.py
index 686b8d3..0b3f8a3 100644
--- a/kupfer/plugin/applications.py
+++ b/kupfer/plugin/applications.py
@@ -3,7 +3,7 @@ from gio import app_info_get_all
from gio.unix import desktop_app_info_set_desktop_env
from kupfer.objects import Source, AppLeaf, Action, FileLeaf
-from kupfer import utils
+from kupfer import utils, plugin_support
__kupfer_name__ = _("Applications")
__kupfer_sources__ = ("AppSource", )
@@ -15,6 +15,16 @@ __description__ = _("All applications and preferences")
__version__ = ""
__author__ = "Ulrik Sverdrup <ulrik sverdrup gmail com>"
+__kupfer_settings__ = plugin_support.PluginSettings(
+ {
+ "key" : "desktop_type",
+ "label": _("Applications for Desktop Environment"),
+ "type": str,
+ "value": "GNOME",
+ "alternatives": ("GNOME", "KDE", "XFCE")
+ },
+)
+
class AppSource (Source):
"""
Applications source
@@ -29,7 +39,8 @@ class AppSource (Source):
# If we set proper desktop environment
# We get exactly the apps shown in the menu,
# as well as the preference panes
- desktop_app_info_set_desktop_env("GNOME")
+ desktop_type = __kupfer_settings__["desktop_type"]
+ desktop_app_info_set_desktop_env(desktop_type)
# Add this to the default
whitelist = []
for item in app_info_get_all():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]