this may fix Apply
This commit is contained in:
parent
2a852620ac
commit
f761f40c17
|
@ -112,27 +112,27 @@ class ProfileEditor:
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.scrollbar_position:
|
for item in self.scrollbar_position:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (0)
|
widget.set_active (self.scrollbar_position.index(value))
|
||||||
elif key == 'backspace_binding':
|
elif key == 'backspace_binding':
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.backspace_del_binding:
|
for item in self.backspace_del_binding:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (0)
|
widget.set_active (self.backspace_del_binding.index(value))
|
||||||
elif key == 'delete_binding':
|
elif key == 'delete_binding':
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.backspace_del_binding:
|
for item in self.backspace_del_binding:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (2)
|
widget.set_active (self.backspace_del_binding.index(value))
|
||||||
elif key == 'focus':
|
elif key == 'focus':
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.focus:
|
for item in self.focus:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (0)
|
widget.set_active (self.focus.index(value))
|
||||||
elif key == 'background_type':
|
elif key == 'background_type':
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.background_type:
|
for item in self.background_type:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (0)
|
widget.set_active (self.background_type.index(value))
|
||||||
elif key == 'background_darkness':
|
elif key == 'background_darkness':
|
||||||
widget = gtk.HScale ()
|
widget = gtk.HScale ()
|
||||||
widget.set_digits (1)
|
widget.set_digits (1)
|
||||||
|
@ -172,7 +172,7 @@ class ProfileEditor:
|
||||||
widget = gtk.combo_box_new_text()
|
widget = gtk.combo_box_new_text()
|
||||||
for item in self.tab_position:
|
for item in self.tab_position:
|
||||||
widget.append_text (item)
|
widget.append_text (item)
|
||||||
widget.set_active (0)
|
widget.set_active (self.tab_position.index(value))
|
||||||
else:
|
else:
|
||||||
if type == "bool":
|
if type == "bool":
|
||||||
widget = gtk.CheckButton ()
|
widget = gtk.CheckButton ()
|
||||||
|
@ -203,7 +203,9 @@ class ProfileEditor:
|
||||||
for property in page:
|
for property in page:
|
||||||
widget = self.widgets[property]
|
widget = self.widgets[property]
|
||||||
|
|
||||||
if isinstance (widget, gtk.Entry):
|
if isinstance (widget, gtk.SpinButton):
|
||||||
|
value = widget.get_value ()
|
||||||
|
elif isinstance (widget, gtk.Entry):
|
||||||
value = widget.get_text()
|
value = widget.get_text()
|
||||||
elif isinstance (widget, gtk.CheckButton):
|
elif isinstance (widget, gtk.CheckButton):
|
||||||
value = widget.get_active()
|
value = widget.get_active()
|
||||||
|
@ -223,8 +225,6 @@ class ProfileEditor:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
value = bucket[widget.get_active()]
|
value = bucket[widget.get_active()]
|
||||||
elif isinstance (widget, gtk.SpinButton):
|
|
||||||
value = widget.get_value ()
|
|
||||||
elif isinstance (widget, gtk.FontButton):
|
elif isinstance (widget, gtk.FontButton):
|
||||||
value = widget.get_font_name()
|
value = widget.get_font_name()
|
||||||
elif isinstance (widget, gtk.HScale):
|
elif isinstance (widget, gtk.HScale):
|
||||||
|
@ -248,15 +248,14 @@ class ProfileEditor:
|
||||||
err("skipping unknown thingy: %s" % property)
|
err("skipping unknown thingy: %s" % property)
|
||||||
|
|
||||||
values[property] = value
|
values[property] = value
|
||||||
#print "%s = %s" % (property, value)
|
|
||||||
|
|
||||||
has_changed = False
|
has_changed = False
|
||||||
for source in self.term.conf.sources:
|
for source in self.term.conf.sources:
|
||||||
if isinstance (source, TerminatorConfValuestoreRC):
|
if isinstance (source, TerminatorConfValuestoreRC):
|
||||||
for property in values:
|
for property in values:
|
||||||
try:
|
try:
|
||||||
if source.values[property] != values[property]:
|
if self.source_get_value(property) != values[property]:
|
||||||
print "%s changed from %s to %s" % (property, source.values[property], values[property])
|
print "%s changed from %s to %s" % (property, self.source_get_value(property), values[property])
|
||||||
source.values[property] = values[property]
|
source.values[property] = values[property]
|
||||||
has_changed = True
|
has_changed = True
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue