[kupfer] settings, preferences: Special-case Epi/FFX toplevel option
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] settings, preferences: Special-case Epi/FFX toplevel option
- Date: Sun, 23 Aug 2009 11:29:05 +0000 (UTC)
commit 66c180b3d05e4f2220749508e784d7774b1a8dcc
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun Aug 23 12:56:48 2009 +0200
settings, preferences: Special-case Epi/FFX toplevel option
Allow to set "kupfer_show_toplevel", if this is True for a plugin, we
show the show in toplevel checkbox, else not.
data/defaults.cfg | 2 ++
kupfer/preferences.py | 6 +++---
kupfer/settings.py | 5 +++++
3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/data/defaults.cfg b/data/defaults.cfg
index 7ae1302..6e4c68f 100644
--- a/data/defaults.cfg
+++ b/data/defaults.cfg
@@ -55,6 +55,7 @@ kupfer_enabled = True
[plugin_epiphany]
kupfer_enabled = True
kupfer_toplevel = False
+kupfer_show_toplevel = True
[plugin_favorites]
kupfer_enabled = True
@@ -65,6 +66,7 @@ kupfer_enabled = True
[plugin_firefox]
kupfer_enabled = True
kupfer_toplevel = False
+kupfer_show_toplevel = True
[plugin_google]
kupfer_enabled = True
diff --git a/kupfer/preferences.py b/kupfer/preferences.py
index a419e46..bad35cb 100644
--- a/kupfer/preferences.py
+++ b/kupfer/preferences.py
@@ -307,9 +307,9 @@ class PreferencesWindowController (pretty.OutputMixin):
return True
def _plugin_makes_sense_in_catalog(self, plugin_id):
- """Whether the setting for toplevel makes sense for @plugin_id"""
- return plugins.get_plugin_attribute(plugin_id,
- plugins.sources_attribute)
+ """Whether the setting for toplevel should be shown for @plugin_id"""
+ setctl = settings.GetSettingsController()
+ return setctl.get_plugin_show_toplevel_option(plugin_id)
def on_buttonpluginsettings_clicked(self, widget):
curpath, curcol = self.table.get_cursor()
diff --git a/kupfer/settings.py b/kupfer/settings.py
index 7ea661c..2fbe0b5 100644
--- a/kupfer/settings.py
+++ b/kupfer/settings.py
@@ -204,6 +204,11 @@ class SettingsController (gobject.GObject, pretty.OutputMixin):
return self.get_plugin_config(plugin_id, "kupfer_toplevel",
value_type=strbool, default=True)
+ def get_plugin_show_toplevel_option(self, plugin_id):
+ """Convenience: if @plugin_id should show toplevel option"""
+ return self.get_plugin_config(plugin_id, "kupfer_show_toplevel",
+ value_type=strbool, default=False)
+
def get_plugin_is_hidden(self, plugin_id):
"""Convenience: if @plugin_id is hidden"""
return self.get_plugin_config(plugin_id, "kupfer_hidden",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]