data,ui: Remove 'Port' option
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 16 Feb 2011 00:43:16 +0000 (02:43 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 17 Feb 2011 23:47:14 +0000 (01:47 +0200)
data/rygel-preferences.ui
src/ui/rygel-general-pref-section.vala

index 5bd87ff..86be7cd 100644 (file)
                   <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>
index 172159d..283e05d 100644 (file)
@@ -26,10 +26,8 @@ using GUPnP;
 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;
 
@@ -43,8 +41,6 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
         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);
 
@@ -58,9 +54,6 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
             // 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) {}
 
@@ -72,7 +65,6 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
 
     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);
     }