From: Darren S. <li...@yo...> - 2009-05-05 15:26:13
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1241535885 -3600 # Node ID 6cb5f6b85273716bad96f85f3a9eb4807d5fd5a5 # Parent a79307228d06e08ca0509d6b8bbb491aa03ae16e Report snapshot-saving errors (returned by gdk_pixbuf_save). diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.5.905: 2009/??/?? * Fix a build problem affecting LIRC in the absence of a pkgconfig file for liblircclient. + * Report snapshot-saving errors. 0.5.904: 2009/04/01 * Add a lock to avoid a race which can cause GTK crashes when diff --git a/src/snapshot.c b/src/snapshot.c --- a/src/snapshot.c +++ b/src/snapshot.c @@ -274,11 +274,20 @@ * save pixbuf to file */ - gdk_pixbuf_save (scaled, fname, "png", NULL, NULL); + GError *error = NULL; + gboolean ret = gdk_pixbuf_save (scaled, fname, "png", &error, NULL); gdk_pixbuf_unref (scaled); if (requested_fname) free (fname); + + if (!ret) + { + display_error (FROM_GXINE, _("Cannot create a snapshot"), + "%s", error->message); + g_error_free (error); + } + } void snapshot_init (void) |