[gthumb: 68/129] Revert "removed unused callback"
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 68/129] Revert "removed unused callback"
- Date: Wed, 27 Apr 2011 20:56:05 +0000 (UTC)
commit f4c2a3491df1526831d1b4162543e907861e2036
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Apr 24 11:34:07 2011 +0200
Revert "removed unused callback"
This reverts commit e2a984fa7279f6e15e57a1047f7d8a0c32d08f4e.
extensions/image_viewer/gth-image-viewer-page.c | 33 +++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 3b1bf81..77f8ad4 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -40,6 +40,7 @@ struct _GthImageViewerPagePrivate {
GthImageHistory *history;
GthFileData *file_data;
gulong requested_ready_id;
+ gulong original_size_ready_id;
guint cnxn_id[GCONF_NOTIFICATIONS];
guint hide_mouse_timeout;
guint motion_signal;
@@ -319,6 +320,32 @@ image_preloader_requested_ready_cb (GthImagePreloader *preloader,
static void
+image_preloader_original_size_ready_cb (GthImagePreloader *preloader,
+ GthFileData *requested,
+ GdkPixbufAnimation *animation,
+ int original_width,
+ int original_height,
+ GError *error,
+ GthImageViewerPage *self)
+{
+ if (! _g_file_equal (requested->file, self->priv->file_data->file))
+ return;
+
+ if (error != NULL)
+ return;
+
+ gth_image_viewer_set_better_quality (GTH_IMAGE_VIEWER (self->priv->viewer),
+ animation,
+ original_width,
+ original_height);
+ gth_image_history_clear (self->priv->history);
+ gth_image_history_add_image (self->priv->history,
+ gth_image_viewer_get_current_image (GTH_IMAGE_VIEWER (self->priv->viewer)),
+ FALSE);
+}
+
+
+static void
pref_zoom_quality_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
@@ -602,6 +629,10 @@ gth_image_viewer_page_real_activate (GthViewerPage *base,
"requested_ready",
G_CALLBACK (image_preloader_requested_ready_cb),
self);
+ self->priv->original_size_ready_id = g_signal_connect (G_OBJECT (self->priv->preloader),
+ "original_size_ready",
+ G_CALLBACK (image_preloader_original_size_ready_cb),
+ self);
self->priv->viewer = gth_image_viewer_new ();
gth_image_viewer_set_zoom_quality (GTH_IMAGE_VIEWER (self->priv->viewer), eel_gconf_get_enum (PREF_ZOOM_QUALITY, GTH_TYPE_ZOOM_QUALITY, GTH_ZOOM_QUALITY_HIGH));
@@ -719,7 +750,9 @@ gth_image_viewer_page_real_deactivate (GthViewerPage *base)
self->priv->actions = NULL;
g_signal_handler_disconnect (self->priv->preloader, self->priv->requested_ready_id);
+ g_signal_handler_disconnect (self->priv->preloader, self->priv->original_size_ready_id);
self->priv->requested_ready_id = 0;
+ self->priv->original_size_ready_id = 0;
g_object_unref (self->priv->preloader);
self->priv->preloader = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]