diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rwxr-xr-x | embed/print-dialog.c | 13 |
2 files changed, 23 insertions, 2 deletions
@@ -1,5 +1,17 @@ 2005-09-21 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphyUtils.cpp: + * embed/print-dialog.c: (ephy_print_do_print_idle_cb): + + Don't use "cat >" as output command, it fails inpredicably. + Instead, use the tempfile setting, and set "PostScript/default" + as printer name. fflush before printing the temp file + using gnome-print. If not using gecko 1.9, translate the paper + name to the one mozilla expects (mozilla bug + https://bugzilla.mozilla.org/show_bug.cgi?id=307404). + +2005-09-21 Christian Persch <chpe@cvs.gnome.org> + * lib/ephy-gui.c: (ephy_gui_check_location_writable): * lib/ephy-gui.h: diff --git a/embed/print-dialog.c b/embed/print-dialog.c index 69140ca8d..cc920d181 100755 --- a/embed/print-dialog.c +++ b/embed/print-dialog.c @@ -34,6 +34,7 @@ #include <unistd.h> #include <string.h> +#include <stdio.h> #include <gtk/gtkwindow.h> #include <gtk/gtkdialog.h> #include <gtk/gtkentry.h> @@ -309,14 +310,22 @@ static gboolean ephy_print_do_print_idle_cb (EmbedPrintInfo *info) { GnomePrintJob *job; + int ret; + + /* Sometimes mozilla doesn't even create the temp file!? */ + if (g_file_test (info->tempfile, G_FILE_TEST_EXISTS) == FALSE) return FALSE; + + /* FIXME: is this actually necessary? libc docs say all streams + * are flushed when reading from any stream. + */ + fflush(NULL); job = gnome_print_job_new (info->config); gnome_print_job_set_file (job, info->tempfile); gnome_print_job_print (job); - g_object_unref (job); - + unlink (info->tempfile); ephy_print_info_free (info); |