[gthumb] Use gfile_is_dir instead of path_is_dir if FileData is available
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Use gfile_is_dir instead of path_is_dir if FileData is available
- Date: Sun, 7 Jun 2009 15:37:36 -0400 (EDT)
commit 579c84398ad9bca454245c52b18057017bc6c006
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Sun Jun 7 15:36:41 2009 -0400
Use gfile_is_dir instead of path_is_dir if FileData is available
Also rename gfile_path_is_dir -> gfile_is_dir.
Also rename gfile_path_is_file -> gfile_is_file.
---
libgthumb/comments.c | 2 +-
libgthumb/file-utils.c | 4 ++--
libgthumb/gfile-utils.c | 4 ++--
libgthumb/gfile-utils.h | 4 ++--
src/catalog-web-exporter.c | 4 ++--
src/dlg-web-exporter.c | 2 +-
src/gth-browser-actions-callbacks.c | 8 ++++----
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/libgthumb/comments.c b/libgthumb/comments.c
index cf3879c..c1df7ed 100644
--- a/libgthumb/comments.c
+++ b/libgthumb/comments.c
@@ -473,7 +473,7 @@ load_comment_from_xml (const char *uri)
fd = file_data_new_from_path (comment_uri);
g_free (comment_uri);
- if (! gfile_path_is_file (fd->gfile) || ! file_data_has_local_path (fd, NULL)) {
+ if (! gfile_is_file (fd->gfile) || ! file_data_has_local_path (fd, NULL)) {
file_data_unref (fd);
return NULL;
}
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index f7a9b9d..b3c450b 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -816,7 +816,7 @@ path_is_file (const char *path)
file = gfile_new (path);
- result = gfile_path_is_file (file);
+ result = gfile_is_file (file);
g_object_unref (file);
@@ -835,7 +835,7 @@ path_is_dir (const char *path)
file = gfile_new (path);
- result = gfile_path_is_dir (file);
+ result = gfile_is_dir (file);
g_object_unref (file);
diff --git a/libgthumb/gfile-utils.c b/libgthumb/gfile-utils.c
index fc863a7..8c1c80a 100644
--- a/libgthumb/gfile-utils.c
+++ b/libgthumb/gfile-utils.c
@@ -349,14 +349,14 @@ gfile_is_filetype (GFile *file,
gboolean
-gfile_path_is_file (GFile *file)
+gfile_is_file (GFile *file)
{
return gfile_is_filetype (file, G_FILE_TYPE_REGULAR);
}
gboolean
-gfile_path_is_dir (GFile *file)
+gfile_is_dir (GFile *file)
{
return gfile_is_filetype (file, G_FILE_TYPE_DIRECTORY);
}
diff --git a/libgthumb/gfile-utils.h b/libgthumb/gfile-utils.h
index 15b4569..cc3b554 100644
--- a/libgthumb/gfile-utils.h
+++ b/libgthumb/gfile-utils.h
@@ -70,8 +70,8 @@ char * gfile_get_filename_extension (GFile *file);
const char* gfile_get_file_mime_type (GFile *file,
gboolean fast_file_type);
gboolean gfile_image_is_jpeg (GFile *file);
-gboolean gfile_path_is_file (GFile *file);
-gboolean gfile_path_is_dir (GFile *file);
+gboolean gfile_is_file (GFile *file);
+gboolean gfile_is_dir (GFile *file);
goffset gfile_get_file_size (GFile *file);
char * gfile_get_display_name (GFile *file);
diff --git a/src/catalog-web-exporter.c b/src/catalog-web-exporter.c
index b0c015c..629b757 100644
--- a/src/catalog-web-exporter.c
+++ b/src/catalog-web-exporter.c
@@ -317,7 +317,7 @@ gfile_get_style_dir (CatalogWebExporter *ce,
NULL);
g_object_unref (dir);
- if (! gfile_path_is_dir (style_dir)) {
+ if (! gfile_is_dir (style_dir)) {
g_object_unref (style_dir);
style_dir = gfile_new_va (GTHUMB_DATADIR,
@@ -325,7 +325,7 @@ gfile_get_style_dir (CatalogWebExporter *ce,
"albumthemes",
style,
NULL);
- if (! gfile_path_is_dir (style_dir)) {
+ if (! gfile_is_dir (style_dir)) {
g_object_unref (style_dir);
style_dir = NULL;
}
diff --git a/src/dlg-web-exporter.c b/src/dlg-web-exporter.c
index d0c9be8..d55d31a 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)
- && gfile_path_is_file (fd->gfile)
+ && gfile_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 42a0d97..c6ba9d1 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 (gfile_path_is_file (new_fd->gfile)) {
+ if (gfile_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 (gfile_path_is_file (fd->gfile)) {
+ if (gfile_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) {
@@ -745,7 +745,7 @@ create_new_folder_or_library (GthBrowser *browser,
fd = file_data_new_from_path (new_path);
g_free (new_path);
- if (path_is_dir (fd->utf8_path)) {
+ if (gfile_is_dir (fd->gfile)) {
_gtk_error_dialog_run (GTK_WINDOW (browser),
_("The name \"%s\" is already used. " "Please use a different name."), fd->utf8_name);
}
@@ -950,7 +950,7 @@ folder_rename (GtkWindow *window,
old_fd->utf8_name,
_("source and destination are the same"));
}
- else if (path_is_dir (new_fd->utf8_path)) {
+ else if (gfile_is_dir (new_fd->gfile)) {
_gtk_error_dialog_run (window,
_("The name \"%s\" is already used. " "Please use a different name."),
new_fd->utf8_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]