Updated gtkprint patch to restore eps export (#424411)

This commit is contained in:
Denis Leroy 2008-01-08 13:37:10 +00:00
parent ba75afb2be
commit 08f5f78a6d
2 changed files with 39 additions and 8 deletions

View File

@ -13,6 +13,23 @@ Index: src/extension/internal/ps.cpp
#include <glibmm/i18n.h>
#include "display/nr-arena-item.h"
#include "display/canvas-bpath.h"
@@ -59,6 +59,7 @@
#include <unit-constants.h>
#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 */

View File

@ -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 <denis@poolshark.org> - 0.45.1-5
- Updated gtkprint patch to restore eps export
* Sun Dec 02 2007 Lubomir Kundrak <lkundrak@redhat.com> - 0.45.1-4
- Added missing dependencies for modules (#301881)