summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-12-01 13:39:09 +0100
committerDavid Tardon <dtardon@redhat.com>2011-12-05 15:11:52 +0100
commitadb110517139252962b1ccf8f9230a4981a9573a (patch)
tree2a6ac2d1b9069d6c6e551ccfa72fc60cd019e987 /vcl/unx/gtk
parent85c6244b85b29c1d2bb9d89b62e9512dd65378b5 (diff)
set up CFLAGS/LIBS for gtk print dialog in configure
The dialog is built for gtk 2.0 if the version present at the system is at least 2.10.0 and always for gtk 3.0.
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx8
-rw-r--r--vcl/unx/gtk/inc/gtkprintwrapper.hxx8
2 files changed, 16 insertions, 0 deletions
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index f887323ca79c..b6eacc9b3449 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -401,18 +401,26 @@ void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
SalInfoPrinter* GtkInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData )
{
+#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
mbPrinterInit = true;
// create and initialize SalInfoPrinter
PspSalInfoPrinter* pPrinter = new GtkSalInfoPrinter;
configurePspInfoPrinter(pPrinter, pQueueInfo, pSetupData);
return pPrinter;
+#else
+ return Superclass_t::CreateInfoPrinter( pQueueInfo, pSetupData );
+#endif
}
SalPrinter* GtkInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
{
+#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
mbPrinterInit = true;
fprintf(stderr, "gtk printer\n");
return new GtkSalPrinter( pInfoPrinter );
+#else
+ return Superclass_t::CreatePrinter( pInfoPrinter );
+#endif
}
diff --git a/vcl/unx/gtk/inc/gtkprintwrapper.hxx b/vcl/unx/gtk/inc/gtkprintwrapper.hxx
index f625923909fd..1df133a99548 100644
--- a/vcl/unx/gtk/inc/gtkprintwrapper.hxx
+++ b/vcl/unx/gtk/inc/gtkprintwrapper.hxx
@@ -32,9 +32,15 @@
#include <boost/noncopyable.hpp>
#include <gtk/gtk.h>
+
+#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
#include <gtk/gtkunixprint.h>
+#if !GTK_CHECK_VERSION(3,0,0)
#include <osl/module.hxx>
+#endif
+
+#endif
namespace vcl
{
@@ -43,6 +49,7 @@ namespace unx
class GtkPrintWrapper : private boost::noncopyable
{
+#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
public:
GtkPrintWrapper();
~GtkPrintWrapper();
@@ -133,6 +140,7 @@ private:
print_unix_dialog_set_support_selection_t m_print_unix_dialog_set_support_selection;
print_unix_dialog_set_has_selection_t m_print_unix_dialog_set_has_selection;
#endif
+#endif
};
}