From 08f5f78a6d22f6a09d0929c74773a731d3260279 Mon Sep 17 00:00:00 2001 From: Denis Leroy Date: Jan 08 2008 13:37:10 +0000 Subject: Updated gtkprint patch to restore eps export (#424411) --- diff --git a/inkscape-0.45.1-gtkprint.patch b/inkscape-0.45.1-gtkprint.patch index 239b62d..032615a 100644 --- a/inkscape-0.45.1-gtkprint.patch +++ b/inkscape-0.45.1-gtkprint.patch @@ -13,6 +13,23 @@ Index: src/extension/internal/ps.cpp #include #include "display/nr-arena-item.h" #include "display/canvas-bpath.h" +@@ -59,6 +59,7 @@ + #include + + #include "ps.h" ++#include "inkscape.h" + #include "extension/system.h" + #include "extension/print.h" + +@@ -74,6 +75,8 @@ + + using namespace std; + ++extern gboolean inkscape_app_use_gui( Inkscape::Application const *app ); ++ + namespace Inkscape { + namespace Extension { + namespace Internal { @@ -102,6 +104,59 @@ return; } @@ -147,7 +164,16 @@ Index: src/extension/internal/ps.cpp osf = Inkscape::IO::fopen_utf8name(fn, "w+"); if (!osf) { fprintf(stderr, "inkscape: fopen(%s): %s\n", -@@ -582,12 +659,23 @@ +@@ -581,6 +584,8 @@ + unsigned int + PrintPS::finish(Inkscape::Extension::Print *mod) + { ++ gboolean use_gui = inkscape_app_use_gui(INKSCAPE); ++ + if (!_stream) return 0; + + if (_bitmap) { +@@ -582,12 +659,25 @@ { while((c = fgetc(_stream))!=EOF) fputc(c, _begin_stream); } @@ -157,12 +183,14 @@ Index: src/extension/internal/ps.cpp } +#ifdef HAVE_GTK_UNIX_PRINT -+ /* redirect output to new print dialog */ -+ fseek(_stream, 0, SEEK_SET); -+ Glib::ustring output = _tmpfilename; -+ unix_print_dialog(output.c_str(),"job name"); -+ unlink(output.c_str()); -+ /* end redirected new print dialog */ ++ if (use_gui) { ++ /* redirect output to new print dialog */ ++ fseek(_stream, 0, SEEK_SET); ++ Glib::ustring output = _tmpfilename; ++ unix_print_dialog(output.c_str(),"job name"); ++ unlink(output.c_str()); ++ /* end redirected new print dialog */ ++ } +#endif + /* fixme: should really use pclose for popen'd streams */ diff --git a/inkscape.spec b/inkscape.spec index 4cd6875..12aadc6 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -2,7 +2,7 @@ Name: inkscape Version: 0.45.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Vector-based drawing program using SVG Group: Applications/Productivity @@ -134,6 +134,9 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || : %changelog +* Tue Jan 8 2008 Denis Leroy - 0.45.1-5 +- Updated gtkprint patch to restore eps export + * Sun Dec 02 2007 Lubomir Kundrak - 0.45.1-4 - Added missing dependencies for modules (#301881)