[glade/css] Added error message if it can not save the slideshow
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/css] Added error message if it can not save the slideshow
- Date: Tue, 30 Jul 2013 00:37:12 +0000 (UTC)
commit e21c65ce164cab48bff9478c16ad40f22d01c3fd
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Mon Jul 29 21:36:33 2013 -0300
Added error message if it can not save the slideshow
gladeui/glade-preview-window.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gladeui/glade-preview-window.c b/gladeui/glade-preview-window.c
index ca9653f..c2fe719 100644
--- a/gladeui/glade-preview-window.c
+++ b/gladeui/glade-preview-window.c
@@ -480,8 +480,13 @@ glade_preview_window_screenshot (GladePreviewWindow *window,
{
GdkPixbuf *pix = gdk_pixbuf_get_from_window (gdkwindow, 0, 0, w, h);
const gchar *ext = glade_preview_get_extension (filename);
+ GError *error = NULL;
- gdk_pixbuf_save (pix, filename, ext ? ext : "png", NULL, NULL);
+ if (gdk_pixbuf_save (pix, filename, ext ? ext : "png", &error, NULL))
+ {
+ g_warning ("Could not save screenshot to %s because %s", filename, error->message);
+ g_error_free (error);
+ }
g_object_unref (pix);
}
@@ -544,4 +549,6 @@ glade_preview_window_slideshow_save (GladePreviewWindow *window,
cairo_destroy (cr);
cairo_surface_destroy(surface);
}
+ else
+ g_warning ("Could not save slideshow to %s", filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]