[gthumb] Removed more cruft
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Removed more cruft
- Date: Tue, 12 May 2009 09:07:36 -0400 (EDT)
commit aa821a2416fac2d80e6612dfbe8389da297de480
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Tue May 12 09:07:13 2009 -0400
Removed more cruft
---
libgthumb/file-utils.c | 59 +---------------------------------------------
libgthumb/file-utils.h | 4 ---
libgthumb/gfile-utils.c | 7 -----
libgthumb/gfile-utils.h | 1 -
src/dlg-file-utils.c | 14 -----------
src/dlg-photo-importer.c | 16 ------------
6 files changed, 1 insertions(+), 100 deletions(-)
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index ae24c8c..376c08c 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -789,29 +789,6 @@ mime_type_is_hdr (const char *mime_type)
gboolean
-mime_type_is_tiff (const char *mime_type)
-{
- return mime_type_is (mime_type, "image/tiff");
-}
-
-
-gboolean
-image_is_gif (const char *path)
-{
- GFile *file;
- gboolean result;
-
- file = gfile_new (path);
-
- result = gfile_image_is_gif (file);
-
- g_object_unref (file);
-
- return result;
-}
-
-
-gboolean
path_exists (const char *path)
{
if (! path || ! *path)
@@ -1054,7 +1031,7 @@ remove_host_from_uri (const char *uri)
}
-char *
+static char *
get_uri_host (const char *uri)
{
const char *idx;
@@ -2376,40 +2353,6 @@ is_mime_type_writable (const char *mime_type)
}
-gboolean
-can_read_write_execute (const char *path)
-{
- GFileInfo *info;
- GFile *gfile;
- GError *error = NULL;
- gboolean result, a, b, c;
-
- gfile = gfile_new (path);
- info = g_file_query_info (gfile,
- G_FILE_ATTRIBUTE_ACCESS_CAN_READ ","
- G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ","
- G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE,
- G_FILE_QUERY_INFO_NONE,
- NULL,
- &error);
-
- if (error != NULL) {
- gfile_warning ("Failed to get directory permission information", gfile, error);
- g_error_free (error);
- result = FALSE;
- } else {
- result = ((a=g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) &&
- (b=g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) &&
- (c=g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE)));
- }
-
- g_object_unref (info);
- g_object_unref (gfile);
-
- return result;
-}
-
-
/* VFS caching */
diff --git a/libgthumb/file-utils.h b/libgthumb/file-utils.h
index 694e6bc..6a24955 100644
--- a/libgthumb/file-utils.h
+++ b/libgthumb/file-utils.h
@@ -135,7 +135,6 @@ gboolean image_is_type (const char *name,
gboolean fast_file_type);
gboolean image_is_jpeg (const char *name);
gboolean mime_type_is_raw (const char *name);
-gboolean image_is_gif (const char *name);
gboolean path_exists (const char *s);
gboolean path_is_file (const char *s);
gboolean path_is_dir (const char *s);
@@ -151,7 +150,6 @@ char * get_utf8_display_name_from_uri (const char *uri);
const char * get_home_uri (void);
char * get_uri_scheme (const char *uri);
const char * remove_host_from_uri (const char *uri);
-char * get_uri_host (const char *uri);
char * get_base_uri (const char *uri);
gboolean uri_has_scheme (const char *uri);
gboolean uri_scheme_is_file (const char *uri);
@@ -230,10 +228,8 @@ const char* get_file_mime_type (const char *path,
gboolean fast_file_type);
const char * get_mime_type_from_ext (const char *ext);
gboolean is_mime_type_writable (const char *mime_type);
-gboolean can_read_write_execute (const char *path);
gboolean is_local_file (const char *filename);
void free_cache (void);
-void check_cache_free_space (void);
GHashTable * read_dot_hidden_file (const char *uri);
/* Pixbuf + VFS */
diff --git a/libgthumb/gfile-utils.c b/libgthumb/gfile-utils.c
index fab36c3..8c0b4ef 100644
--- a/libgthumb/gfile-utils.c
+++ b/libgthumb/gfile-utils.c
@@ -317,13 +317,6 @@ gfile_image_is_jpeg (GFile *file)
}
-gboolean
-gfile_image_is_gif (GFile *file)
-{
- return _gfile_image_is_type__gconf_file_type (file, "image/gif");
-}
-
-
static gboolean
gfile_is_filetype (GFile *file,
GFileType file_type)
diff --git a/libgthumb/gfile-utils.h b/libgthumb/gfile-utils.h
index 622ff4e..4d194c9 100644
--- a/libgthumb/gfile-utils.h
+++ b/libgthumb/gfile-utils.h
@@ -70,7 +70,6 @@ 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_image_is_gif (GFile *file);
gboolean gfile_path_is_file (GFile *file);
gboolean gfile_path_is_dir (GFile *file);
goffset gfile_get_file_size (GFile *file);
diff --git a/src/dlg-file-utils.c b/src/dlg-file-utils.c
index 9908ec7..16b7ad6 100644
--- a/src/dlg-file-utils.c
+++ b/src/dlg-file-utils.c
@@ -155,21 +155,7 @@ dlg_check_folder (GthWindow *window,
return FALSE;
}
- /* check permissions */
-
- if (! can_read_write_execute (dir)) {
- char *utf8_path;
- utf8_path = get_utf8_display_name_from_uri (dir);
- _gtk_error_dialog_run (GTK_WINDOW (window),
- _("You don't have the right permissions to create images in the folder \"%s\""),
- utf8_path);
- g_free (utf8_path);
- g_free (dir);
- return FALSE;
- }
-
g_free (dir);
-
return TRUE;
}
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index 46d4ac3..a86a9bd 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -1708,22 +1708,6 @@ ok_clicked_cb (GtkButton *button,
}
file_data_unref (folder_fd);
- if (! can_read_write_execute (data->local_folder)) {
- char *utf8_path;
- char *msg;
- utf8_path = get_utf8_display_name_from_uri (data->local_folder);
- msg = g_strdup_printf (_("You don't have the right permissions to create images in the folder \"%s\""), utf8_path);
-
- display_error_dialog (data, _("Could not import photos"), msg);
-
- g_free (utf8_path);
- g_free (msg);
- g_free (data->local_folder);
- data->local_folder = NULL;
- path_list_free (file_list);
- return;
- }
-
for (scan = file_list; scan; scan = scan->next) {
const char *camera_path = scan->data;
CameraFileInfo info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]