[rygel] core,ui,media-export: No more specific to folders



commit 60f0be3085d6c95cc77e140917e618950441c9ed
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Jun 5 02:10:26 2009 +0300

    core,ui,media-export: No more specific to folders
    
    The FileChooser dialog however still only lets you choose folders. I have
    no idea how to make it let user be able to choose both folder and files.
---
 data/rygel-preferences.ui                          |   12 ++++----
 data/rygel.schemas                                 |    8 ++--
 .../rygel-media-export-root-container.vala         |    2 +-
 src/ui/rygel-media-export-pref-section.vala        |   30 ++++++++++----------
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/data/rygel-preferences.ui b/data/rygel-preferences.ui
index 33f0dc9..3876427 100644
--- a/data/rygel-preferences.ui
+++ b/data/rygel-preferences.ui
@@ -2,7 +2,7 @@
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
-  <object class="GtkListStore" id="folders-liststore">
+  <object class="GtkListStore" id="uris-liststore">
     <columns>
       <!-- column-name path -->
       <column type="gchararray"/>
@@ -368,12 +368,12 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="folders-label">
+                      <object class="GtkLabel" id="uris-label">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="yalign">0</property>
                         <property name="xpad">12</property>
-                        <property name="label" translatable="yes">F_olders</property>
+                        <property name="label" translatable="yes">_URIs</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
@@ -386,10 +386,10 @@
                         <property name="visible">True</property>
                         <property name="spacing">12</property>
                         <child>
-                          <object class="GtkTreeView" id="folders-treeview">
+                          <object class="GtkTreeView" id="uris-treeview">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="model">folders-liststore</property>
+                            <property name="model">uris-liststore</property>
                             <property name="headers_visible">False</property>
                             <property name="headers_clickable">False</property>
                             <property name="fixed_height_mode">True</property>
@@ -528,7 +528,7 @@
     <property name="page_increment">10</property>
     <property name="page_size">10</property>
   </object>
-  <object class="GtkFileChooserDialog" id="folders-dialog">
+  <object class="GtkFileChooserDialog" id="uris-dialog">
     <property name="can_default">True</property>
     <property name="has_default">True</property>
     <property name="border_width">5</property>
diff --git a/data/rygel.schemas b/data/rygel.schemas
index fcf65d2..89f9f42 100644
--- a/data/rygel.schemas
+++ b/data/rygel.schemas
@@ -111,15 +111,15 @@
         </locale>
       </schema>
       <schema>
-        <key>/schemas/apps/rygel/MediaExport/folders</key>
-        <applyto>/apps/rygel/MediaExport/folders</applyto>
+        <key>/schemas/apps/rygel/MediaExport/uris</key>
+        <applyto>/apps/rygel/MediaExport/uris</applyto>
         <owner>rygel</owner>
         <type>list</type>
         <list_type>string</list_type>
         <default>[]</default>
         <locale name="C">
-          <short>List of folders to export</short>
-          <long>List of folders to export; if list is empty, the XDG media directries are exported</long>
+          <short>List of URIs to export</short>
+          <long>List of URIs to export; if list is empty, the XDG media directries are exported</long>
         </locale>
       </schema>
       <schema>
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index f48501b..8d4cf2b 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -93,7 +93,7 @@ public class Rygel.MediaExportRootContainer : MediaContainer {
         this.children = new ArrayList<MediaExportContainer> ();
 
         var config = Rygel.Configuration.get_default ();
-        var uris = config.get_string_list ("MediaExport", "folders");
+        var uris = config.get_string_list ("MediaExport", "uris");
 
         // either an error occured or the gconf key is not set
         if (uris.size == 0) {
diff --git a/src/ui/rygel-media-export-pref-section.vala b/src/ui/rygel-media-export-pref-section.vala
index 8d4df4c..55fa7be 100644
--- a/src/ui/rygel-media-export-pref-section.vala
+++ b/src/ui/rygel-media-export-pref-section.vala
@@ -25,10 +25,10 @@ using Gee;
 
 public class Rygel.MediaExportPrefSection : Rygel.PluginPrefSection {
     const string NAME = "MediaExport";
-    const string FOLDERS_KEY = "folders";
-    const string FOLDERS_TEXTVIEW = FOLDERS_KEY + "-treeview";
-    const string FOLDERS_LISTSTORE = FOLDERS_KEY + "-liststore";
-    const string FOLDERS_DIALOG = FOLDERS_KEY + "-dialog";
+    const string URIS_KEY = "uris";
+    const string URIS_TEXTVIEW = URIS_KEY + "-treeview";
+    const string URIS_LISTSTORE = URIS_KEY + "-liststore";
+    const string URIS_DIALOG = URIS_KEY + "-dialog";
     const string ADD_BUTTON = "add-button";
     const string REMOVE_BUTTON = "remove-button";
     const string CLEAR_BUTTON = "clear-button";
@@ -41,11 +41,11 @@ public class Rygel.MediaExportPrefSection : Rygel.PluginPrefSection {
                                    Configuration config) {
         base (builder, config, NAME);
 
-        this.treeview = (TreeView) builder.get_object (FOLDERS_TEXTVIEW);
+        this.treeview = (TreeView) builder.get_object (URIS_TEXTVIEW);
         assert (this.treeview != null);
-        this.liststore = (ListStore) builder.get_object (FOLDERS_LISTSTORE);
+        this.liststore = (ListStore) builder.get_object (URIS_LISTSTORE);
         assert (this.liststore != null);
-        this.dialog = (FileChooserDialog) builder.get_object (FOLDERS_DIALOG);
+        this.dialog = (FileChooserDialog) builder.get_object (URIS_DIALOG);
         assert (this.dialog != null);
 
         treeview.insert_column_with_attributes (-1,
@@ -55,12 +55,12 @@ public class Rygel.MediaExportPrefSection : Rygel.PluginPrefSection {
                                                 0,
                                                 null);
 
-        var folders = config.get_string_list (this.name, FOLDERS_KEY);
-        foreach (var folder in folders) {
+        var uris = config.get_string_list (this.name, URIS_KEY);
+        foreach (var uri in uris) {
             TreeIter iter;
 
             this.liststore.append (out iter);
-            this.liststore.set (iter, 0, folder, -1);
+            this.liststore.set (iter, 0, uri, -1);
         }
 
         var button = (Button) builder.get_object (ADD_BUTTON);
@@ -77,18 +77,18 @@ public class Rygel.MediaExportPrefSection : Rygel.PluginPrefSection {
         base.save ();
 
         TreeIter iter;
-        var folder_list = new ArrayList<string> ();
+        var uri_list = new ArrayList<string> ();
 
         if (this.liststore.get_iter_first (out iter)) {
             do {
-                string folder;
+                string uri;
 
-                this.liststore.get (iter, 0, out folder, -1);
-                folder_list.add (folder);
+                this.liststore.get (iter, 0, out uri, -1);
+                uri_list.add (uri);
             } while (this.liststore.iter_next (ref iter));
         }
 
-        this.config.set_string_list (this.name, FOLDERS_KEY, folder_list);
+        this.config.set_string_list (this.name, URIS_KEY, uri_list);
     }
 
     protected override void on_enabled_check_toggled (



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