src/devicewidget.cc | 9 + src/devicewidget.h | 1 src/pavucontrol.glade | 281 +++++++++++++++++++++++++++----------------------- src/sinkwidget.cc | 9 + 4 files changed, 167 insertions(+), 133 deletions(-)
New commits: commit 5132a24b3511d2fad35721020da596b47e169e0a Author: Arun Raghavan <[email protected]> Date: Tue Nov 20 19:51:41 2012 +0530 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. 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"><b>Latency offset:</b></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"><b>Latency offset:</b></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 +} commit c69cffecdc4045a1d1b80dfcd6e971a1391cfddf Author: Arun Raghavan <[email protected]> Date: Tue Nov 20 16:21:53 2012 +0530 devicewidget: Move latency offset into an expander We don't want to flood users with this option, let's just leave it closed by default for those who need it. diff --git a/src/devicewidget.cc b/src/devicewidget.cc index ba08cc8..1c34ea6 100644 --- a/src/devicewidget.cc +++ b/src/devicewidget.cc @@ -40,6 +40,7 @@ DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Buil x->get_widget("defaultToggleButton", defaultToggleButton); x->get_widget("portSelect", portSelect); x->get_widget("portList", portList); + x->get_widget("advancedOptions", advancedOptions); x->get_widget("offsetSelect", offsetSelect); x->get_widget("offsetButton", offsetButton); @@ -194,13 +195,17 @@ void DeviceWidget::prepareMenu() { if (ports.size() > 0) { portSelect->show(); - if (pa_context_get_server_protocol_version(get_context()) >= 27) + if (pa_context_get_server_protocol_version(get_context()) >= 27) { offsetSelect->show(); - else + advancedOptions->set_sensitive(true); + } else { + /* advancedOptions has sensitive=false by default */ offsetSelect->hide(); + } } else { portSelect->hide(); + advancedOptions->set_sensitive(false); offsetSelect->hide(); } } diff --git a/src/devicewidget.h b/src/devicewidget.h index f099e6e..d2dff51 100644 --- a/src/devicewidget.h +++ b/src/devicewidget.h @@ -94,6 +94,7 @@ protected: ModelColumns portModel; + Gtk::Expander *advancedOptions; Gtk::HBox *portSelect, *offsetSelect; Gtk::ComboBox *portList; Glib::RefPtr<Gtk::ListStore> treeModel; diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade index befdee0..616574d 100644 --- a/src/pavucontrol.glade +++ b/src/pavucontrol.glade @@ -395,61 +395,6 @@ </packing> </child> <child> - <object class="GtkHBox" id="offsetSelect"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><b>Latency offset:</b></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="label3"> - <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">False</property> - <property name="position">2</property> - </packing> - </child> - <child> <object class="GtkTable" id="encodingSelect"> <property name="can_focus">False</property> <property name="n_rows">2</property> @@ -531,7 +476,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> @@ -549,6 +494,75 @@ <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> + <property name="can_focus">False</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"><b>Latency offset:</b></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> + </child> + <child type="label"> + <object class="GtkLabel" id="advancedLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Advanced</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">4</property> </packing> </child>
_______________________________________________ pulseaudio-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
