<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">8</property>
<child>
- <object class="GtkLabel" id="port-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes" comments="Network Port">_Port</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">port-spinbutton</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="iface-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xscale">0</property>
- <child>
- <object class="GtkSpinButton" id="port-spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="max_length">5</property>
- <property name="invisible_char">●</property>
- <property name="width_chars">5</property>
- <property name="xalign">1</property>
- <property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
- <property name="adjustment">adjustment1</property>
- <property name="climb_rate">1</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="network-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
public class Rygel.GeneralPrefSection : PreferencesSection {
const string UPNP_CHECKBUTTON = "upnp-checkbutton";
const string IFACE_ENTRY = "iface-entry";
- const string PORT_SPINBUTTON = "port-spinbutton";
private ComboBoxText iface_entry;
- private SpinButton port_spin;
private CheckButton upnp_check;
assert (this.upnp_check != null);
this.iface_entry = (ComboBoxText) builder.get_object (IFACE_ENTRY);
assert (this.iface_entry != null);
- this.port_spin = (SpinButton) builder.get_object (PORT_SPINBUTTON);
- assert (this.port_spin != null);
this.context_manager = new ContextManager (null, 0);
// will do just fine. Same goes for rest of the keys.
}
try {
- this.port_spin.set_value (config.get_port ());
- } catch (GLib.Error err) {}
- try {
this.upnp_check.active = this.config.get_upnp_enabled ();
} catch (GLib.Error err) {}
public override void save () {
this.config.set_interface (this.iface_entry.get_active_text ());
- this.config.set_port ((int) this.port_spin.get_value ());
this.config.set_upnp_enabled (this.upnp_check.active);
}