[maemo-commits] [maemo-commits] r9239 - projects/haf/trunk/hildon-fm/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jan 22 20:31:18 EET 2007
Author: marivoll
Date: 2007-01-22 20:31:17 +0200 (Mon, 22 Jan 2007)
New Revision: 9239

Modified:
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-private.c
Log:
	* hildon-fm/hildon-file-system-private.c
	(_hildon_file_system_compare_ignore_last_separator): Skip
	"file://" prefixes before comparing.
	(hildon_file_system_create_backend): Use gtk_file_system_create
	always.


Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-private.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-private.c	2007-01-22 18:29:08 UTC (rev 9238)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-private.c	2007-01-22 18:31:17 UTC (rev 9239)
@@ -56,6 +56,17 @@
 {        
     gint len_a, len_b;
 
+    /* XXX - Canonicalize the "file://" prefix away since not all path
+             strings use it uniformly.  We should really be using the
+             GtkFileSystem path manipulation API religiously instead
+             of doing it ourself.
+    */
+
+    if (g_str_has_prefix (a, "file://"))
+      a += 7;
+    if (g_str_has_prefix (b, "file://"))
+      b += 7;
+
     len_a = strlen(a);
     len_b = strlen(b);
 
@@ -640,11 +651,7 @@
         name = default_name;
     }
     if (name) {
-#if WITH_GTK_2_10
         result = gtk_file_system_create (name);
-#else
-        result = hildon_gtk_file_system_create (name);
-#endif
         if (!GTK_IS_FILE_SYSTEM(result))
             ULOG_WARN("Cannot create \"%s\" backend", name);
     }


More information about the maemo-commits mailing list