Don't try and set an active dropdown item that doesn't exist. Closes LP #361481
This commit is contained in:
parent
46b73f406a
commit
8825cdc8ba
|
@ -142,26 +142,31 @@ class ProfileEditor:
|
|||
widget = gtk.combo_box_new_text()
|
||||
for item in self.scrollbar_position:
|
||||
widget.append_text (item)
|
||||
if value in self.scrollbar_position:
|
||||
widget.set_active (self.scrollbar_position.index(value))
|
||||
elif key == 'backspace_binding':
|
||||
widget = gtk.combo_box_new_text()
|
||||
for item in self.backspace_del_binding:
|
||||
widget.append_text (item)
|
||||
if value in self.backspace_del_binding:
|
||||
widget.set_active (self.backspace_del_binding.index(value))
|
||||
elif key == 'delete_binding':
|
||||
widget = gtk.combo_box_new_text()
|
||||
for item in self.backspace_del_binding:
|
||||
widget.append_text (item)
|
||||
if value in self.backspace_del_binding:
|
||||
widget.set_active (self.backspace_del_binding.index(value))
|
||||
elif key == 'focus':
|
||||
widget = gtk.combo_box_new_text()
|
||||
for item in self.focus:
|
||||
widget.append_text (item)
|
||||
if value in self.focus:
|
||||
widget.set_active (self.focus.index(value))
|
||||
elif key == 'background_type':
|
||||
widget = gtk.combo_box_new_text()
|
||||
for item in self.background_type:
|
||||
widget.append_text (item)
|
||||
if value in self.background_type:
|
||||
widget.set_active (self.background_type.index(value))
|
||||
elif key == 'background_darkness':
|
||||
widget = gtk.HScale ()
|
||||
|
@ -209,11 +214,13 @@ class ProfileEditor:
|
|||
widget = gtk.combo_box_new_text()
|
||||
for item in self.tab_position:
|
||||
widget.append_text (item)
|
||||
if value in self.tab_position:
|
||||
widget.set_active (self.tab_position.index(value))
|
||||
elif key == 'cursor_shape':
|
||||
widget = gtk.combo_box_new_text()
|
||||
for item in self.cursor_shape:
|
||||
widget.append_text (item)
|
||||
if value in self.cursor_shape:
|
||||
widget.set_active (self.cursor_shape.index (value))
|
||||
else:
|
||||
if type == "bool":
|
||||
|
|
Loading…
Reference in New Issue