]> git.saurik.com Git - wxWidgets.git/commitdiff
Further compile fixes.
authorRobert Roebling <robert@roebling.de>
Mon, 1 Nov 2004 23:05:24 +0000 (23:05 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 1 Nov 2004 23:05:24 +0000 (23:05 +0000)
  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
include/wx/gtk1/gnome/gprint.h
src/gtk/gnome/gprint.cpp
src/gtk1/gnome/gprint.cpp

index 2dce890414716052207a51f32f94b69e0cce5fbf..3ecf30b58cf24567b5d7be01dec1105573fae40c 100644 (file)
@@ -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
index 2dce890414716052207a51f32f94b69e0cce5fbf..3ecf30b58cf24567b5d7be01dec1105573fae40c 100644 (file)
@@ -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
index e73e2ce58e08444aad5d73af19be10afcc1eb8b5..9ab135dc34da67e66a78525a3236250152e0236d 100644 (file)
@@ -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
index e73e2ce58e08444aad5d73af19be10afcc1eb8b5..9ab135dc34da67e66a78525a3236250152e0236d 100644 (file)
@@ -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