</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">4</property>
- <property name="row_spacing">8</property>
- <child>
- <object class="GtkCheckButton" id="transcoding-checkbutton">
- <property name="label" translatable="yes">_Transcoding support</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="mp3-checkbutton">
- <property name="label" translatable="yes">_MP3</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">12</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="mp2ts-checkbutton">
- <property name="label" translatable="yes">MPE_G TS</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">12</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="lpcm-checkbutton">
- <property name="label" translatable="yes">_LPCM</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">12</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<property name="headers_visible">False</property>
<property name="search_column">0</property>
<property name="fixed_height_mode">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>
<action-widget response="0">button5</action-widget>
</action-widgets>
</object>
+ <object class="GtkSizeGroup" id="general-labels-sizegroup">
+ <property name="mode">both</property>
+ </object>
+ <object class="GtkSizeGroup" id="plugin-labels-sizegroup"/>
<object class="GtkListStore" id="uris-liststore">
<columns>
<!-- column-name path -->
<column type="gchararray"/>
</columns>
</object>
- <object class="GtkSizeGroup" id="general-labels-sizegroup">
- <property name="mode">both</property>
- </object>
- <object class="GtkSizeGroup" id="plugin-labels-sizegroup"/>
</interface>
const string UPNP_CHECKBUTTON = "upnp-checkbutton";
const string IFACE_ENTRY = "iface-entry";
const string PORT_SPINBUTTON = "port-spinbutton";
- const string TRANS_CHECKBUTTON = "transcoding-checkbutton";
- const string MP3_CHECKBUTTON = "mp3-checkbutton";
- const string MP2TS_CHECKBUTTON = "mp2ts-checkbutton";
- const string LPCM_CHECKBUTTON = "lpcm-checkbutton";
private ComboBoxText iface_entry;
private SpinButton port_spin;
- // Transcoding options
private CheckButton upnp_check;
- private CheckButton trans_check;
- private CheckButton mp3_check;
- private CheckButton mp2ts_check;
- private CheckButton lpcm_check;
private ContextManager context_manager;
assert (this.iface_entry != null);
this.port_spin = (SpinButton) builder.get_object (PORT_SPINBUTTON);
assert (this.port_spin != null);
- this.trans_check = (CheckButton) builder.get_object (TRANS_CHECKBUTTON);
- assert (this.trans_check != null);
- this.mp3_check = (CheckButton) builder.get_object (MP3_CHECKBUTTON);
- assert (this.mp3_check != null);
- this.mp2ts_check = (CheckButton) builder.get_object (MP2TS_CHECKBUTTON);
- assert (this.mp2ts_check != null);
- this.lpcm_check = (CheckButton) builder.get_object (LPCM_CHECKBUTTON);
- assert (this.lpcm_check != null);
this.context_manager = new ContextManager (null, 0);
try {
this.upnp_check.active = this.config.get_upnp_enabled ();
} catch (GLib.Error err) {}
- try {
- this.trans_check.active = this.config.get_transcoding ();
- } catch (GLib.Error err) {}
- try {
- this.mp3_check.active = this.config.get_mp3_transcoder ();
- } catch (GLib.Error err) {}
- try {
- this.mp2ts_check.active = this.config.get_mp2ts_transcoder ();
- } catch (GLib.Error err) {}
- try {
- this.lpcm_check.active = this.config.get_lpcm_transcoder ();
- } catch (GLib.Error err) {}
-
- this.trans_check.toggled.connect (this.on_trans_check_toggled);
this.context_manager.context_available.connect
(this.on_context_available);
this.context_manager.context_unavailable.connect
(this.on_context_unavailable);
-
- // Set the sensitivity of dependent widgets
- on_trans_check_toggled (this.trans_check);
}
public override void save () {
this.config.set_port ((int) this.port_spin.get_value ());
this.config.set_upnp_enabled (this.upnp_check.active);
- this.config.set_transcoding (this.trans_check.active);
- this.config.set_mp3_transcoder (this.mp3_check.active);
- this.config.set_mp2ts_transcoder (this.mp2ts_check.active);
- this.config.set_lpcm_transcoder (this.lpcm_check.active);
- }
-
- private void on_trans_check_toggled (ToggleButton trans_check) {
- this.mp3_check.sensitive =
- this.mp2ts_check.sensitive =
- this.lpcm_check.sensitive = trans_check.active;
}
private void on_context_available (GUPnP.ContextManager manager,