Fix bug in AutoAdd plugin where watchdirs would not display in gtkui when first enabled.

This commit is contained in:
Chase Sterling 2010-09-13 02:16:47 -04:00
parent d9cdff9525
commit c17b466bae
1 changed files with 2 additions and 4 deletions

View File

@ -55,7 +55,6 @@ class OptionsDialog():
def __init__(self): def __init__(self):
pass pass
def show(self, options={}, watchdir_id=None): def show(self, options={}, watchdir_id=None):
self.glade = gtk.glade.XML(get_resource("autoadd_options.glade")) self.glade = gtk.glade.XML(get_resource("autoadd_options.glade"))
self.glade.signal_autoconnect({ self.glade.signal_autoconnect({
@ -208,7 +207,6 @@ class OptionsDialog():
options['label'] = self.glade.get_widget('label').get_text().lower() options['label'] = self.glade.get_widget('label').get_text().lower()
options['label_toggle'] = self.glade.get_widget('label_toggle').get_active() options['label_toggle'] = self.glade.get_widget('label_toggle').get_active()
for id in self.spin_ids: for id in self.spin_ids:
options[id] = self.glade.get_widget(id).get_value() options[id] = self.glade.get_widget(id).get_value()
options[id+'_toggle'] = self.glade.get_widget(id+'_toggle').get_active() options[id+'_toggle'] = self.glade.get_widget(id+'_toggle').get_active()
@ -256,6 +254,7 @@ class GtkUI(GtkPluginBase):
sw.add(self.treeView) sw.add(self.treeView)
sw.show_all() sw.show_all()
component.get("Preferences").add_page("AutoAdd", self.glade.get_widget("prefs_box")) component.get("Preferences").add_page("AutoAdd", self.glade.get_widget("prefs_box"))
self.on_show_prefs()
def disable(self): def disable(self):
@ -331,7 +330,6 @@ class GtkUI(GtkPluginBase):
client.autoadd.set_options(watchdir_id, watchdir) client.autoadd.set_options(watchdir_id, watchdir)
def on_show_prefs(self): def on_show_prefs(self):
client.autoadd.get_config().addCallback(self.cb_get_config) client.autoadd.get_config().addCallback(self.cb_get_config)
def on_options_changed_event(self): def on_options_changed_event(self):