[Xfce4-commits] <thunar:master> Use macro to get uri where possible.
Nick Schermer
noreply at xfce.org
Mon Apr 2 20:58:01 CEST 2012
Updating branch refs/heads/master
to dfdce0f2de4a8de193038aaf07a9ba0488731e8f (commit)
from a70c7477ac34e547ab5738a9804f5cfd1adf988e (commit)
commit dfdce0f2de4a8de193038aaf07a9ba0488731e8f
Author: Nick Schermer <nick at xfce.org>
Date: Mon Apr 2 20:57:48 2012 +0200
Use macro to get uri where possible.
thunar/thunar-file.c | 10 +++++-----
thunar/thunar-shortcuts-model.c | 2 +-
thunar/thunar-standard-view.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index cb1d781..e01f859 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -326,7 +326,7 @@ thunar_file_info_get_name (ThunarxFileInfo *file_info)
static gchar*
thunar_file_info_get_uri (ThunarxFileInfo *file_info)
{
- return g_file_get_uri (THUNAR_FILE (file_info)->gfile);
+ return thunar_file_dup_uri (file_info);
}
@@ -352,7 +352,7 @@ thunar_file_info_get_parent_uri (ThunarxFileInfo *file_info)
static gchar*
thunar_file_info_get_uri_scheme (ThunarxFileInfo *file_info)
{
- return g_file_get_uri_scheme (THUNAR_FILE (file_info)->gfile);
+ return thunar_file_dup_uri (file_info);
}
@@ -877,11 +877,11 @@ thunar_file_load (ThunarFile *file,
{
uri = g_file_get_path (file->gfile);
if (uri == NULL)
- uri = g_file_get_uri (file->gfile);
+ uri = thunar_file_dup_uri (file);
}
else
{
- uri = g_file_get_uri (file->gfile);
+ uri = thunar_file_dup_uri (file);
}
file->display_name = g_filename_display_name (uri);
@@ -894,7 +894,7 @@ thunar_file_load (ThunarFile *file,
(file->flags & ~THUNAR_FILE_THUMB_STATE_MASK) | THUNAR_FILE_THUMB_STATE_UNKNOWN;
/* determine thumbnail path */
- uri = g_file_get_uri (file->gfile);
+ uri = thunar_file_dup_uri (file);
md5_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
base_name = g_strdup_printf ("%s.png", md5_hash);
file->thumbnail_path = g_build_filename (xfce_get_homedir (), ".thumbnails",
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 8944461..a2f67eb 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -1034,7 +1034,7 @@ thunar_shortcuts_model_save (ThunarShortcutsModel *model)
shortcut = THUNAR_SHORTCUT (lp->data);
if (shortcut->type == THUNAR_SHORTCUT_USER_DEFINED)
{
- uri = g_file_get_uri (thunar_file_get_file (shortcut->file));
+ uri = thunar_file_dup_uri (shortcut->file);
if (G_LIKELY (shortcut->name != NULL))
fprintf (fp, "%s %s\n", uri, shortcut->name);
else
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 9ea8265..b8e22db 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -2774,7 +2774,7 @@ thunar_standard_view_drag_data_received (GtkWidget *view,
if (G_LIKELY (file != NULL))
{
/* determine the absolute path to the target directory */
- working_directory = g_file_get_uri (thunar_file_get_file (file));
+ working_directory = thunar_file_dup_uri (file);
/* prepare the basic part of the command */
argv[n++] = "exo-desktop-item-edit";
More information about the Xfce4-commits
mailing list