[gthumb/ext: 68/79] deleted the file local cache
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext: 68/79] deleted the file local cache
- Date: Sun, 2 Aug 2009 20:31:53 +0000 (UTC)
commit 6cbaef89add0971760fd472c742097ba63018dfa
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jul 25 10:03:41 2009 +0200
deleted the file local cache
.../image_viewer/gth-metadata-provider-image.c | 6 +-
gthumb/Makefile.am | 2 -
gthumb/file-cache.c | 342 --------------------
gthumb/file-cache.h | 51 ---
gthumb/gth-file-source-vfs.c | 1 -
gthumb/gth-image-loader.c | 33 +--
6 files changed, 4 insertions(+), 431 deletions(-)
---
diff --git a/extensions/image_viewer/gth-metadata-provider-image.c b/extensions/image_viewer/gth-metadata-provider-image.c
index 2e70bda..64c2181 100644
--- a/extensions/image_viewer/gth-metadata-provider-image.c
+++ b/extensions/image_viewer/gth-metadata-provider-image.c
@@ -47,14 +47,11 @@ gth_metadata_provider_image_read (GthMetadataProvider *self,
{
if (_g_file_attributes_matches (attributes, "image::*")) {
GdkPixbufFormat *format;
- GFile *cache_file;
char *filename;
int width, height;
- cache_file = _g_file_get_cache_file (file_data->file);
- filename = g_file_get_path (cache_file);
+ filename = g_file_get_path (file_data->file);
format = gdk_pixbuf_get_file_info (filename, &width, &height);
-
if (format != NULL) {
char *size;
@@ -70,7 +67,6 @@ gth_metadata_provider_image_read (GthMetadataProvider *self,
}
g_free (filename);
- g_object_unref (cache_file);
}
}
diff --git a/gthumb/Makefile.am b/gthumb/Makefile.am
index 3f3deab..2f471cd 100644
--- a/gthumb/Makefile.am
+++ b/gthumb/Makefile.am
@@ -24,7 +24,6 @@ PUBLIC_HEADER_FILES = \
dom.h \
egg-macros.h \
eggfileformatchooser.h \
- file-cache.h \
gconf-utils.h \
gedit-message-area.h \
gio-utils.h \
@@ -130,7 +129,6 @@ gthumb_SOURCES = \
dlg-preferences.c \
dlg-sort-order.c \
dom.c \
- file-cache.c \
gconf-utils.c \
gio-utils.c \
glib-utils.c \
diff --git a/gthumb/gth-file-source-vfs.c b/gthumb/gth-file-source-vfs.c
index 8c7d990..e447983 100644
--- a/gthumb/gth-file-source-vfs.c
+++ b/gthumb/gth-file-source-vfs.c
@@ -25,7 +25,6 @@
#include <glib/gi18n.h>
#include <glib.h>
#include <gio/gunixmounts.h>
-#include "file-cache.h"
#include "gth-file-data.h"
#include "gio-utils.h"
#include "glib-utils.h"
diff --git a/gthumb/gth-image-loader.c b/gthumb/gth-image-loader.c
index 0f9ffdd..c165abe 100644
--- a/gthumb/gth-image-loader.c
+++ b/gthumb/gth-image-loader.c
@@ -31,7 +31,6 @@
#define GDK_PIXBUF_ENABLE_BACKEND
#include <gdk-pixbuf/gdk-pixbuf-animation.h>
#include <gtk/gtk.h>
-#include "file-cache.h"
#include "gth-file-data.h"
#include "glib-utils.h"
#include "gth-image-loader.h"
@@ -631,20 +630,8 @@ check_thread (gpointer data)
static void
-_gth_image_loader_load__step3 (GError *error,
- gpointer data)
+_gth_image_loader_load__step2 (GthImageLoader *iloader)
{
- GthImageLoader *iloader = data;
-
- g_return_if_fail (iloader != NULL);
-
- if (error != NULL) {
- _gth_image_loader_error (iloader, error);
- return;
- }
-
- /* */
-
g_mutex_lock (iloader->priv->data_mutex);
iloader->priv->ready = FALSE;
@@ -662,7 +649,7 @@ _gth_image_loader_load__step3 (GError *error,
g_mutex_unlock (iloader->priv->data_mutex);
- /* */
+ /**/
g_mutex_lock (iloader->priv->start_loading_mutex);
@@ -671,7 +658,7 @@ _gth_image_loader_load__step3 (GError *error,
g_mutex_unlock (iloader->priv->start_loading_mutex);
- /* */
+ /**/
iloader->priv->check_id = g_timeout_add (REFRESH_RATE,
check_thread,
@@ -679,20 +666,6 @@ _gth_image_loader_load__step3 (GError *error,
}
-static void
-_gth_image_loader_load__step2 (GthImageLoader *iloader)
-{
- GthFileData *file;
-
- g_mutex_lock (iloader->priv->data_mutex);
- file = gth_file_data_dup (iloader->priv->file);
- g_mutex_unlock (iloader->priv->data_mutex);
-
- copy_remote_file_to_cache (file, NULL, _gth_image_loader_load__step3, iloader);
- g_object_unref (file);
-}
-
-
void
gth_image_loader_load (GthImageLoader *iloader)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]