diff options
author | Benedikt Meurer <benny@xfce.org> | 2005-09-13 21:40:53 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2005-09-13 21:40:53 +0000 |
commit | 926981bcd6968caa5a95e722c07fab564d291126 (patch) | |
tree | 94e01ac7430e345e175c072b8436fb912ce03c26 /thunar/thunar-file.c | |
parent | 43d490343bf587b5ee3c022abacafcc9a36b6650 (diff) | |
download | thunar-926981bcd6968caa5a95e722c07fab564d291126.tar.gz |
2005-09-13 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-sysdep.h: Add inline atomic operations.
* thunar-vfs/thunar-vfs-info.c, thunar-vfs/thunar-vfs-listdir-job.c,
thunar-vfs/thunar-vfs-mime-application.c,
thunar-vfs/thunar-vfs-mime-database.c,
thunar-vfs/thunar-vfs-monitor.c,
thunar-vfs/thunar-vfs-sysdep.c, thunar-vfs/thunar-vfs-thumb.c,
thunar-vfs/thunar-vfs-transfer-job.c, thunar-vfs/thunar-vfs-trash.c,
thunar-vfs/thunar-vfs-uri.{c,h}, thunar-vfs/thunar-vfs.c,
thunar-vfs/thunar-vfs.symbols, thunar/thunar-clipboard-manager.c,
thunar/thunar-computer-folder.c, thunar/thunar-favourites-model.c,
thunar/thunar-favourites-view.c, thunar/thunar-file.c,
thunar/thunar-icon-factory.c, thunar/thunar-local-file.c,
thunar/thunar-local-folder.c, thunar/thunar-location-buttons.c,
thunar/thunar-path-entry.c, thunar/thunar-standard-view.c,
thunar/thunar-statusbar.c, thunar/thunar-trash-file.c,
thunar/thunar-trash-folder.c: Turn ThunarVfsURI into a boxed type
to make language bindings easier and reduce the overhead. Drop the
foreign host support code, as we can't use it anyways, since nearly
every other existing application that handles file URIs is broken
when it comes to file URIs with authorities. Simplify the
thunar_vfs_uri_to_string() method again and return only escaped
versions of the URI.
* thunar/thunar-path-entry.c(thunar_path_entry_set_current_file):
Display file URIs for non-UTF8 paths.
* tests/test-thunar-vfs-uri.c, tests/test-thunar-vfs-volume-bsd.c:
Update the tests.
* thunar-vfs/Makefile.am, thunar-vfs/thunar-vfs-info.h,
thunar-vfs/thunar-vfs-types.h: Move the system-dependent types to
thunar-vfs-types.h.
* thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols:
Turn ThunarVfsInfo into a boxed type.
(Old svn revision: 17594)
Diffstat (limited to 'thunar/thunar-file.c')
-rw-r--r-- | thunar/thunar-file.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index c32a8516..4a7db988 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -173,7 +173,7 @@ thunar_file_atexit_foreach (gpointer key, { gchar *s; - s = thunar_vfs_uri_to_string (THUNAR_VFS_URI (key), THUNAR_VFS_URI_STRING_UTF8); + s = thunar_vfs_uri_to_string (key); g_print ("--> %s (%u)\n", s, G_OBJECT (value)->ref_count); g_free (s); } @@ -343,7 +343,7 @@ static gchar* thunar_file_info_get_uri (ThunarxFileInfo *file_info) { ThunarVfsURI *uri = thunar_file_get_uri (THUNAR_FILE (file_info)); - return g_strdup (thunar_vfs_uri_to_string (uri, THUNAR_VFS_URI_STRING_ESCAPED)); + return thunar_vfs_uri_to_string (uri); } @@ -358,7 +358,7 @@ thunar_file_info_get_parent_uri (ThunarxFileInfo *file_info) uri = thunar_vfs_uri_parent (uri); if (G_LIKELY (uri != NULL)) { - uri_string = thunar_vfs_uri_to_string (uri, THUNAR_VFS_URI_STRING_ESCAPED); + uri_string = thunar_vfs_uri_to_string (uri); thunar_vfs_uri_unref (uri); } @@ -454,7 +454,7 @@ thunar_file_real_get_parent (ThunarFile *file, parent_uri = thunar_vfs_uri_parent (thunar_file_get_uri (file)); if (G_UNLIKELY (parent_uri == NULL)) { - p = thunar_vfs_uri_to_string (thunar_file_get_uri (file), THUNAR_VFS_URI_STRING_UTF8); + p = thunar_vfs_uri_to_string (thunar_file_get_uri (file)); g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL, _("Failed to determine parent URI for '%s'"), p); g_free (p); @@ -644,11 +644,9 @@ thunar_file_denies_access_permission (ThunarFile *file, ThunarFile* _thunar_file_cache_lookup (ThunarVfsURI *uri) { - g_return_val_if_fail (THUNAR_VFS_IS_URI (uri), NULL); - /* allocate the ThunarFile cache on-demand */ if (G_UNLIKELY (file_cache == NULL)) - file_cache = g_hash_table_new_full (thunar_vfs_uri_hash, thunar_vfs_uri_equal, thunar_vfs_uri_unref, NULL); + file_cache = g_hash_table_new_full (thunar_vfs_uri_hash, thunar_vfs_uri_equal, (GDestroyNotify) thunar_vfs_uri_unref, NULL); return g_hash_table_lookup (file_cache, uri); } @@ -695,7 +693,6 @@ _thunar_file_cache_rename (ThunarFile *file, ThunarVfsURI *uri) { g_return_if_fail (THUNAR_IS_FILE (file)); - g_return_if_fail (THUNAR_VFS_IS_URI (uri)); g_return_if_fail (file_cache != NULL); /* drop the previous entry for the uri */ @@ -730,7 +727,6 @@ thunar_file_get_for_uri (ThunarVfsURI *uri, { ThunarFile *file; - g_return_val_if_fail (THUNAR_VFS_IS_URI (uri), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); /* see if we have the corresponding file cached already */ |