From 58c30cd80c66fe5611a1e34662320c381ebe6eff Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 1 Nov 2004 23:05:24 +0000 Subject: [PATCH] Further compile fixes. Added module so that linking to GNOME printing code will install its wxPrintFactory. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/gnome/gprint.h | 4 ++-- include/wx/gtk1/gnome/gprint.h | 4 ++-- src/gtk/gnome/gprint.cpp | 19 +++++++++++++++++-- src/gtk1/gnome/gprint.cpp | 19 +++++++++++++++++-- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 2dce890414..3ecf30b58c 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -10,8 +10,8 @@ #ifndef __gprint_H__ #define __gprint_H__ -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "gprint.h" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma interface #endif // Include wxWindows' headers diff --git a/include/wx/gtk1/gnome/gprint.h b/include/wx/gtk1/gnome/gprint.h index 2dce890414..3ecf30b58c 100644 --- a/include/wx/gtk1/gnome/gprint.h +++ b/include/wx/gtk1/gnome/gprint.h @@ -10,8 +10,8 @@ #ifndef __gprint_H__ #define __gprint_H__ -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "gprint.h" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma interface #endif // Include wxWindows' headers diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index e73e2ce58e..9ab135dc34 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -7,8 +7,8 @@ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma implementation "gprint.cpp" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma implementation "gprint.h" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -273,6 +273,7 @@ wxDC* wxGnomePrinter::PrintDialog( wxWindow *parent ) bool wxGnomePrinter::Setup( wxWindow *parent ) { + return false; } //----------------------------------------------------------------------------- @@ -663,5 +664,19 @@ int wxGnomePrintDC::GetResolution() return 72; } + +class wxGnomePrintModule: public wxModule +{ +public: + wxGnomePrintModule() {} + bool OnInit() { wxPrintFactory::SetPrintFactory( new wxGnomePrintFactory ); return true; } + void OnExit() { } + +private: + DECLARE_DYNAMIC_CLASS(wxGnomePrintModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxGnomePrintModule, wxModule) + #endif // wxUSE_LIBGNOMEPRINT diff --git a/src/gtk1/gnome/gprint.cpp b/src/gtk1/gnome/gprint.cpp index e73e2ce58e..9ab135dc34 100644 --- a/src/gtk1/gnome/gprint.cpp +++ b/src/gtk1/gnome/gprint.cpp @@ -7,8 +7,8 @@ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma implementation "gprint.cpp" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma implementation "gprint.h" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -273,6 +273,7 @@ wxDC* wxGnomePrinter::PrintDialog( wxWindow *parent ) bool wxGnomePrinter::Setup( wxWindow *parent ) { + return false; } //----------------------------------------------------------------------------- @@ -663,5 +664,19 @@ int wxGnomePrintDC::GetResolution() return 72; } + +class wxGnomePrintModule: public wxModule +{ +public: + wxGnomePrintModule() {} + bool OnInit() { wxPrintFactory::SetPrintFactory( new wxGnomePrintFactory ); return true; } + void OnExit() { } + +private: + DECLARE_DYNAMIC_CLASS(wxGnomePrintModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxGnomePrintModule, wxModule) + #endif // wxUSE_LIBGNOMEPRINT -- 2.45.2