[kupfer] Remove SETTING_PREFER_CATALOG
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] Remove SETTING_PREFER_CATALOG
- Date: Sun, 9 May 2010 15:56:23 +0000 (UTC)
commit d23dc52fa394796b1d5056361ca2ceaaf4a630e0
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun May 9 16:25:25 2010 +0100
Remove SETTING_PREFER_CATALOG
Remove SETTING_PREFER_CATALOG in favor of the Source attribute
'source_prefer_sublevel'.
However, no sources default to preferring sublevel. It is now a user
preference.
contrib/icon_names.py | 5 -----
contrib/runningapplications.py | 6 ------
kupfer/plugin/chromium.py | 6 +-----
kupfer/plugin/epiphany.py | 5 -----
kupfer/plugin/firefox.py | 5 -----
kupfer/plugin/opera.py | 4 ----
kupfer/plugin/services.py | 8 ++++++--
kupfer/plugin/ssh_hosts.py | 1 -
kupfer/plugin/top.py | 1 -
kupfer/plugin/virtualbox/__init__.py | 4 ----
kupfer/plugin_support.py | 15 ---------------
11 files changed, 7 insertions(+), 53 deletions(-)
---
diff --git a/contrib/icon_names.py b/contrib/icon_names.py
index bd8771d..48c9eba 100644
--- a/contrib/icon_names.py
+++ b/contrib/icon_names.py
@@ -21,11 +21,6 @@ import gtk
from kupfer.objects import Leaf, Action, Source, SourceLeaf
from kupfer import uiutils
-from kupfer import plugin_support
-
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
ICON_SPEC_ADDRESS = "http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-0.8.90.xml"
diff --git a/contrib/runningapplications.py b/contrib/runningapplications.py
index 3fa5965..5cc294f 100644
--- a/contrib/runningapplications.py
+++ b/contrib/runningapplications.py
@@ -8,12 +8,6 @@ import gio
from kupfer.objects import Source, AppLeaf
from kupfer import launch
-from kupfer import plugin_support
-
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
class RunningApplicationsSource (Source):
"""List currently running applications """
diff --git a/kupfer/plugin/chromium.py b/kupfer/plugin/chromium.py
index d882ea8..2e11209 100644
--- a/kupfer/plugin/chromium.py
+++ b/kupfer/plugin/chromium.py
@@ -8,14 +8,10 @@ import os
from kupfer.objects import Leaf, Action, Source
from kupfer.objects import UrlLeaf
-from kupfer import config, plugin_support
+from kupfer import config
from kupfer.obj.apps import AppLeafContentMixin
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
class BookmarksSource (AppLeafContentMixin, Source):
appleaf_content_id = ("chromium-browser")
def __init__(self):
diff --git a/kupfer/plugin/epiphany.py b/kupfer/plugin/epiphany.py
index 1c673c0..5cb97d5 100644
--- a/kupfer/plugin/epiphany.py
+++ b/kupfer/plugin/epiphany.py
@@ -9,14 +9,9 @@ import os
from kupfer.objects import Leaf, Action, Source
from kupfer.objects import UrlLeaf
from kupfer.obj.apps import AppLeafContentMixin
-from kupfer import plugin_support
from kupfer.plugin import epiphany_support
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
class EpiphanySource (AppLeafContentMixin, Source):
appleaf_content_id = "epiphany"
def __init__(self):
diff --git a/kupfer/plugin/firefox.py b/kupfer/plugin/firefox.py
index ae1307b..7072fae 100644
--- a/kupfer/plugin/firefox.py
+++ b/kupfer/plugin/firefox.py
@@ -16,14 +16,9 @@ from kupfer.objects import Leaf, Action, Source
from kupfer.objects import UrlLeaf
from kupfer.obj.apps import AppLeafContentMixin
from kupfer.obj.helplib import FilesystemWatchMixin
-from kupfer import plugin_support
from kupfer.plugin import firefox_support
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
class BookmarksSource (AppLeafContentMixin, Source, FilesystemWatchMixin):
appleaf_content_id = ("firefox", "iceweasel")
def __init__(self):
diff --git a/kupfer/plugin/opera.py b/kupfer/plugin/opera.py
index c7d71a6..116822f 100644
--- a/kupfer/plugin/opera.py
+++ b/kupfer/plugin/opera.py
@@ -15,10 +15,6 @@ from kupfer import plugin_support
from kupfer.obj.apps import ApplicationSource
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
BOOKMARKS_FILE = "bookmarks.adr"
class BookmarksSource(ApplicationSource):
diff --git a/kupfer/plugin/services.py b/kupfer/plugin/services.py
index f1aec11..cfb5771 100644
--- a/kupfer/plugin/services.py
+++ b/kupfer/plugin/services.py
@@ -13,8 +13,12 @@ from kupfer.obj.helplib import FilesystemWatchMixin
from kupfer import utils
__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
- dict(key='sudo_cmd', label=_("Sudo-like Command"), type=str, value="gksu"),
+ {
+ 'key': 'sudo_cmd',
+ 'label': _("Sudo-like Command"),
+ 'type': str,
+ 'value': 'gksu',
+ },
)
diff --git a/kupfer/plugin/ssh_hosts.py b/kupfer/plugin/ssh_hosts.py
index d5d87b1..7bc650f 100644
--- a/kupfer/plugin/ssh_hosts.py
+++ b/kupfer/plugin/ssh_hosts.py
@@ -39,7 +39,6 @@ __kupfer_settings__ = plugin_support.PluginSettings(
"(e.g. '-x' for gnome-terminal and terminal, "
"'-e' for konsole and urxvt).")
},
- #plugin_support.SETTING_PREFER_CATALOG
)
diff --git a/kupfer/plugin/top.py b/kupfer/plugin/top.py
index 8fa9d92..169135a 100644
--- a/kupfer/plugin/top.py
+++ b/kupfer/plugin/top.py
@@ -26,7 +26,6 @@ __kupfer_settings__ = plugin_support.PluginSettings(
"alternatives": [_("Commandline"), _("CPU usage (descending)"),
_("Memory usage (descending)") ]
},
- plugin_support.SETTING_PREFER_CATALOG,
)
diff --git a/kupfer/plugin/virtualbox/__init__.py b/kupfer/plugin/virtualbox/__init__.py
index 34eba13..75a503a 100644
--- a/kupfer/plugin/virtualbox/__init__.py
+++ b/kupfer/plugin/virtualbox/__init__.py
@@ -11,10 +11,6 @@ from kupfer.objects import Leaf, Action, Source
from kupfer import pretty, plugin_support
from kupfer.obj.apps import ApplicationSource
-__kupfer_settings__ = plugin_support.PluginSettings(
- plugin_support.SETTING_PREFER_CATALOG,
-)
-
try:
from kupfer.plugin.virtualbox import vboxapi_support as vbox_support
pretty.print_info(__name__, 'Using vboxapi...')
diff --git a/kupfer/plugin_support.py b/kupfer/plugin_support.py
index c597abe..598024f 100644
--- a/kupfer/plugin_support.py
+++ b/kupfer/plugin_support.py
@@ -6,25 +6,10 @@ from kupfer.core.settings import UserNamePassword
__all__ = [
"UserNamePassword",
- "SETTING_PREFER_CATALOG",
"PluginSettings",
"check_dbus_connection",
]
-# NOTE: This setting is a hack and a workaround.
-# A real solution is a catalog configuration pane in preferences.
-# Only use this for plugins with potentially *thousands* of leaves.
-SETTING_PREFER_CATALOG = {
- "key" : "kupfer_toplevel",
- "label": _("Include in top level"),
- "type": bool,
- "value": False,
- "tooltip": _(
- "If enabled, objects from the plugin's source(s) "
- "will be available in the top level.\n"
- "Sources are always available as subcatalogs in the top level."),
-}
-
def _is_core_setting(key):
return key.startswith("kupfer_")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]