]> Pileus Git - ~andy/gtk/commitdiff
Fixes the GTK+ part of #142308:
authorFederico Mena Quintero <federico@ximian.com>
Tue, 22 Jun 2004 20:08:36 +0000 (20:08 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Tue, 22 Jun 2004 20:08:36 +0000 (20:08 +0000)
2004-06-22  Federico Mena Quintero  <federico@ximian.com>

Fixes the GTK+ part of #142308:

* gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
Use filename_to_path().
(gtk_file_system_unix_uri_to_path): Likewise.
(filename_to_path): Use remove_trailing_slash().

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfilesystemunix.c

index a3ff17215b3e1d0f515f7892f248becb3d2db5ed..1350232edfebdb7160513fca69e172ed7500ff43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-06-22  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes the GTK+ part of #142308:
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
+       Use filename_to_path().
+       (gtk_file_system_unix_uri_to_path): Likewise.
+       (filename_to_path): Use remove_trailing_slash().
+
 2004-06-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_class_init): Improve docs
index a3ff17215b3e1d0f515f7892f248becb3d2db5ed..1350232edfebdb7160513fca69e172ed7500ff43 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-22  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes the GTK+ part of #142308:
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
+       Use filename_to_path().
+       (gtk_file_system_unix_uri_to_path): Likewise.
+       (filename_to_path): Use remove_trailing_slash().
+
 2004-06-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_class_init): Improve docs
index a3ff17215b3e1d0f515f7892f248becb3d2db5ed..1350232edfebdb7160513fca69e172ed7500ff43 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-22  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes the GTK+ part of #142308:
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
+       Use filename_to_path().
+       (gtk_file_system_unix_uri_to_path): Likewise.
+       (filename_to_path): Use remove_trailing_slash().
+
 2004-06-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_class_init): Improve docs
index a3ff17215b3e1d0f515f7892f248becb3d2db5ed..1350232edfebdb7160513fca69e172ed7500ff43 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-22  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes the GTK+ part of #142308:
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
+       Use filename_to_path().
+       (gtk_file_system_unix_uri_to_path): Likewise.
+       (filename_to_path): Use remove_trailing_slash().
+
 2004-06-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_class_init): Improve docs
index 2357bafcfabb7dea53d08a72759abfe020d0a3c3..c61a079670b9b24dd9cb0da972c8b103dfac93c6 100644 (file)
@@ -1018,18 +1018,25 @@ static GtkFilePath *
 gtk_file_system_unix_uri_to_path (GtkFileSystem     *file_system,
                                  const gchar       *uri)
 {
+  GtkFilePath *path;
   gchar *filename = g_filename_from_uri (uri, NULL, NULL);
+
   if (filename)
-    return gtk_file_path_new_steal (filename);
+    {
+      path = filename_to_path (filename);
+      g_free (filename);
+    }
   else
-    return NULL;
+    path = NULL;
+
+  return path;
 }
 
 static GtkFilePath *
 gtk_file_system_unix_filename_to_path (GtkFileSystem *file_system,
                                       const gchar   *filename)
 {
-  return gtk_file_path_new_dup (filename);
+  return filename_to_path (filename);
 }
 
 static const char *
@@ -1833,7 +1840,10 @@ fill_in_mime_type (GtkFileFolderUnix *folder_unix, GError **error)
 static GtkFilePath *
 filename_to_path (const char *filename)
 {
-  return gtk_file_path_new_dup (filename);
+  char *tmp;
+
+  tmp = remove_trailing_slash (filename);
+  return gtk_file_path_new_steal (tmp);
 }
 
 static gboolean