From 75737d0570103dbb9de120e77d0ce3154510ece9 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 19 Apr 1999 20:43:41 +0000 Subject: [PATCH] Fixed wxPostScript printing problem (used wrong constructor, and the right one was wrong anyway...) Fixed include dir ordering in wxMotif makefiles (wrong version of zlib.h picked up) and added wxchar.cpp to Motif makefile. Changed buffer.h since there's no wchar.h on my system. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tardist | 7 +++++++ include/wx/buffer.h | 7 +++++++ samples/dnd/dnd.cpp | 8 ++++---- src/generic/dcpsg.cpp | 2 ++ src/generic/prntdlgg.cpp | 6 +++++- src/make.env | 4 ++-- src/makeenvs/linux.env | 4 ++-- src/makeenvs/sgi.env | 4 ++-- src/makeenvs/solaris.env | 4 ++-- src/motif/makefile.unx | 1 + 10 files changed, 34 insertions(+), 13 deletions(-) diff --git a/distrib/msw/tardist b/distrib/msw/tardist index 5d1b17da28..72b1df566e 100644 --- a/distrib/msw/tardist +++ b/distrib/msw/tardist @@ -29,6 +29,7 @@ rm -f $2/tex2rtf2.tgz rm -f $2/ogl3.tgz rm -f $2/treedraw.tar.gz rm -f $2/glcanvas.tar.gz +rm -f $2/jpeg.tgz echo Tarring... @@ -98,4 +99,10 @@ tar cvf $2/treedraw.tar -T /tmp/wxtree.txt gzip $2/treedraw.tar mv $2/treedraw.tar.gz $2/treedraw.tgz +### JPEG +ls `cat $1/distrib/msw/jpeg.rsp` > /tmp/jpeg.txt +tar cvf $2/jpeg.tar -T /tmp/jpeg.txt +gzip $2/jpeg.tar +mv $2/jpeg.tar.gz $2/jpeg.tgz + echo Done! diff --git a/include/wx/buffer.h b/include/wx/buffer.h index a1547764c7..9bed7fca30 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -17,6 +17,13 @@ #include "wx/wxchar.h" #include // strdup +// wchar.h isn't available on my system (Linux, g++ 2.7.2). JACS. +#ifdef __LINUX__ +#include +#else +#include // wchar_t +#endif + // ---------------------------------------------------------------------------- // Special classes for (wide) character strings: they use malloc/free instead // of new/delete diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 64244a8a00..a4db60f67e 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -42,7 +42,7 @@ class DnDText : public wxTextDropTarget public: DnDText(wxListBox *pOwner) { m_pOwner = pOwner; } - virtual bool OnDropText(int x, int y, const char *psz ); + virtual bool OnDropText(long x, long y, const char *psz ); private: wxListBox *m_pOwner; @@ -53,7 +53,7 @@ class DnDFile : public wxFileDropTarget public: DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; } - virtual bool OnDropFiles(int x, int y, + virtual bool OnDropFiles(long x, long y, size_t nFiles, const char * const aszFiles[] ); private: @@ -349,14 +349,14 @@ DnDFrame::~DnDFrame() // ---------------------------------------------------------------------------- // Notifications called by the base class // ---------------------------------------------------------------------------- -bool DnDText::OnDropText(int, int, const char *psz) +bool DnDText::OnDropText(long, long, const char *psz) { m_pOwner->Append(psz); return TRUE; } -bool DnDFile::OnDropFiles(int, int, size_t nFiles, +bool DnDFile::OnDropFiles(long, long, size_t nFiles, const char * const aszFiles[]) { wxString str; diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index a611e4881d..9428174dc0 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -315,6 +315,8 @@ wxPostScriptDC::wxPostScriptDC (const wxPrintData& printData) m_signY = -1; // default y-axis bottom up -> top down m_printData = printData; + + m_ok = TRUE; } wxPostScriptDC::~wxPostScriptDC () diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 6270c0f62f..de944fc343 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -242,7 +242,10 @@ void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event)) wxThePrintSetupData->SetPrinterFile(f); } else + { + m_printDialogData.GetPrintData().SetPrintMode(wxPRINT_MODE_PRINTER); wxThePrintSetupData->SetPrinterMode(wxPRINT_MODE_PRINTER); + } EndModal(wxID_OK); } @@ -354,7 +357,8 @@ TODO: collate and noCopies should be duplicated across dialog data and print dat wxDC *wxGenericPrintDialog::GetPrintDC() { - return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); + // return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); + return new wxPostScriptDC(GetPrintDialogData().GetPrintData()); } // ---------------------------------------------------------------------------- diff --git a/src/make.env b/src/make.env index 8bbc6e78ed..7df2eca3cf 100644 --- a/src/make.env +++ b/src/make.env @@ -77,8 +77,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) # Directory for object files OBJDIR = objects$(GUISUFFIX) -CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) +CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) +CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) diff --git a/src/makeenvs/linux.env b/src/makeenvs/linux.env index 8bbc6e78ed..7df2eca3cf 100644 --- a/src/makeenvs/linux.env +++ b/src/makeenvs/linux.env @@ -77,8 +77,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) # Directory for object files OBJDIR = objects$(GUISUFFIX) -CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) +CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) +CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) diff --git a/src/makeenvs/sgi.env b/src/makeenvs/sgi.env index e1d1b2fd13..b16923a708 100644 --- a/src/makeenvs/sgi.env +++ b/src/makeenvs/sgi.env @@ -77,8 +77,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) # Directory for object files OBJDIR = objects$(GUISUFFIX) -CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) +CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) +CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) diff --git a/src/makeenvs/solaris.env b/src/makeenvs/solaris.env index 3b7c52adbb..00abd382a9 100644 --- a/src/makeenvs/solaris.env +++ b/src/makeenvs/solaris.env @@ -77,8 +77,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) # Directory for object files OBJDIR = objects$(GUISUFFIX) -CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) +CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) +CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) diff --git a/src/motif/makefile.unx b/src/motif/makefile.unx index 182f91062c..b664579b19 100644 --- a/src/motif/makefile.unx +++ b/src/motif/makefile.unx @@ -67,6 +67,7 @@ LIB_CPP_SRC=\ ../common/valtext.cpp \ ../common/variant.cpp \ ../common/wxexpr.cpp \ + ../common/wxchar.cpp \ ../common/socket.cpp \ ../common/sckaddr.cpp \ ../common/sckipc.cpp \ -- 2.45.2