Allow external update checkbox to use external config
svn: r14347
This commit is contained in:
parent
cf03374f70
commit
2b27d52782
@ -220,8 +220,10 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
|
|||||||
color_hex_label.set_text(hexval)
|
color_hex_label.set_text(hexval)
|
||||||
self.__config.set(constant, hexval)
|
self.__config.set(constant, hexval)
|
||||||
|
|
||||||
def update_checkbox(self, obj, constant):
|
def update_checkbox(self, obj, constant, config=None):
|
||||||
self.__config.set(constant, obj.get_active())
|
if not config:
|
||||||
|
config = self.__config
|
||||||
|
config.set(constant, obj.get_active())
|
||||||
|
|
||||||
def update_radiobox(self, obj, constant):
|
def update_radiobox(self, obj, constant):
|
||||||
self.__config.set(constant, obj.get_active())
|
self.__config.set(constant, obj.get_active())
|
||||||
@ -231,7 +233,7 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
|
|||||||
config = self.__config
|
config = self.__config
|
||||||
checkbox = gtk.CheckButton(label)
|
checkbox = gtk.CheckButton(label)
|
||||||
checkbox.set_active(config.get(constant))
|
checkbox.set_active(config.get(constant))
|
||||||
checkbox.connect('toggled', self.update_checkbox, constant)
|
checkbox.connect('toggled', self.update_checkbox, constant, config)
|
||||||
table.attach(checkbox, start, stop, index, index+1, yoptions=0)
|
table.attach(checkbox, start, stop, index, index+1, yoptions=0)
|
||||||
|
|
||||||
def add_radiobox(self, table, label, index, constant, group, column, config=None):
|
def add_radiobox(self, table, label, index, constant, group, column, config=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user