[gthumb] Use gfile_path_is_file instead of path_is_file if FileData available



commit 8ade1ef53b977766fb9f54a95988ec9dba9996e5
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Sun Jun 7 15:29:59 2009 -0400

    Use gfile_path_is_file instead of path_is_file if FileData available
---
 libgthumb/comments.c                |    3 ++-
 src/dlg-web-exporter.c              |    2 +-
 src/gth-browser-actions-callbacks.c |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libgthumb/comments.c b/libgthumb/comments.c
index 1cbe5b6..cf3879c 100644
--- a/libgthumb/comments.c
+++ b/libgthumb/comments.c
@@ -40,6 +40,7 @@
 #include "typedefs.h"
 #include "comments.h"
 #include "file-utils.h"
+#include "gfile-utils.h"
 #include "glib-utils.h"
 #include "gtk-utils.h"
 #include "gth-exif-utils.h"
@@ -472,7 +473,7 @@ load_comment_from_xml (const char *uri)
 	fd = file_data_new_from_path (comment_uri);
 	g_free (comment_uri);
 
-	if (! path_is_file (fd->utf8_path) || ! file_data_has_local_path (fd, NULL)) {
+	if (! gfile_path_is_file (fd->gfile) || ! file_data_has_local_path (fd, NULL)) {
 		file_data_unref (fd);
 		return NULL;
 	}
diff --git a/src/dlg-web-exporter.c b/src/dlg-web-exporter.c
index 5cca69d..d0c9be8 100644
--- a/src/dlg-web-exporter.c
+++ b/src/dlg-web-exporter.c
@@ -901,7 +901,7 @@ theme_dialog__sel_changed_cb (GtkTreeSelection *selection,
 		g_free (filename);
 
 		if (file_data_has_local_path (fd, NULL)
-		    && path_is_file (fd->local_path)
+		    && gfile_path_is_file (fd->gfile)
 		    && ((image = gdk_pixbuf_new_from_file (fd->local_path, NULL)) != NULL)) {
 			int        w = gdk_pixbuf_get_width (image);
 			int        h = gdk_pixbuf_get_height (image);
diff --git a/src/gth-browser-actions-callbacks.c b/src/gth-browser-actions-callbacks.c
index 7afd534..42a0d97 100644
--- a/src/gth-browser-actions-callbacks.c
+++ b/src/gth-browser-actions-callbacks.c
@@ -490,7 +490,7 @@ catalog_rename (GthBrowser *browser,
 	new_fd = file_data_new_from_path (new_catalog_path);
 	g_free (new_catalog_path);
 
-	if (path_is_file (new_fd->utf8_path)) {
+	if (gfile_path_is_file (new_fd->gfile)) {
 		_gtk_error_dialog_run (GTK_WINDOW (browser),
 				       _("The name \"%s\" is already used. " "Please use a different name."), new_fd->utf8_name);
 	} 
@@ -679,7 +679,7 @@ gth_browser_activate_action_edit_current_catalog_new (GtkAction  *action,
 	g_free (new_name);
 	g_free (new_catalog_path);
 	
-	if (path_is_file (fd->utf8_path)) {
+	if (gfile_path_is_file (fd->gfile)) {
 		_gtk_error_dialog_run (GTK_WINDOW (browser),
 				       _("The name \"%s\" is already used. " "Please use a different name."), fd->utf8_name);
 	} else if ((handle = g_file_create (fd->gfile, G_FILE_CREATE_PRIVATE, NULL, &error)) != NULL) {



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