From 7c72311fe19b9451446e5f97bf7f8ee7535227a5 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 1 Nov 2004 18:40:51 +0000 Subject: [PATCH] Added --with-gnomeprint and its wxUSE_LIBGNOMEPRINT Removed the now obsolete test for FT2 (FreeType) which was used by the Pango based printing which I removed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure.in | 42 +++++++++++++++++++--------------- include/wx/gtk/gnome/gprint.h | 6 +++++ include/wx/gtk1/gnome/gprint.h | 6 +++++ setup.h.in | 4 ++++ src/gtk/gnome/gprint.cpp | 8 ++++++- src/gtk1/gnome/gprint.cpp | 8 ++++++- 6 files changed, 54 insertions(+), 20 deletions(-) diff --git a/configure.in b/configure.in index fec1576680..b9a750e373 100644 --- a/configure.in +++ b/configure.in @@ -401,6 +401,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_LIBXPM=no DEFAULT_wxUSE_LIBMSPACK=no DEFAULT_wxUSE_LIBSDL=no + DEFAULT_wxUSE_LIBGNOMEPRINT=no DEFAULT_wxUSE_ODBC=no DEFAULT_wxUSE_OPENGL=no @@ -588,6 +589,7 @@ else DEFAULT_wxUSE_LIBXPM=yes DEFAULT_wxUSE_LIBMSPACK=yes DEFAULT_wxUSE_LIBSDL=no + DEFAULT_wxUSE_LIBGNOMEPRINT=no DEFAULT_wxUSE_ODBC=no DEFAULT_wxUSE_OPENGL=no @@ -793,6 +795,7 @@ WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file for WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM) WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK) WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL) +WX_ARG_WITH(gnomeprint, [ --with-gnomeprint use GNOME print for audio printing under Unix], wxUSE_LIBGNOMEPRINT) WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL) fi @@ -2514,24 +2517,6 @@ equivalent variable and GTK+ is version 1.2.3 or above. esac if test "$WXGTK20" = 1; then - if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then - PKG_CHECK_MODULES(PANGOFT2, pangoft2, - [ - CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS" - # FIXME: GTK_LIBS already has a lot of what this is - # about to add, but we go ahead and just add - # it all again anyway. - # This is not a good way to manage things. And simply - # uniq'ing the list later is hardly better. - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS" - ], - [ - AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support]) - wxUSE_PRINTING_ARCHITECTURE="no" - ] - ) - fi - save_CFLAGS="$CFLAGS" save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" @@ -4595,6 +4580,25 @@ if test "$wxUSE_SOUND" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound" fi +if test "$WXGTK20" = 1; then + if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then + if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then + + PKG_CHECK_MODULES(LIBGNOMEPRINTUI, libgnomeprintui-2.2, + [ + CXXFLAGS="$CXXFLAGS $LIBGNOMEPRINTUI_CFLAGS" + GUI_TK_LIBRARY="$GUI_TK_LIBRARY $LIBGNOMEPRINTUI_LIBS" + ], + [ + AC_MSG_WARN([libgnomeprintui not found, library will use standard PostScript printing]) + wxUSE_LIBGNOMEPRINT="no" + ] + ) + fi + fi +fi + + if test "$wxUSE_CMDLINE_PARSER" = "yes"; then AC_DEFINE(wxUSE_CMDLINE_PARSER) fi @@ -6018,6 +6022,7 @@ AC_SUBST(EXTRALIBS_GUI) AC_SUBST(EXTRALIBS_OPENGL) AC_SUBST(EXTRALIBS_SDL) AC_SUBST(WITH_PLUGIN_SDL) +AC_SUBST(EXTRALIBS_GNOMEPRINT) AC_SUBST(UNICODE) AC_SUBST(BUILD) AC_SUBST(DEBUG_INFO) @@ -6304,6 +6309,7 @@ echo " odbc ${wxUSE_ODBC}" echo " expat ${wxUSE_EXPAT}" echo " libmspack ${wxUSE_LIBMSPACK}" echo " sdl ${wxUSE_LIBSDL}" +echo " gnomeprint ${wxUSE_LIBGNOMEPRINT}" echo "" diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 11cb0278e7..2dce890414 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -4,6 +4,7 @@ // Purpose: GNOME printing support // Created: 09/20/04 // Copyright: Robert Roebling +// Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef __gprint_H__ @@ -19,6 +20,8 @@ #include #endif +#if wxUSE_LIBGNOMEPRINT + #include "wx/print.h" #include "wx/prntbase.h" #include "wx/printdlg.h" @@ -302,4 +305,7 @@ private: DECLARE_NO_COPY_CLASS(wxGnomePrintDC) }; +#endif + // wxUSE_LIBGNOMEPRINT + #endif diff --git a/include/wx/gtk1/gnome/gprint.h b/include/wx/gtk1/gnome/gprint.h index 11cb0278e7..2dce890414 100644 --- a/include/wx/gtk1/gnome/gprint.h +++ b/include/wx/gtk1/gnome/gprint.h @@ -4,6 +4,7 @@ // Purpose: GNOME printing support // Created: 09/20/04 // Copyright: Robert Roebling +// Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef __gprint_H__ @@ -19,6 +20,8 @@ #include #endif +#if wxUSE_LIBGNOMEPRINT + #include "wx/print.h" #include "wx/prntbase.h" #include "wx/printdlg.h" @@ -302,4 +305,7 @@ private: DECLARE_NO_COPY_CLASS(wxGnomePrintDC) }; +#endif + // wxUSE_LIBGNOMEPRINT + #endif diff --git a/setup.h.in b/setup.h.in index 7a21a972c9..b76c4dcaf5 100644 --- a/setup.h.in +++ b/setup.h.in @@ -246,6 +246,10 @@ * Use SDL for audio (Unix) */ #define wxUSE_LIBSDL 0 +/* + * Use GNOME print for printing under GTK+ 2.0 + */ +#define wxUSE_LIBGNOMEPRINT 0 /* * Use iODBC */ diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 3c2e788c48..e73e2ce58e 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -18,7 +18,10 @@ #pragma hdrstop #endif -#include "gprint.h" +#include "wx/gtk/gnome/gprint.h" + +#if wxUSE_LIBGNOMEPRINT + #include "wx/fontutil.h" #include "wx/printdlg.h" #include "wx/gtk/private.h" @@ -659,3 +662,6 @@ int wxGnomePrintDC::GetResolution() { return 72; } + +#endif + // wxUSE_LIBGNOMEPRINT diff --git a/src/gtk1/gnome/gprint.cpp b/src/gtk1/gnome/gprint.cpp index 3c2e788c48..e73e2ce58e 100644 --- a/src/gtk1/gnome/gprint.cpp +++ b/src/gtk1/gnome/gprint.cpp @@ -18,7 +18,10 @@ #pragma hdrstop #endif -#include "gprint.h" +#include "wx/gtk/gnome/gprint.h" + +#if wxUSE_LIBGNOMEPRINT + #include "wx/fontutil.h" #include "wx/printdlg.h" #include "wx/gtk/private.h" @@ -659,3 +662,6 @@ int wxGnomePrintDC::GetResolution() { return 72; } + +#endif + // wxUSE_LIBGNOMEPRINT -- 2.45.2