label-plugin:remove obsolete prefs

This commit is contained in:
Martijn Voncken 2008-08-25 21:49:38 +00:00
parent df3471085c
commit ad7e1cc4bc
3 changed files with 7 additions and 181 deletions

View File

@ -1,172 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Mon Aug 4 01:52:50 2008 --> <!--Generated with glade3 3.4.5 on Mon Aug 25 23:44:30 2008 -->
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="window1"> <widget class="GtkWindow" id="window1">
<child> <child>
<widget class="GtkVBox" id="label_prefs_box"> <widget class="GtkVBox" id="label_prefs_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child>
<widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="hide_zero_hits">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Hide zero hits</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="ypad">5</property>
<property name="label" translatable="yes">&lt;b&gt;General&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
<widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<child>
<widget class="GtkCheckButton" id="show_states">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show states</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
</child>
<child>
<widget class="GtkCheckButton" id="show_trackers">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show trackers</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="show_labels">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show labels</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="ypad">5</property>
<property name="label" translatable="yes">&lt;b&gt;Sidebar&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<widget class="GtkFrame" id="frame3"> <widget class="GtkFrame" id="frame3">
<property name="visible">True</property> <property name="visible">True</property>
@ -197,9 +37,6 @@
</packing> </packing>
</child> </child>
</widget> </widget>
<packing>
<property name="position">2</property>
</packing>
</child> </child>
</widget> </widget>
</child> </child>

View File

@ -40,18 +40,16 @@ from deluge.log import LOG as log
from deluge.ui.client import aclient from deluge.ui.client import aclient
class LabelConfig(object): 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): def __init__(self, plugin):
self.plugin = plugin self.plugin = plugin
self.labels = []
def load(self): def load(self):
#self.glade = gtk.glade.XML(self.get_resource("label_pref.glade"))
log.debug('Adding Label Preferences page') log.debug('Adding Label Preferences page')
self.glade = gtk.glade.XML(self.get_resource("label_pref.glade")) self.glade = gtk.glade.XML(self.get_resource("label_pref.glade"))
@ -74,13 +72,13 @@ class LabelConfig(object):
def cb_global_options(self, options): def cb_global_options(self, options):
log.debug("options=%s" % options) log.debug("options=%s" % options)
"""
for id in self.chk_ids: for id in self.chk_ids:
self.glade.get_widget(id).set_active(bool(options[id])) self.glade.get_widget(id).set_active(bool(options[id]))
"""
def on_apply_prefs(self): def on_apply_prefs(self):
options = {} options = {}
for id in self.chk_ids: #update options dict here.
options[id] = self.glade.get_widget(id).get_active()
aclient.label_set_global_options(None, options) aclient.label_set_global_options(None, options)

View File

@ -40,15 +40,6 @@ import deluge.common
from deluge.log import LOG as log from deluge.log import LOG as log
from deluge.ui.client import aclient from deluge.ui.client import aclient
STATE_PIX = {
"Downloading":"downloading",
"Seeding":"seeding",
"Paused":"inactive",
"Checking":"checking",
"Queued":"queued",
"Error":"alert"
}
NO_LABEL = "No Label" NO_LABEL = "No Label"
#helpers: #helpers: