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.
This commit is contained in:
Arun Raghavan 2012-11-20 19:51:41 +05:30
parent c69cffecdc
commit 5132a24b35
2 changed files with 133 additions and 119 deletions

View File

@ -394,6 +394,33 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="channelsVBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="advancedOptions">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkTable" id="encodingSelect">
<property name="can_focus">False</property>
@ -476,32 +503,9 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="channelsVBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="advancedOptions">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<child>
<object class="GtkHBox" id="offsetSelect">
<property name="visible">True</property>
@ -551,6 +555,13 @@
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="advancedLabel">
@ -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>

View File

@ -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
}