[gthumb] Use gfile_get_mime_type instead of get_file_mime_type
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Use gfile_get_mime_type instead of get_file_mime_type
- Date: Sun, 7 Jun 2009 15:46:03 -0400 (EDT)
commit 5635e45b6b6238caecce36db76cc45b47ba2e30c
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Sun Jun 7 15:45:11 2009 -0400
Use gfile_get_mime_type instead of get_file_mime_type
---
libgthumb/dlg-save-image.c | 3 ++-
libgthumb/file-data.c | 2 +-
libgthumb/file-utils.c | 2 +-
libgthumb/gfile-utils.c | 4 ++--
libgthumb/gfile-utils.h | 2 +-
src/dlg-photo-importer.c | 2 +-
6 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/libgthumb/dlg-save-image.c b/libgthumb/dlg-save-image.c
index 2b33795..dc7e055 100644
--- a/libgthumb/dlg-save-image.c
+++ b/libgthumb/dlg-save-image.c
@@ -32,6 +32,7 @@
#include "dlg-save-image.h"
#include "glib-utils.h"
#include "file-utils.h"
+#include "gfile-utils.h"
#include "gtk-utils.h"
#include "gconf-utils.h"
#include "pixbuf-utils.h"
@@ -193,7 +194,7 @@ file_save_ok_cb (GtkDialog *file_sel,
idx = gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box));
if (idx < 0
|| file_options[idx].type == IMAGE_TYPE_AUTOMATIC)
- mime_type = get_file_mime_type (file->utf8_path, FALSE);
+ mime_type = gfile_get_mime_type (file->gfile, FALSE);
else
mime_type = file_options[idx].mime_type;
file->mime_type = get_static_string (mime_type);
diff --git a/libgthumb/file-data.c b/libgthumb/file-data.c
index 68be117..19e4c12 100644
--- a/libgthumb/file-data.c
+++ b/libgthumb/file-data.c
@@ -256,7 +256,7 @@ void
file_data_update_mime_type (FileData *fd,
gboolean fast_mime_type)
{
- fd->mime_type = get_file_mime_type (fd->utf8_path, fast_mime_type || ! is_local_file (fd->utf8_path));
+ fd->mime_type = gfile_get_mime_type (fd->gfile, fast_mime_type || ! is_local_file (fd->utf8_path));
}
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index b3c450b..81b6258 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -730,7 +730,7 @@ get_file_mime_type (const char *path,
file = gfile_new (path);
- result = gfile_get_file_mime_type (file, fast_file_type);
+ result = gfile_get_mime_type (file, fast_file_type);
g_object_unref (file);
diff --git a/libgthumb/gfile-utils.c b/libgthumb/gfile-utils.c
index 8c1c80a..2e625fd 100644
--- a/libgthumb/gfile-utils.c
+++ b/libgthumb/gfile-utils.c
@@ -232,7 +232,7 @@ gfile_get_filename_extension (GFile *file)
const char*
-gfile_get_file_mime_type (GFile *file,
+gfile_get_mime_type (GFile *file,
gboolean fast_file_type)
{
const char *value;
@@ -292,7 +292,7 @@ _gfile_image_is_type (GFile *file,
{
const char *result;
- result = gfile_get_file_mime_type (file, fast_file_type);
+ result = gfile_get_mime_type (file, fast_file_type);
if (result == NULL)
return FALSE;
diff --git a/libgthumb/gfile-utils.h b/libgthumb/gfile-utils.h
index cc3b554..ea9634e 100644
--- a/libgthumb/gfile-utils.h
+++ b/libgthumb/gfile-utils.h
@@ -67,7 +67,7 @@ GFile * gfile_append_path (GFile *dir,
gboolean gfile_is_local (GFile *file);
char * gfile_get_filename_extension (GFile *file);
-const char* gfile_get_file_mime_type (GFile *file,
+const char* gfile_get_mime_type (GFile *file,
gboolean fast_file_type);
gboolean gfile_image_is_jpeg (GFile *file);
gboolean gfile_is_file (GFile *file);
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index aeddfa5..44c2fe1 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -512,7 +512,7 @@ gfile_import_file_list_recursive (GFile *gfile,
files = gfile_import_file_list_recursive (child, files);
break;
case G_FILE_TYPE_REGULAR:
- mime_type = gfile_get_file_mime_type (child, TRUE);
+ mime_type = gfile_get_mime_type (child, TRUE);
if ((mime_type_is_image (mime_type) ||
mime_type_is_video (mime_type) ||
mime_type_is_audio (mime_type)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]