From ad7e1cc4bccc19de569a39818658fecfca945a5a Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Mon, 25 Aug 2008 21:49:38 +0000 Subject: [PATCH] label-plugin:remove obsolete prefs --- .../plugins/label/label/data/label_pref.glade | 165 +----------------- .../plugins/label/label/gtkui/label_config.py | 14 +- .../plugins/label/label/gtkui/sidebar_menu.py | 9 - 3 files changed, 7 insertions(+), 181 deletions(-) diff --git a/deluge/plugins/label/label/data/label_pref.glade b/deluge/plugins/label/label/data/label_pref.glade index 60ece9255..a25c613a5 100644 --- a/deluge/plugins/label/label/data/label_pref.glade +++ b/deluge/plugins/label/label/data/label_pref.glade @@ -1,172 +1,12 @@ - + True 5 - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 5 - - - True - 5 - - - True - - - False - False - - - - - True - True - Hide zero hits - 0 - True - - - 1 - - - - - False - False - - - - - - - - - True - 5 - <b>General</b> - True - - - label_item - - - - - False - False - - - - - True - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - 5 - - - True - 5 - - - True - - - False - False - - - - - True - - - True - True - Show states - 0 - True - - - - - True - True - Show trackers - 0 - True - - - 1 - - - - - True - True - Show labels - 0 - True - - - 2 - - - - - 1 - - - - - False - False - - - - - - - - - True - 5 - <b>Sidebar</b> - True - - - label_item - - - - - False - False - 1 - - True @@ -197,9 +37,6 @@ - - 2 - diff --git a/deluge/plugins/label/label/gtkui/label_config.py b/deluge/plugins/label/label/gtkui/label_config.py index 4f43909c8..c41b13a59 100644 --- a/deluge/plugins/label/label/gtkui/label_config.py +++ b/deluge/plugins/label/label/gtkui/label_config.py @@ -40,18 +40,16 @@ from deluge.log import LOG as log from deluge.ui.client import aclient - class LabelConfig(object): - chk_ids = ["hide_zero_hits","show_labels","show_trackers","show_states"] + """ + there used to be some options here... + """ def __init__(self, plugin): self.plugin = plugin - self.labels = [] def load(self): - #self.glade = gtk.glade.XML(self.get_resource("label_pref.glade")) log.debug('Adding Label Preferences page') - self.glade = gtk.glade.XML(self.get_resource("label_pref.glade")) @@ -74,13 +72,13 @@ class LabelConfig(object): def cb_global_options(self, options): log.debug("options=%s" % options) + """ for id in self.chk_ids: self.glade.get_widget(id).set_active(bool(options[id])) + """ def on_apply_prefs(self): options = {} - for id in self.chk_ids: - options[id] = self.glade.get_widget(id).get_active() - + #update options dict here. aclient.label_set_global_options(None, options) diff --git a/deluge/plugins/label/label/gtkui/sidebar_menu.py b/deluge/plugins/label/label/gtkui/sidebar_menu.py index 0d6a2f789..1ba4b6898 100644 --- a/deluge/plugins/label/label/gtkui/sidebar_menu.py +++ b/deluge/plugins/label/label/gtkui/sidebar_menu.py @@ -40,15 +40,6 @@ import deluge.common from deluge.log import LOG as log from deluge.ui.client import aclient -STATE_PIX = { - "Downloading":"downloading", - "Seeding":"seeding", - "Paused":"inactive", - "Checking":"checking", - "Queued":"queued", - "Error":"alert" - } - NO_LABEL = "No Label" #helpers: