[gthumb: 14/40] removed other unused functions
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 14/40] removed other unused functions
- Date: Fri, 10 Sep 2010 16:57:23 +0000 (UTC)
commit 4163ed01d9a6714276a90944f0d65aedab1e40ab
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 5 16:40:21 2010 +0200
removed other unused functions
gthumb/gth-image-loader.c | 134 ------------------------------------------
gthumb/gth-image-loader.h | 5 --
gthumb/gth-image-preloader.c | 30 ---------
gthumb/gth-image-preloader.h | 2 -
4 files changed, 0 insertions(+), 171 deletions(-)
---
diff --git a/gthumb/gth-image-loader.c b/gthumb/gth-image-loader.c
index a472ea2..b5ea532 100644
--- a/gthumb/gth-image-loader.c
+++ b/gthumb/gth-image-loader.c
@@ -519,58 +519,6 @@ _gth_image_loader_sync_pixbuf (GthImageLoader *self)
static void
-_gth_image_loader_sync_from_loader (GthImageLoader *self,
- GdkPixbufLoader *pbloader)
-{
- GdkPixbuf *pixbuf;
-
- g_return_if_fail (self != NULL);
-
- g_mutex_lock (self->priv->data_mutex);
-
- if (self->priv->as_animation) {
- if (self->priv->animation != NULL)
- g_object_unref (self->priv->animation);
- self->priv->animation = gdk_pixbuf_loader_get_animation (pbloader);
-
- if ((self->priv->animation != NULL)
- && ! gdk_pixbuf_animation_is_static_image (self->priv->animation))
- {
- g_object_ref (self->priv->animation);
- g_mutex_unlock (self->priv->data_mutex);
- return;
- }
- else
- self->priv->animation = NULL;
- }
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf (pbloader);
- g_object_ref (pixbuf);
-
- if (self->priv->pixbuf == pixbuf) {
- g_object_unref (self->priv->pixbuf);
- g_mutex_unlock (self->priv->data_mutex);
- return;
- }
-
- if (self->priv->pixbuf != NULL) {
- g_object_unref (self->priv->pixbuf);
- self->priv->pixbuf = NULL;
- }
-
- if (pixbuf != NULL) {
- g_object_ref (pixbuf);
- self->priv->pixbuf = pixbuf;
- /*priv->pixbuf = gdk_pixbuf_copy (pixbuf);*/
- }
-
- g_object_unref (pixbuf);
-
- g_mutex_unlock (self->priv->data_mutex);
-}
-
-
-static void
_gth_image_loader_cancelled (GthImageLoader *self)
{
g_mutex_lock (self->priv->data_mutex);
@@ -859,85 +807,3 @@ gth_image_loader_get_original_size (GthImageLoader *self,
*height = self->priv->original_height;
g_mutex_unlock (self->priv->data_mutex);
}
-
-
-gboolean
-gth_image_loader_is_ready (GthImageLoader *self)
-{
- gboolean is_ready;
-
- g_mutex_lock (self->priv->data_mutex);
- is_ready = self->priv->ready && self->priv->loader_ready;
- g_mutex_unlock (self->priv->data_mutex);
-
- return is_ready;
-}
-
-
-void
-gth_image_loader_load_from_pixbuf_loader (GthImageLoader *self,
- GdkPixbufLoader *pixbuf_loader)
-{
- GError *error = NULL;
-
- _gth_image_loader_sync_from_loader (self, pixbuf_loader);
-
- g_mutex_lock (self->priv->data_mutex);
- if ((self->priv->pixbuf == NULL) && (self->priv->animation == NULL))
- error = g_error_new_literal (GTH_ERROR, 0, "No image available");
- g_mutex_unlock (self->priv->data_mutex);
-
- g_signal_emit (G_OBJECT (self), gth_image_loader_signals[READY], 0, error);
-}
-
-
-void
-gth_image_loader_load_from_image_loader (GthImageLoader *to,
- GthImageLoader *from)
-{
- GError *error = NULL;
-
- g_return_if_fail (to != NULL);
- g_return_if_fail (from != NULL);
-
- g_mutex_lock (to->priv->data_mutex);
- g_mutex_lock (from->priv->data_mutex);
-
- if (to->priv->file != NULL) {
- g_object_unref (to->priv->file);
- to->priv->file = NULL;
- }
- if (from->priv->file != NULL)
- to->priv->file = gth_file_data_dup (from->priv->file);
-
- if (to->priv->pixbuf) {
- g_object_unref (to->priv->pixbuf);
- to->priv->pixbuf = NULL;
- }
- if (from->priv->pixbuf) {
- g_object_ref (from->priv->pixbuf);
- to->priv->pixbuf = from->priv->pixbuf;
- }
-
- /**/
-
- if (to->priv->animation) {
- g_object_unref (to->priv->animation);
- to->priv->animation = NULL;
- }
- if (from->priv->animation) { /* FIXME: check thread issues. */
- g_object_ref (from->priv->animation);
- to->priv->animation = from->priv->animation;
- }
-
- if ((to->priv->pixbuf == NULL) && (to->priv->animation == NULL))
- error = g_error_new_literal (GTH_ERROR, 0, "No image available");
-
- to->priv->original_width = from->priv->original_width;
- to->priv->original_height = from->priv->original_height;
-
- g_mutex_unlock (to->priv->data_mutex);
- g_mutex_unlock (from->priv->data_mutex);
-
- g_signal_emit (G_OBJECT (to), gth_image_loader_signals[READY], 0, error);
-}
diff --git a/gthumb/gth-image-loader.h b/gthumb/gth-image-loader.h
index 3ed6b77..80d8e62 100644
--- a/gthumb/gth-image-loader.h
+++ b/gthumb/gth-image-loader.h
@@ -75,7 +75,6 @@ GdkPixbufAnimation * gth_image_loader_get_animation (GthImageLoader
void gth_image_loader_get_original_size (GthImageLoader *iloader,
int *width,
int *height);
-gboolean gth_image_loader_is_ready (GthImageLoader *iloader);
void gth_image_loader_load (GthImageLoader *iloader);
void gth_image_loader_load_at_size (GthImageLoader *iloader,
int requested_size);
@@ -85,10 +84,6 @@ void gth_image_loader_cancel (GthImageLoader
void gth_image_loader_cancel_with_error (GthImageLoader *iloader,
DataFunc done_func,
gpointer done_func_data);
-void gth_image_loader_load_from_pixbuf_loader (GthImageLoader *iloader,
- GdkPixbufLoader *pixbuf_loader);
-void gth_image_loader_load_from_image_loader (GthImageLoader *to,
- GthImageLoader *from);
G_END_DECLS
diff --git a/gthumb/gth-image-preloader.c b/gthumb/gth-image-preloader.c
index 53c4a37..184c37a 100644
--- a/gthumb/gth-image-preloader.c
+++ b/gthumb/gth-image-preloader.c
@@ -706,33 +706,3 @@ gth_image_preloader_stop (GthImagePreloader *self,
self->priv->current = -1;
gth_image_loader_cancel (preloader->loader, done_func, done_func_data);
}
-
-
-void
-gth_image_preloader_set (GthImagePreloader *dest,
- GthImagePreloader *src)
-{
- int i;
-
- if (src == NULL)
- return;
-
- g_return_if_fail (src->priv->n_preloaders == dest->priv->n_preloaders);
-
- for (i = 0; i < src->priv->n_preloaders; i++) {
- Preloader *src_loader = src->priv->loader[i];
- Preloader *dest_loader = dest->priv->loader[i];
-
- if ((src_loader->file_data != NULL) && src_loader->loaded && ! src_loader->error) {
- g_object_unref (dest_loader->file_data);
- dest_loader->file_data = g_object_ref (src_loader->file_data);
-
- g_signal_handlers_block_by_data (dest_loader->loader, dest_loader);
- gth_image_loader_load_from_image_loader (dest_loader->loader, src_loader->loader);
- g_signal_handlers_unblock_by_data (dest_loader->loader, dest_loader);
-
- dest_loader->loaded = TRUE;
- dest_loader->error = FALSE;
- }
- }
-}
diff --git a/gthumb/gth-image-preloader.h b/gthumb/gth-image-preloader.h
index 38df535..a5dc3cf 100644
--- a/gthumb/gth-image-preloader.h
+++ b/gthumb/gth-image-preloader.h
@@ -76,7 +76,5 @@ void gth_image_preloader_stop (GthImagePreloader *se
GthImageLoader * gth_image_preloader_get_loader (GthImagePreloader *self,
GthFileData *file_data);
GthFileData * gth_image_preloader_get_requested (GthImagePreloader *self);
-void gth_image_preloader_set (GthImagePreloader *dest,
- GthImagePreloader *src);
#endif /* GTH_IMAGE_PRELOADER_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]