[gthumb] Use gfile_is_local instead of is_local_file



commit 31a905d3ffc8c9b5df985f907087bd7283839396
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Sun Jun 7 15:55:14 2009 -0400

    Use gfile_is_local instead of is_local_file
---
 libgthumb/file-data.c      |    4 ++--
 libgthumb/thumb-loader.c   |    5 +++--
 src/gth-browser.c          |    2 +-
 src/gth-exif-data-viewer.c |    3 ++-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libgthumb/file-data.c b/libgthumb/file-data.c
index 19e4c12..283a23b 100644
--- a/libgthumb/file-data.c
+++ b/libgthumb/file-data.c
@@ -69,7 +69,7 @@ load_info (FileData *fd)
 	fd->local_path = g_file_get_path (fd->gfile);
 
 	if ( (fd->local_path != NULL) &&
-	     ! is_local_file (fd->utf8_path) &&
+	     ! gfile_is_local (fd->gfile) &&
 	     ! strstr (fd->local_path, ".gvfs")) {
 		/* This can happen when running gThumb over ssh with X-forwarding.
 		   I don't know why, exactly. Possibly a gio bug. */
@@ -256,7 +256,7 @@ void
 file_data_update_mime_type (FileData *fd,
 			    gboolean  fast_mime_type)
 {
-	fd->mime_type = gfile_get_mime_type (fd->gfile, fast_mime_type || ! is_local_file (fd->utf8_path));
+	fd->mime_type = gfile_get_mime_type (fd->gfile, fast_mime_type || ! gfile_is_local (fd->gfile));
 }
 
 
diff --git a/libgthumb/thumb-loader.c b/libgthumb/thumb-loader.c
index dbe75cd..ce943f5 100644
--- a/libgthumb/thumb-loader.c
+++ b/libgthumb/thumb-loader.c
@@ -38,6 +38,7 @@
 #include "image-loader.h"
 #include "pixbuf-utils.h"
 #include "file-utils.h"
+#include "gfile-utils.h"
 #include "glib-utils.h"
 #include "gthumb-marshal.h"
 
@@ -322,7 +323,7 @@ thumb_loader_set_file (ThumbLoader *tl,
 	
 	if (fd != NULL) {
 		tl->priv->file = file_data_dup (fd);
-		if (is_local_file (tl->priv->file->utf8_path)) {
+		if (gfile_is_local (tl->priv->file->gfile)) {
 			char *resolved_path = NULL;
 			resolved_path = resolve_all_symlinks (tl->priv->file->utf8_path);
 			file_data_set_path (tl->priv->file, resolved_path);
@@ -455,7 +456,7 @@ thumb_loader_save_to_cache (ThumbLoader *tl)
 	if ((tl == NULL) || (tl->priv->pixbuf == NULL))
 		return FALSE;
 
-	if (is_local_file (tl->priv->file->utf8_path)) {
+	if (gfile_is_local (tl->priv->file->gfile)) {
 		char *cache_base_uri;
 
 		/* Do not save thumbnails from the user's thumbnail directory,
diff --git a/src/gth-browser.c b/src/gth-browser.c
index 4c9cafb..2fa0ff3 100644
--- a/src/gth-browser.c
+++ b/src/gth-browser.c
@@ -8211,7 +8211,7 @@ get_image_to_preload (GthBrowser *browser,
 
 	fdata = gth_file_view_get_image_data (browser->priv->file_list->view, pos);
 	if ((fdata == NULL) || 
-	    ! is_local_file (fdata->utf8_path) ||
+	    ! gfile_is_local (fdata->gfile) ||
 	    (fdata->local_path == NULL) ||
 	    ! mime_type_is_image (fdata->mime_type)) {
 		file_data_unref (fdata); 
diff --git a/src/gth-exif-data-viewer.c b/src/gth-exif-data-viewer.c
index 350c193..cc8c052 100644
--- a/src/gth-exif-data-viewer.c
+++ b/src/gth-exif-data-viewer.c
@@ -29,6 +29,7 @@
 #include <gio/gio.h>
 
 #include "file-utils.h"
+#include "gfile-utils.h"
 #include "glib-utils.h"
 #include "gth-exif-utils.h"
 #include "gth-exif-data-viewer.h"
@@ -340,7 +341,7 @@ update_file_info (GthExifDataViewer *edv)
 	add_to_exif_display_list (edv, GTH_METADATA_CATEGORY_FILE, NULL, _("Path"),
 				  edv->priv->file->utf8_path, NULL, -7, FALSE);
 
-	if (!is_local_file (edv->priv->file->utf8_path)) {
+	if (!gfile_is_local (edv->priv->file->gfile)) {
 	        add_to_exif_display_list (edv, GTH_METADATA_CATEGORY_FILE, NULL, _("Mounted at"),
         	                          edv->priv->file->local_path, NULL, -6, FALSE);
 	}



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