summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-11-20 19:51:41 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-12-17 15:20:42 +0530
commit5132a24b3511d2fad35721020da596b47e169e0a (patch)
tree30c13d597ae14b7e798b7320eb38d093af42d789
parentc69cffecdc4045a1d1b80dfcd6e971a1391cfddf (diff)
sinkwidget: Move format selection options to 'Advanced' expander
There's no reason to present this for all S/PDIF and HDMI cases. The user can select it when required.
-rw-r--r--src/pavucontrol.glade243
-rw-r--r--src/sinkwidget.cc9
2 files changed, 133 insertions, 119 deletions
diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade
index 616574d..6defb3d 100644
--- a/src/pavucontrol.glade
+++ b/src/pavucontrol.glade
@@ -395,91 +395,6 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="encodingSelect">
- <property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkCheckButton" id="encodingFormatPCM">
- <property name="label" translatable="yes">PCM</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckButton" id="encodingFormatAC3">
- <property name="label" translatable="yes">AC3</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="encodingFormatDTS">
- <property name="label" translatable="yes">DTS</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="encodingFormatEAC3">
- <property name="label" translatable="yes">EAC3</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="encodingFormatMPEG">
- <property name="label" translatable="yes">MPEG</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <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>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="channelsVBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -494,7 +409,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -503,51 +418,147 @@
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkHBox" id="offsetSelect">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
+ <object class="GtkTable" id="encodingSelect">
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Latency offset:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatPCM">
+ <property name="label" translatable="yes">PCM</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatAC3">
+ <property name="label" translatable="yes">AC3</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatDTS">
+ <property name="label" translatable="yes">DTS</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatEAC3">
+ <property name="label" translatable="yes">EAC3</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatMPEG">
+ <property name="label" translatable="yes">MPEG</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <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>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="offsetButton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkHBox" id="offsetSelect">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">ms</property>
- <property name="use_markup">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Latency offset:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="offsetButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">ms</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -563,7 +574,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
index dc52115..1726550 100644
--- a/src/sinkwidget.cc
+++ b/src/sinkwidget.cc
@@ -156,10 +156,13 @@ void SinkWidget::onPortChange() {
void SinkWidget::setDigital(bool digital) {
#if HAVE_EXT_DEVICE_RESTORE_API
- if (digital)
+ if (digital) {
encodingSelect->show();
- else
+ advancedOptions->set_sensitive(true);
+ } else {
+ /* advancedOptions has sensitive=false by default */
encodingSelect->hide();
+ }
#endif
}
@@ -191,4 +194,4 @@ void SinkWidget::onEncodingsChange() {
free(formats);
pa_operation_unref(o);
#endif
-} \ No newline at end of file
+}