X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c50e0cc752b6ad0fd3ca960187e7a31d9248e71b..d5cc191c9cd48a915ce0dfc6e49511b2fddb6746:/samples/stc/stctest.cpp diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index a8961ae5c8..8db40419ef 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -39,17 +39,13 @@ #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 //============================================================================ @@ -83,7 +79,7 @@ wxString *g_appname = NULL; //! 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 @@ -230,7 +226,6 @@ bool App::OnInit () { // open application frame m_frame->Layout (); m_frame->Show (true); - SetTopWindow (m_frame); return true; } @@ -316,12 +311,11 @@ AppFrame::AppFrame (const wxString &title) { 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 @@ -436,7 +430,7 @@ void AppFrame::OnPrintPreview (wxCommandEvent &WXUNUSED(event)) { 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?"), @@ -656,7 +650,7 @@ AppAbout::AppAbout (wxWindow *parent, // 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); @@ -683,17 +677,13 @@ AppAbout::AppAbout (wxWindow *parent, } 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); }