Changeset cca2ce1 in git


Ignore:
Timestamp:
23/07/10 13:39:46 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
438c9ed
Parents:
193efb1
Message:

src/printwx.cc,src/printwx.h: Don't compile in the preview code when
we disable the preview feature.

git-svn-id: file:///home/survex-svn/survex/trunk@3483 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r193efb1 rcca2ce1  
     1Fri Jul 23 12:38:43 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/printwx.cc,src/printwx.h: Don't compile in the preview code when
     4          we disable the preview feature.
     5
    16Fri Jul 23 12:15:31 GMT 2010  Olly Betts <olly@survex.com>
    27
  • src/printwx.cc

    r193efb1 rcca2ce1  
    5858        svx_PRINT = 1200,
    5959        svx_EXPORT,
     60#ifdef AVEN_PRINT_PREVIEW
    6061        svx_PREVIEW,
     62#endif
    6163        svx_SCALE,
    6264        svx_BEARING,
     
    134136    EVT_BUTTON(svx_PRINT, svxPrintDlg::OnPrint)
    135137    EVT_BUTTON(svx_EXPORT, svxPrintDlg::OnExport)
     138#ifdef AVEN_PRINT_PREVIEW
    136139    EVT_BUTTON(svx_PREVIEW, svxPrintDlg::OnPreview)
     140#endif
    137141    EVT_BUTTON(svx_PLAN, svxPrintDlg::OnPlan)
    138142    EVT_BUTTON(svx_ELEV, svxPrintDlg::OnElevation)
     
    285289    h2->Add(but, 0, wxALIGN_RIGHT|wxALL, 5);
    286290    if (printing) {
    287 #if !defined __WXMAC__ && !defined wxUSE_LIBGNOMEPRINT
    288         // The Gnome print dialog provides its own preview.
     291#ifdef AVEN_PRINT_PREVIEW
    289292        but = new wxButton(this, svx_PREVIEW, wmsg(/*Pre&view*/401));
    290293        h2->Add(but, 0, wxALIGN_RIGHT|wxALL, 5);
     
    341344}
    342345
     346#ifdef AVEN_PRINT_PREVIEW
    343347void
    344348svxPrintDlg::OnPreview(wxCommandEvent&) {
     
    384388    frame->Show();
    385389}
     390#endif
    386391
    387392void
     
    966971    GetPageSizePixels(&xpPageWidth, &ypPageDepth);
    967972    pdc = GetDC();
     973#ifdef AVEN_PRINT_PREVIEW
    968974    if (IsPreview()) {
    969975        int dcx, dcy;
     
    971977        pdc->SetUserScale((double)dcx / xpPageWidth, (double)dcy / ypPageDepth);
    972978    }
     979#endif
    973980
    974981    layout * l = m_layout;
  • src/printwx.h

    r193efb1 rcca2ce1  
    2323
    2424#include "avenprcore.h"
     25
     26// The Gnome print dialog provides its own preview.  I assume Mac OS X does
     27// to (MarkS made that change).
     28#if !defined __WXMAC__ && !defined wxUSE_LIBGNOMEPRINT
     29# define AVEN_PRINT_PREVIEW
     30#endif
    2531
    2632class MainFrm;
     
    6167        void OnPrint(wxCommandEvent& event);
    6268        void OnExport(wxCommandEvent& event);
     69#ifdef AVEN_PRINT_PREVIEW
    6370        void OnPreview(wxCommandEvent& event);
     71#endif
    6472        void OnPlan(wxCommandEvent&);
    6573        void OnElevation(wxCommandEvent&);
Note: See TracChangeset for help on using the changeset viewer.