save audio / video input / output device in config
This commit is contained in:
parent
9bfad93279
commit
5f58e2a9ac
|
@ -1957,6 +1957,7 @@ $T will be replaced by auto-not-available timeout</property>
|
|||
<child>
|
||||
<widget class="GtkComboBox" id="audio_input_combobox">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_audio_input_combobox_changed"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
@ -1967,6 +1968,7 @@ $T will be replaced by auto-not-available timeout</property>
|
|||
<child>
|
||||
<widget class="GtkComboBox" id="audio_output_combobox">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_audio_output_combobox_changed"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
@ -2059,6 +2061,7 @@ $T will be replaced by auto-not-available timeout</property>
|
|||
<child>
|
||||
<widget class="GtkComboBox" id="video_input_combobox">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_video_input_combobox_changed"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
@ -2069,6 +2072,7 @@ $T will be replaced by auto-not-available timeout</property>
|
|||
<child>
|
||||
<widget class="GtkComboBox" id="video_output_combobox">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_video_output_combobox_changed"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
|
|
@ -272,6 +272,10 @@ class Config:
|
|||
'ask_offline_status_on_connection': [ opt_bool, False, _('Ask offline status message to all offline contacts when connection to an accoutn is established. WARNING: This causes a lot of requests to be sent!') ],
|
||||
'shell_like_completion': [ opt_bool, False, _('If True, completion in groupchats will be like a shell auto-completion')],
|
||||
'show_self_contact': [opt_str, 'when_other_resource', _('When is self contact row displayed. Can be "always", "when_other_resource" or "never"'), True],
|
||||
'audio_input_device': [opt_str, ''],
|
||||
'audio_output_device': [opt_str, ''],
|
||||
'video_input_device': [opt_str, ''],
|
||||
'video_output_device': [opt_str, ''],
|
||||
}
|
||||
|
||||
__options_per_key = {
|
||||
|
|
|
@ -1026,6 +1026,24 @@ class PreferencesWindow:
|
|||
def on_msg_treemodel_row_deleted(self, model, path):
|
||||
self.save_status_messages(model)
|
||||
|
||||
def on_av_combobox_changed(self, combobox, opt_name):
|
||||
model = combobox.get_model()
|
||||
active = combobox.get_active()
|
||||
device = model[active][1].decode('utf-8')
|
||||
gajim.config.set(opt_name + '_device', device)
|
||||
|
||||
def on_audio_input_combobox_changed(self, widget):
|
||||
self.on_av_combobox_changed(widget, 'audio_input')
|
||||
|
||||
def on_audio_output_combobox_changed(self, widget):
|
||||
self.on_av_combobox_changed(widget, 'audio_output')
|
||||
|
||||
def on_video_input_combobox_changed(self, widget):
|
||||
self.on_av_combobox_changed(widget, 'video_input')
|
||||
|
||||
def on_video_output_combobox_changed(self, widget):
|
||||
self.on_av_combobox_changed(widget, 'video_output')
|
||||
|
||||
def on_applications_combobox_changed(self, widget):
|
||||
gajim.config.set('autodetect_browser_mailer', False)
|
||||
if widget.get_active() == 4:
|
||||
|
|
Loading…
Reference in New Issue