A bit of refactoring
This commit is contained in:
parent
8b3276cc12
commit
7c2ea20c03
1 changed files with 5 additions and 6 deletions
|
@ -423,12 +423,11 @@ class PreferencesWindow:
|
|||
combobox.add_attribute(cell, 'text', 0)
|
||||
model = gtk.ListStore(str, str)
|
||||
combobox.set_model(model)
|
||||
i = 0
|
||||
for name in device_dict:
|
||||
model.append([name, device_dict[name]])
|
||||
|
||||
for index, (name, value) in enumerate(device_dict.iteritems()):
|
||||
model.append([name, value])
|
||||
if gajim.config.get(opt_name + '_device') == name:
|
||||
combobox.set_active(i)
|
||||
i += 1
|
||||
combobox.set_active(index)
|
||||
|
||||
create_av_combobox('audio_input', {'test': 'test'})
|
||||
create_av_combobox('audio_output', {'test': 'test'})
|
||||
|
|
Loading…
Add table
Reference in a new issue