gthumb r2383 - in trunk: . libgthumb
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2383 - in trunk: . libgthumb
- Date: Thu, 7 Aug 2008 20:11:35 +0000 (UTC)
Author: mjc
Date: Thu Aug 7 20:11:34 2008
New Revision: 2383
URL: http://svn.gnome.org/viewvc/gthumb?rev=2383&view=rev
Log:
2008-08-07 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/image-viewer.c: (set_pixbuf__step2), (image_loaded),
(create_image):
Do not emit image_loaded signal when image_viewer_set_pixbuf is
called, fixing prompts to save modified images.
* libgthumb/image-viewer-image.c: (image_viewer_image_get_path):
Fix a NULL-dereference.
Patches by Geoffrey Antos <dynamotwain aim com>. Bug #501512.
Modified:
trunk/ChangeLog
trunk/libgthumb/image-viewer-image.c
trunk/libgthumb/image-viewer.c
Modified: trunk/libgthumb/image-viewer-image.c
==============================================================================
--- trunk/libgthumb/image-viewer-image.c (original)
+++ trunk/libgthumb/image-viewer-image.c Thu Aug 7 20:11:34 2008
@@ -527,7 +527,10 @@
priv = IMAGE_VIEWER_IMAGE_GET_PRIVATE (image);
- return g_strdup (priv->file->path);
+ if (priv->file)
+ return g_strdup (priv->file->path);
+ else
+ return NULL;
}
Modified: trunk/libgthumb/image-viewer.c
==============================================================================
--- trunk/libgthumb/image-viewer.c (original)
+++ trunk/libgthumb/image-viewer.c Thu Aug 7 20:11:34 2008
@@ -441,6 +441,7 @@
}
+static void create_image (ImageLoader *il, gpointer data);
static void image_loaded (ImageLoader *il, gpointer data);
static void image_error (ImageLoader *il, gpointer data);
static void image_progress (ImageLoader *il, float progress, gpointer data);
@@ -1362,7 +1363,7 @@
image_loader_set_file (priv->loader, NULL);
image_loader_set_pixbuf (priv->loader, pixbuf);
- image_loaded (priv->loader, ivl_data->viewer);
+ create_image (priv->loader, ivl_data->viewer);
g_object_unref (G_OBJECT (pixbuf));
g_free (ivl_data);
@@ -1625,6 +1626,20 @@
gpointer data)
{
ImageViewer *viewer = data;
+
+ create_image (il, data);
+
+ g_signal_emit (G_OBJECT (viewer),
+ image_viewer_signals[IMAGE_LOADED],
+ 0);
+}
+
+
+static void
+create_image (ImageLoader *il,
+ gpointer data)
+{
+ ImageViewer *viewer = data;
ImageViewerPrivate *priv = IMAGE_VIEWER_GET_PRIVATE (viewer);
ImageViewerImage *next;
@@ -1675,10 +1690,6 @@
G_CALLBACK (zoom_changed_cb), viewer);
gtk_widget_queue_resize (GTK_WIDGET (viewer));
-
- g_signal_emit (G_OBJECT (viewer),
- image_viewer_signals[IMAGE_LOADED],
- 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]