summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-unix.c
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2009-11-30 13:20:43 +0100
committerChristian Dywan <christian@twotoasts.de>2009-11-30 13:20:43 +0100
commit6dfdf0fadf4598b1ec7a32d525c87920ba7f8bee (patch)
tree7c025e0496556e3a2184a7d176590b82c673d888 /gtk/gtkprintoperation-unix.c
parentcb49a28f8cc72be570600014e4f8fbb271520f6e (diff)
downloadgtk+-6dfdf0fadf4598b1ec7a32d525c87920ba7f8bee.tar.gz
Fallback to gtk_show_uri for print preview if the command fails
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=601682
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r--gtk/gtkprintoperation-unix.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index 6b5aa15fc5..a36eced955 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -291,6 +291,19 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op,
g_strfreev (argv);
+ if (error != NULL)
+ {
+ gchar* uri;
+
+ g_warning ("%s %s", _("Error launching preview"), error->message);
+
+ g_error_free (error);
+ error = NULL;
+ uri = g_filename_to_uri (filename, NULL, NULL);
+ gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error);
+ g_free (uri);
+ }
+
out:
if (error != NULL)
{