data,ui: Remove MediaExport's title widgets
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 16 Feb 2011 00:55:23 +0000 (02:55 +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-media-export-pref-section.vala

index 99e596f..1c06807 100644 (file)
@@ -83,7 +83,7 @@
                   <object class="GtkTable" id="table4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="n_rows">3</property>
+                    <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="mediaexport-title-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">Ti_tle</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkEntry" id="mediaexport-title-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip_markup" translatable="yes">Write %u for username, %n for real name of the user and %h for host name</property>
-                        <property name="tooltip_text" translatable="yes">Write %u for username, %n for real name of the user and %h for host name</property>
-                        <property name="invisible_char">●</property>
-                        <property name="width_chars">30</property>
-                        <property name="invisible_char_set">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>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkLabel" id="uris-label">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
index ba32731..8902a3c 100644 (file)
@@ -25,8 +25,6 @@ using Gee;
 
 public class Rygel.MediaExportPrefSection : PreferencesSection {
     const string ENABLED_CHECK = "-enabled-checkbutton";
-    const string TITLE_LABEL = "-title-label";
-    const string TITLE_ENTRY = "-title-entry";
     const string NAME = "MediaExport";
     const string URIS_KEY = "uris";
     const string URIS_LABEL = URIS_KEY + "-label";
@@ -38,8 +36,6 @@ public class Rygel.MediaExportPrefSection : PreferencesSection {
     const string CLEAR_BUTTON = "clear-button";
 
     private CheckButton enabled_check;
-    private Entry title_entry;
-
     private ArrayList<Widget> widgets; // All widgets in this section
 
     private TreeView treeview;
@@ -55,13 +51,6 @@ public class Rygel.MediaExportPrefSection : PreferencesSection {
         this.enabled_check = (CheckButton) builder.get_object (name.down () +
                                                                ENABLED_CHECK);
         assert (this.enabled_check != null);
-        this.title_entry = (Entry) builder.get_object (name.down () +
-                                                       TITLE_ENTRY);
-        assert (this.title_entry != null);
-        var title_label = (Label) builder.get_object (name.down () +
-                                                      TITLE_LABEL);
-        assert (title_label != null);
-        this.widgets.add (title_label);
 
         try {
             this.enabled_check.active = config.get_enabled (name);
@@ -69,18 +58,6 @@ public class Rygel.MediaExportPrefSection : PreferencesSection {
             this.enabled_check.active = false;
         }
 
-        string title;
-        try {
-            title = config.get_title (name);
-        } catch (GLib.Error err) {
-            title = name;
-        }
-
-        title = title.replace ("@REALNAME@", "%n");
-        title = title.replace ("@USERNAME@", "%u");
-        title = title.replace ("@HOSTNAME@", "%h");
-        this.title_entry.set_text (title);
-
         this.enabled_check.toggled.connect (this.on_enabled_check_toggled);
 
         this.treeview = (TreeView) builder.get_object (URIS_TEXTVIEW);
@@ -136,11 +113,6 @@ public class Rygel.MediaExportPrefSection : PreferencesSection {
                               UserConfig.ENABLED_KEY,
                               this.enabled_check.active);
 
-        var title = this.title_entry.get_text ().replace ("%n", "@REALNAME@");
-        title = title.replace ("%u", "@USERNAME@");
-        title = title.replace ("%h", "@HOSTNAME@");
-        this.config.set_string (this.name, UserConfig.TITLE_KEY, title);
-
         TreeIter iter;
         var uri_list = new ArrayList<string> ();