[rygel] data,ui: Remove transcoding options



commit 35ce89d1f2c37a8ed9dfc1b3da3287fb1bdb24b4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Feb 14 18:22:54 2011 +0200

    data,ui: Remove transcoding options

 data/rygel-preferences.ui              |   88 +++-----------------------------
 src/ui/rygel-general-pref-section.vala |   44 ----------------
 2 files changed, 8 insertions(+), 124 deletions(-)
---
diff --git a/data/rygel-preferences.ui b/data/rygel-preferences.ui
index 2035c95..e15e338 100644
--- a/data/rygel-preferences.ui
+++ b/data/rygel-preferences.ui
@@ -83,81 +83,6 @@
                       </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>
@@ -259,7 +184,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">2</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
@@ -375,6 +300,9 @@
                                 <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>
@@ -555,14 +483,14 @@
       <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>
diff --git a/src/ui/rygel-general-pref-section.vala b/src/ui/rygel-general-pref-section.vala
index 03eecec..172159d 100644
--- a/src/ui/rygel-general-pref-section.vala
+++ b/src/ui/rygel-general-pref-section.vala
@@ -27,20 +27,11 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
     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;
 
@@ -54,14 +45,6 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
         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);
 
@@ -80,28 +63,11 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
         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 () {
@@ -109,16 +75,6 @@ public class Rygel.GeneralPrefSection : PreferencesSection {
         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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]