#include "edit.h" // Edit module
#include "prefs.h" // Prefs
-#ifndef __WXMSW__
- #include "../sample.xpm"
-#endif
-
//----------------------------------------------------------------------------
// resources
//----------------------------------------------------------------------------
// the application icon (under Windows and OS/2 it is in resources)
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
- #include "mondrian.xpm"
+#ifndef wxHAS_IMAGES_IN_RESOURCES
+ #include "../sample.xpm"
#endif
//============================================================================
//! global print data, to remember settings during the session
wxPrintData *g_printData = (wxPrintData*) NULL;
-wxPageSetupData *g_pageSetupData = (wxPageSetupData*) NULL;
+wxPageSetupDialogData *g_pageSetupData = (wxPageSetupDialogData*) NULL;
#endif // wxUSE_PRINTING_ARCHITECTURE
// open application frame
m_frame->Layout ();
m_frame->Show (true);
- SetTopWindow (m_frame);
return true;
}
{
SetIcon(wxICON(sample));
- // intitialize important variables
+ // initialize important variables
m_edit = NULL;
// set icon and background
SetTitle (*g_appname);
- SetIcon (wxICON (mondrian));
SetBackgroundColour (wxT("WHITE"));
// about box shown for 1 seconds
new wxPrintPreview (new EditPrint (m_edit),
new EditPrint (m_edit),
&printDialogData);
- if (!preview->Ok()) {
+ if (!preview->IsOk()) {
delete preview;
wxMessageBox (_("There was a problem with previewing.\n\
Perhaps your current printer is not correctly?"),
// about icontitle//info
wxBoxSizer *aboutpane = new wxBoxSizer (wxHORIZONTAL);
- wxBitmap bitmap = wxBitmap(wxICON (mondrian));
+ wxBitmap bitmap = wxBitmap(wxICON (sample));
aboutpane->Add (new wxStaticBitmap (this, wxID_ANY, bitmap),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 20);
aboutpane->Add (aboutinfo, 1, wxEXPAND);
}
AppAbout::~AppAbout () {
- if (m_timer) {
- delete m_timer;
- m_timer = NULL;
- }
+ wxDELETE(m_timer);
}
//----------------------------------------------------------------------------
// event handlers
void AppAbout::OnTimerEvent (wxTimerEvent &WXUNUSED(event)) {
- if (m_timer) delete m_timer;
- m_timer = NULL;
+ wxDELETE(m_timer);
EndModal (wxID_OK);
}