X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=ps%2Fps-document.c;h=34579674c302add2e07d0964c4e537ee323c0638;hb=592bc46cb8c4d56dd04c39ac87d287a0abcf6fa6;hp=75009dc9844f54c4ed8ef6ede8240c26a19d36f9;hpb=3979c5c5ca307cad84b417b0d350aa205fdc422f;p=evince.git diff --git a/ps/ps-document.c b/ps/ps-document.c index 75009dc9..34579674 100644 --- a/ps/ps-document.c +++ b/ps/ps-document.c @@ -210,6 +210,9 @@ push_pixbuf (PSDocument *gs) GdkColormap *cmap; GdkPixbuf *pixbuf; int width, height; + + if (gs->pstarget == NULL) + return; cmap = gdk_window_get_colormap (gs->pstarget); gdk_drawable_get_size (gs->bpixmap, &width, &height); @@ -311,6 +314,9 @@ setup_pixmap (PSDocument *gs, int page, double scale, int rotation) GdkColormap *colormap; double width, height; int pixmap_width, pixmap_height; + + if (gs->pstarget == NULL) + return; ev_document_get_page_size (EV_DOCUMENT (gs), page, &width, &height); @@ -891,7 +897,7 @@ check_filecompressed (PSDocument * gs) /* report error */ filename_dsp = g_filename_display_name (gs->gs_filename); - msg = g_strdup_printf (_("Error while decompressing file %s:\n"), filename_dsp); + msg = g_strdup_printf (_("Error while decompressing file “%s”:\n"), filename_dsp); g_free (filename_dsp); interpreter_failed (gs, msg); @@ -951,7 +957,7 @@ document_load (PSDocument *gs, const gchar *fname) gchar *msg; filename_dsp = g_filename_display_name (fname); - msg = g_strdup_printf (_("Cannot open file %s.\n"), filename_dsp); + msg = g_strdup_printf (_("Cannot open file “%s”.\n"), filename_dsp); g_free (filename_dsp); interpreter_failed (gs, msg); @@ -1073,7 +1079,7 @@ ps_document_load (EvDocument *document, g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_NOENT, - _("Failed to load document '%s'. Ghostscript interpreter was not found in path"), + _("Failed to load document “%s”. Ghostscript interpreter was not found in path"), filename); g_free (filename_dsp); result = FALSE; @@ -1085,7 +1091,7 @@ ps_document_load (EvDocument *document, g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, - _("Failed to load document '%s'"), + _("Failed to load document “%s”"), filename_dsp); g_free (filename_dsp); }