[gthumb: 12/40] removed the IMAGE_READY signal from the image viewer
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 12/40] removed the IMAGE_READY signal from the image viewer
- Date: Fri, 10 Sep 2010 16:57:13 +0000 (UTC)
commit 919e52645a5ebc71c13aae4f27ea065436ee5cce
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 5 15:38:04 2010 +0200
removed the IMAGE_READY signal from the image viewer
extensions/image_viewer/gth-image-viewer-page.c | 28 ++++++-------------
gthumb/gth-image-viewer.c | 13 ---------
gthumb/gth-image-viewer.h | 1 -
gthumb/gth-overwrite-dialog.c | 33 -----------------------
4 files changed, 9 insertions(+), 66 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 4084725..b8cebc1 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -219,21 +219,6 @@ gth_image_viewer_page_file_loaded (GthImageViewerPage *self,
}
-static void
-viewer_image_ready_cb (GtkWidget *widget,
- GthImageViewerPage *self)
-{
- if (self->priv->shrink_wrap)
- gth_image_viewer_page_shrink_wrap (self, TRUE);
-
- gth_image_history_clear (self->priv->history);
- gth_image_history_add_image (self->priv->history,
- gth_image_viewer_get_current_pixbuf (GTH_IMAGE_VIEWER (self->priv->viewer)),
- FALSE);
- gth_image_viewer_page_file_loaded (self, TRUE);
-}
-
-
static gboolean
viewer_zoom_changed_cb (GtkWidget *widget,
GthImageViewerPage *self)
@@ -324,6 +309,15 @@ image_preloader_requested_ready_cb (GthImagePreloader *preloader,
gth_image_loader_get_animation (image_loader),
original_width,
original_height);
+
+ if (self->priv->shrink_wrap)
+ gth_image_viewer_page_shrink_wrap (self, TRUE);
+
+ gth_image_history_clear (self->priv->history);
+ gth_image_history_add_image (self->priv->history,
+ gth_image_viewer_get_current_pixbuf (GTH_IMAGE_VIEWER (self->priv->viewer)),
+ FALSE);
+ gth_image_viewer_page_file_loaded (self, TRUE);
}
@@ -482,10 +476,6 @@ gth_image_viewer_page_real_activate (GthViewerPage *base,
gtk_widget_show (self->priv->viewer);
g_signal_connect (G_OBJECT (self->priv->viewer),
- "image_ready",
- G_CALLBACK (viewer_image_ready_cb),
- self);
- g_signal_connect (G_OBJECT (self->priv->viewer),
"zoom_changed",
G_CALLBACK (viewer_zoom_changed_cb),
self);
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 1446126..cb905a7 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -48,7 +48,6 @@
enum {
CLICKED,
- IMAGE_READY,
ZOOM_IN,
ZOOM_OUT,
SET_ZOOM,
@@ -1257,15 +1256,6 @@ gth_image_viewer_class_init (GthImageViewerClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
- gth_image_viewer_signals[IMAGE_READY] =
- g_signal_new ("image_ready",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GthImageViewerClass, image_ready),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
gth_image_viewer_signals[ZOOM_IN] =
g_signal_new ("zoom_in",
G_TYPE_FROM_CLASS (class),
@@ -1366,7 +1356,6 @@ gth_image_viewer_class_init (GthImageViewerClass *class)
widget_class->style_set = gth_image_viewer_style_set;
class->clicked = NULL;
- class->image_ready = NULL;
class->zoom_changed = NULL;
class->scroll = scroll_signal;
class->zoom_in = gth_image_viewer_zoom_in;
@@ -1665,8 +1654,6 @@ _gth_image_viewer_content_changed (GthImageViewer *self)
queue_animation_frame_change (self);
break;
}
-
- g_signal_emit (G_OBJECT (self), gth_image_viewer_signals[IMAGE_READY], 0);
}
diff --git a/gthumb/gth-image-viewer.h b/gthumb/gth-image-viewer.h
index ae49ec4..6273042 100644
--- a/gthumb/gth-image-viewer.h
+++ b/gthumb/gth-image-viewer.h
@@ -124,7 +124,6 @@ struct _GthImageViewerClass
/* -- Signals -- */
void (* clicked) (GthImageViewer *viewer);
- void (* image_ready) (GthImageViewer *viewer);
void (* zoom_changed) (GthImageViewer *viewer);
void (* size_changed) (GthImageViewer *viewer);
void (* set_scroll_adjustments) (GtkWidget *widget,
diff --git a/gthumb/gth-overwrite-dialog.c b/gthumb/gth-overwrite-dialog.c
index b1dfb8d..8568fb6 100644
--- a/gthumb/gth-overwrite-dialog.c
+++ b/gthumb/gth-overwrite-dialog.c
@@ -117,31 +117,6 @@ gth_overwrite_dialog_get_type (void)
static void
-image_viewer_image_ready_cb (GthImageViewer *viewer,
- gpointer user_data)
-{
- GthOverwriteDialog *self = user_data;
- GIcon *icon;
- GdkPixbuf *pixbuf;
-
- if (! gth_image_viewer_is_void (viewer))
- return;
-
- if (viewer == (GthImageViewer *) self->priv->old_image_viewer)
- icon = g_content_type_get_icon (g_file_info_get_content_type (self->priv->source_data->info));
-
- else
- icon = g_content_type_get_icon (g_file_info_get_content_type (self->priv->destination_data->info));
-
- pixbuf = _g_icon_get_pixbuf (icon, PREVIEW_SIZE, gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (self))));
- if (pixbuf != NULL) {
- gth_image_viewer_set_pixbuf (viewer, pixbuf, -1, -1);
- g_object_unref (pixbuf);
- }
-}
-
-
-static void
image_loader_ready_cb (GthImageLoader *image_loader,
GError *error,
gpointer user_data)
@@ -319,10 +294,6 @@ gth_overwrite_dialog_construct (GthOverwriteDialog *self,
gth_image_viewer_hide_frame (GTH_IMAGE_VIEWER (self->priv->old_image_viewer));
gtk_widget_show (self->priv->old_image_viewer);
gtk_container_add (GTK_CONTAINER (_gtk_builder_get_widget (self->priv->builder, "old_image_frame")), self->priv->old_image_viewer);
- g_signal_connect (self->priv->old_image_viewer,
- "image_ready",
- G_CALLBACK (image_viewer_image_ready_cb),
- self);
self->priv->new_image_viewer = gth_image_viewer_new ();
gth_image_viewer_set_transp_type (GTH_IMAGE_VIEWER (self->priv->new_image_viewer), GTH_TRANSP_TYPE_NONE);
@@ -330,10 +301,6 @@ gth_overwrite_dialog_construct (GthOverwriteDialog *self,
gth_image_viewer_hide_frame (GTH_IMAGE_VIEWER (self->priv->new_image_viewer));
gtk_widget_show (self->priv->new_image_viewer);
gtk_container_add (GTK_CONTAINER (_gtk_builder_get_widget (self->priv->builder, "new_image_frame")), self->priv->new_image_viewer);
- g_signal_connect (self->priv->new_image_viewer,
- "image_ready",
- G_CALLBACK (image_viewer_image_ready_cb),
- self);
g_signal_connect (_gtk_builder_get_widget (self->priv->builder, "overwrite_rename_radiobutton"),
"toggled",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]