prepare preference audio / video tab

This commit is contained in:
Yann Leboulanger 2009-11-27 22:17:24 +01:00
parent 723c09d26d
commit 8b3276cc12
2 changed files with 218 additions and 2 deletions

View File

@ -11,6 +11,7 @@
<child>
<widget class="GtkVBox" id="vbox13">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkNotebook" id="preferences_notebook">
@ -21,6 +22,7 @@
<widget class="GtkVBox" id="vbox41">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame1">
@ -38,6 +40,7 @@
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="show_avatars_in_roster_checkbutton">
@ -363,6 +366,7 @@ Detached roster with chat grouped by type</property>
<widget class="GtkVBox" id="vbox42">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkFrame" id="frame29">
@ -377,6 +381,7 @@ Detached roster with chat grouped by type</property>
<child>
<widget class="GtkVBox" id="vbox67">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox1">
@ -475,6 +480,7 @@ Show only in roster</property>
<child>
<widget class="GtkVBox" id="vbox_gmail">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="notify_gmail_checkbutton">
@ -626,6 +632,7 @@ Always</property>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox4">
@ -721,6 +728,7 @@ Always</property>
<widget class="GtkVBox" id="vbox11">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame13">
@ -848,6 +856,7 @@ Disabled</property>
<widget class="GtkVBox" id="status_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame81">
@ -1044,6 +1053,7 @@ $T will be replaced by auto-not-available timeout</property>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox2934">
@ -1293,6 +1303,7 @@ $T will be replaced by auto-not-available timeout</property>
<widget class="GtkVBox" id="vbox58">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="frame9">
@ -1921,10 +1932,193 @@ $T will be replaced by auto-not-available timeout</property>
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="audio_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table6">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkComboBox" id="audio_input_combobox">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="audio_output_combobox">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Audio input device</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Audio output device</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Audio&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame6">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table8">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Video input device</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Video output device</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="video_input_combobox">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="video_output_combobox">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">5</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="label" translatable="yes">Audio / Video</property>
</widget>
<packing>
<property name="position">5</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox45">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<widget class="GtkFrame" id="applications_frame">
@ -1939,6 +2133,7 @@ $T will be replaced by auto-not-available timeout</property>
<child>
<widget class="GtkVBox" id="vbox50">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkComboBox" id="applications_combobox">
@ -2193,6 +2388,7 @@ Custom</property>
<child>
<widget class="GtkVBox" id="vbox66">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="log_show_changes_checkbutton">
@ -2324,7 +2520,7 @@ Custom</property>
</child>
</widget>
<packing>
<property name="position">5</property>
<property name="position">6</property>
</packing>
</child>
<child>
@ -2333,7 +2529,7 @@ Custom</property>
<property name="label" translatable="yes">Advanced</property>
</widget>
<packing>
<property name="position">5</property>
<property name="position">6</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>

View File

@ -414,6 +414,26 @@ class PreferencesWindow:
buf = self.xml.get_widget('msg_textview').get_buffer()
buf.connect('changed', self.on_msg_textview_changed)
### Style tab ###
# Audio
def create_av_combobox(opt_name, device_dict):
combobox = self.xml.get_widget(opt_name + '_combobox')
cell = gtk.CellRendererText()
combobox.pack_start(cell, True)
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]])
if gajim.config.get(opt_name + '_device') == name:
combobox.set_active(i)
i += 1
create_av_combobox('audio_input', {'test': 'test'})
create_av_combobox('audio_output', {'test': 'test'})
create_av_combobox('video_input', {'test': 'test'})
create_av_combobox('video_output', {'test': 'test'})
### Advanced tab ###
# open links with
if os.name == 'nt':