From: Vadim Zeitlin Date: Sun, 4 Mar 2012 00:28:58 +0000 (+0000) Subject: Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e7092398891c83b12c84305d8d0206bdbe415fa0 Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks. Add a special symbol which is defined only if the icons and other images (e.g. cursor) are in the separate resource files and don't need to be embedded as XPMs in the main program. This makes the checks more clear and more customizable as it's enough to change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform checks. Closes #14050. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/demos/bombs/bombs.cpp b/demos/bombs/bombs.cpp index 387941b0e4..2c756fcff3 100644 --- a/demos/bombs/bombs.cpp +++ b/demos/bombs/bombs.cpp @@ -29,8 +29,7 @@ # include #endif -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) \ - || defined(__WXMAC__) +#ifndef wxHAS_IMAGES_IN_RESOURCES # include "bombs.xpm" #endif diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 3a256a67f2..39d74b2d2f 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -38,7 +38,7 @@ // resources // -------------------------------------------------------------------------- -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES // application icon #include "mondrian.xpm" diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 9c71d03efa..ad7a04d0e6 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -214,6 +214,8 @@ Currently the following symbols exist: decide whether some function should be overloaded for both long and long long types.} @itemdef{wxHAS_MULTIPLE_FILEDLG_FILTERS, Defined if wxFileDialog supports multiple ('|'-separated) filters.} +@itemdef{wxHAS_IMAGES_IN_RESOURCES, Defined if + Windows resource files or OS/2 resource files are available on the current platform.} @itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.} @itemdef{wxHAS_RADIO_MENU_ITEMS, Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).} diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index cf94737437..3ef7d6c98c 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -160,14 +160,18 @@ enum wxStockCursor // macros // --------------------------------------------------------------------------- +#if defined(__WINDOWS__) || defined(__WXPM__) + #define wxHAS_IMAGES_IN_RESOURCES +#endif + /* Useful macro for creating icons portably, for example: wxIcon *icon = new wxICON(sample); expands into: - wxIcon *icon = new wxIcon("sample"); // On wxMSW - wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK + wxIcon *icon = new wxIcon("sample"); // On Windows + wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK/Linux */ #ifdef __WXMSW__ diff --git a/samples/access/accesstest.cpp b/samples/access/accesstest.cpp index cd47c0cc7f..29e92dad79 100644 --- a/samples/access/accesstest.cpp +++ b/samples/access/accesstest.cpp @@ -59,7 +59,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/animate/anitest.cpp b/samples/animate/anitest.cpp index e2500c0fc5..e958d585a2 100644 --- a/samples/animate/anitest.cpp +++ b/samples/animate/anitest.cpp @@ -28,7 +28,7 @@ #include "wx/wx.h" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/artprov/arttest.cpp b/samples/artprov/arttest.cpp index ff541274c6..36f9553275 100644 --- a/samples/artprov/arttest.cpp +++ b/samples/artprov/arttest.cpp @@ -20,7 +20,7 @@ #include "wx/wx.h" #endif -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index c1dc4d870a..a9c44ca2f9 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -31,7 +31,7 @@ // ---------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/clipboard/clipboard.cpp b/samples/clipboard/clipboard.cpp index ff139cfa23..1dc3a4216c 100644 --- a/samples/clipboard/clipboard.cpp +++ b/samples/clipboard/clipboard.cpp @@ -22,7 +22,7 @@ #include "wx/clipbrd.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/collpane/collpane.cpp b/samples/collpane/collpane.cpp index b7574d8e4c..27cccb9f77 100644 --- a/samples/collpane/collpane.cpp +++ b/samples/collpane/collpane.cpp @@ -44,7 +44,7 @@ #include "wx/fontpicker.h" #include "wx/aboutdlg.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/combo/combo.cpp b/samples/combo/combo.cpp index 2ed5167ad5..7710587b73 100644 --- a/samples/combo/combo.cpp +++ b/samples/combo/combo.cpp @@ -45,7 +45,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp index a9c56761ab..dd903e2378 100644 --- a/samples/config/conftest.cpp +++ b/samples/config/conftest.cpp @@ -29,7 +29,7 @@ #include "wx/log.h" #include "wx/config.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index d1e553ba85..f158e9e1e7 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -58,7 +58,7 @@ #define EVT_TOGGLEBUTTON EVT_CHECKBOX #endif -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 194fd587ad..2feca42856 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -41,7 +41,7 @@ // resources // ---------------------------------------------------------------------------- -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/debugrpt/debugrpt.cpp b/samples/debugrpt/debugrpt.cpp index 3107665b91..7a1f9c83a3 100644 --- a/samples/debugrpt/debugrpt.cpp +++ b/samples/debugrpt/debugrpt.cpp @@ -35,7 +35,7 @@ #error "This sample can't be built without wxUSE_ON_FATAL_EXCEPTION" #endif // wxUSE_ON_FATAL_EXCEPTION -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/dialup/nettest.cpp b/samples/dialup/nettest.cpp index 9906cdb59a..5f7e025b75 100644 --- a/samples/dialup/nettest.cpp +++ b/samples/dialup/nettest.cpp @@ -36,7 +36,7 @@ #include "wx/dialup.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/display/display.cpp b/samples/display/display.cpp index 7f686a2e43..8477103b8b 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -36,7 +36,7 @@ // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 7916600905..62b65b9d9e 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -27,7 +27,7 @@ #include "wx/metafile.h" #include "wx/dirctrl.h" -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #if wxUSE_DRAG_AND_DROP #include "dnd_copy.xpm" diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp index 287f7876dc..6c11e54648 100644 --- a/samples/docview/docview.cpp +++ b/samples/docview/docview.cpp @@ -61,7 +61,7 @@ #include "wx/filename.h" #endif -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "doc.xpm" #include "chart.xpm" #include "notepad.xpm" diff --git a/samples/dragimag/dragimag.cpp b/samples/dragimag/dragimag.cpp index ddebcc5916..3247e32e2d 100644 --- a/samples/dragimag/dragimag.cpp +++ b/samples/dragimag/dragimag.cpp @@ -36,7 +36,7 @@ #include "dragimag.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #include "dragicon.xpm" #endif diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index ac208afd8d..2fe0bf4b66 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -46,7 +46,7 @@ // ---------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index ee468651b6..eb54c2ede3 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -39,7 +39,7 @@ // ---------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/event/event.cpp b/samples/event/event.cpp index b71f094e91..072241989a 100644 --- a/samples/event/event.cpp +++ b/samples/event/event.cpp @@ -30,7 +30,7 @@ #include "wx/wx.h" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/except/except.cpp b/samples/except/except.cpp index 24fa6808ad..772b1d02dd 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -53,7 +53,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/flash/flash.cpp b/samples/flash/flash.cpp index 0e6ea06593..80f45b3ca2 100644 --- a/samples/flash/flash.cpp +++ b/samples/flash/flash.cpp @@ -39,7 +39,7 @@ #include "wx/cmdline.h" #include "wx/filename.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/fswatcher/fswatcher.cpp b/samples/fswatcher/fswatcher.cpp index f8cd8976e5..539a414b4b 100644 --- a/samples/fswatcher/fswatcher.cpp +++ b/samples/fswatcher/fswatcher.cpp @@ -17,7 +17,7 @@ #include "wx/wx.h" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index aa3b4d59c4..bc30fd739d 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -39,7 +39,7 @@ #include "griddemo.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/help/demo.cpp b/samples/help/demo.cpp index 9ba0461c4b..d9708b2441 100644 --- a/samples/help/demo.cpp +++ b/samples/help/demo.cpp @@ -79,7 +79,7 @@ // ressources // ---------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/html/about/about.cpp b/samples/html/about/about.cpp index 9205f45996..22ebb1555c 100644 --- a/samples/html/about/about.cpp +++ b/samples/html/about/about.cpp @@ -27,7 +27,7 @@ #include "wx/wxhtml.h" #include "wx/statline.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/html/help/help.cpp b/samples/html/help/help.cpp index 490fdbef11..20351cac63 100644 --- a/samples/html/help/help.cpp +++ b/samples/html/help/help.cpp @@ -28,7 +28,7 @@ #include "wx/filesys.h" #include "wx/fs_zip.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/html/htmlctrl/htmlctrl.cpp b/samples/html/htmlctrl/htmlctrl.cpp index 4cc6aca4e9..081ea3af25 100644 --- a/samples/html/htmlctrl/htmlctrl.cpp +++ b/samples/html/htmlctrl/htmlctrl.cpp @@ -32,7 +32,7 @@ #include "wx/html/webkit.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/html/printing/printing.cpp b/samples/html/printing/printing.cpp index 3fea8d49eb..7d6458d9f9 100644 --- a/samples/html/printing/printing.cpp +++ b/samples/html/printing/printing.cpp @@ -25,7 +25,7 @@ #include "wx/html/htmlwin.h" #include "wx/html/htmprint.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp index c22ce0ccfb..58086a31d6 100644 --- a/samples/html/virtual/virtual.cpp +++ b/samples/html/virtual/virtual.cpp @@ -24,7 +24,7 @@ #include "wx/html/htmlwin.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/html/zip/zip.cpp b/samples/html/zip/zip.cpp index accf15623f..37c5f2377e 100644 --- a/samples/html/zip/zip.cpp +++ b/samples/html/zip/zip.cpp @@ -26,7 +26,7 @@ #include "wx/html/htmlwin.h" #include "wx/fs_zip.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/image/image.cpp b/samples/image/image.cpp index b403f4e45f..28afeb1d1f 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -50,7 +50,7 @@ #include "canvas.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp index 99e8422542..d285652e7c 100644 --- a/samples/internat/internat.cpp +++ b/samples/internat/internat.cpp @@ -37,7 +37,7 @@ #include "wx/log.h" #include "wx/cmdline.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index 24132a36c2..a91f524d7d 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -35,7 +35,7 @@ #include "wx/datetime.h" #include "client.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp index 26b09f6791..47b2d62ee6 100644 --- a/samples/ipc/server.cpp +++ b/samples/ipc/server.cpp @@ -32,7 +32,7 @@ // we're using TCP/IP or real DDE. #include "ipcsetup.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 18e7812fb8..f8f478d5f9 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -31,7 +31,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/keyboard/keyboard.cpp b/samples/keyboard/keyboard.cpp index b2172bef0d..d90b035fdf 100644 --- a/samples/keyboard/keyboard.cpp +++ b/samples/keyboard/keyboard.cpp @@ -18,7 +18,7 @@ #include "wx/wx.h" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index 5cca8d8d71..41952f55bd 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -35,7 +35,7 @@ #include "layout.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 97d3a4fef3..966cbdb9ed 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -20,11 +20,11 @@ #include "wx/wx.h" #endif -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "bitmaps/toolbrai.xpm" #include "bitmaps/toolchar.xpm" #include "bitmaps/tooldata.xpm" @@ -177,7 +177,7 @@ MyFrame::MyFrame(const wxChar *title) m_imageListNormal = new wxImageList(32, 32, true); m_imageListSmall = new wxImageList(16, 16, true); -#ifdef __WXMSW__ +#if wxHAS_IMAGES_IN_RESOURCES m_imageListNormal->Add( wxIcon(wxT("icon1"), wxBITMAP_TYPE_ICO_RESOURCE) ); m_imageListNormal->Add( wxIcon(wxT("icon2"), wxBITMAP_TYPE_ICO_RESOURCE) ); m_imageListNormal->Add( wxIcon(wxT("icon3"), wxBITMAP_TYPE_ICO_RESOURCE) ); diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index e64facd67b..e68364cf01 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -32,7 +32,7 @@ #include "wx/toolbar.h" -#if !defined(__WXMSW__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #include "chart.xpm" #endif diff --git a/samples/mediaplayer/mediaplayer.cpp b/samples/mediaplayer/mediaplayer.cpp index 91c3b575f5..0b56f3f53f 100644 --- a/samples/mediaplayer/mediaplayer.cpp +++ b/samples/mediaplayer/mediaplayer.cpp @@ -78,7 +78,7 @@ wxFORCE_LINK_MODULE(wxmediabackend_wmp10) #endif // static wxMSW build -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp index e4c71458d6..43e33bb801 100644 --- a/samples/memcheck/memcheck.cpp +++ b/samples/memcheck/memcheck.cpp @@ -22,7 +22,7 @@ #include "wx/datetime.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 6797e8d30a..3d65f8c4e4 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -59,7 +59,7 @@ #include "copy.xpm" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 289e639e7e..a78e462908 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -36,7 +36,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp index a3bb423cfd..16daebfdd8 100644 --- a/samples/nativdlg/nativdlg.cpp +++ b/samples/nativdlg/nativdlg.cpp @@ -24,7 +24,7 @@ #error Sorry, this sample is only appropriate under Windows. #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 200ed5e34c..7081f5b565 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -26,7 +26,7 @@ #include "wx/utils.h" #include "notebook.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/oleauto/oleauto.cpp b/samples/oleauto/oleauto.cpp index 8c77063fbc..2fdcf0d908 100644 --- a/samples/oleauto/oleauto.cpp +++ b/samples/oleauto/oleauto.cpp @@ -40,7 +40,7 @@ // ressources // ---------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index 17318f6f4f..76e7466a9f 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -34,7 +34,7 @@ #include "cube.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif diff --git a/samples/popup/popup.cpp b/samples/popup/popup.cpp index 6daf63fb31..4ab1ba6a3a 100644 --- a/samples/popup/popup.cpp +++ b/samples/popup/popup.cpp @@ -39,7 +39,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/power/power.cpp b/samples/power/power.cpp index 9f7d040d6b..e7ad00d397 100644 --- a/samples/power/power.cpp +++ b/samples/power/power.cpp @@ -33,7 +33,7 @@ #include "wx/power.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index b2528ed397..ace34b5d7f 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -51,7 +51,7 @@ #include "printing.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index d506684c84..87ca762f84 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -68,7 +68,7 @@ #include -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/render/render.cpp b/samples/render/render.cpp index ae5c3bc4c7..49e35fc1fb 100644 --- a/samples/render/render.cpp +++ b/samples/render/render.cpp @@ -47,7 +47,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/richtext/richtext.cpp b/samples/richtext/richtext.cpp index f75b7392bc..d50ec7b575 100644 --- a/samples/richtext/richtext.cpp +++ b/samples/richtext/richtext.cpp @@ -46,7 +46,7 @@ #include "wx/cshelp.h" #endif -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index e89e826881..d8bc171f06 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -22,7 +22,7 @@ #include "wx/log.h" #include "wx/tglbtn.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/shaped/shaped.cpp b/samples/shaped/shaped.cpp index 9b05903463..e1e3afc17a 100644 --- a/samples/shaped/shaped.cpp +++ b/samples/shaped/shaped.cpp @@ -41,7 +41,7 @@ #include "wx/graphics.h" #include "wx/image.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 342be4e3cf..30d0fa49ab 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -39,7 +39,7 @@ // -------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 439ccc8afa..04b4ce33f2 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -45,7 +45,7 @@ // -------------------------------------------------------------------------- // the application icon -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/sound/sound.cpp b/samples/sound/sound.cpp index 1ec5f2b942..8d450699be 100644 --- a/samples/sound/sound.cpp +++ b/samples/sound/sound.cpp @@ -36,7 +36,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/splash/splash.cpp b/samples/splash/splash.cpp index e02bf69c79..79014bd543 100644 --- a/samples/splash/splash.cpp +++ b/samples/splash/splash.cpp @@ -40,7 +40,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/splitter/splitter.cpp b/samples/splitter/splitter.cpp index 0ed8ae07f2..1884138e60 100644 --- a/samples/splitter/splitter.cpp +++ b/samples/splitter/splitter.cpp @@ -39,7 +39,7 @@ #include "wx/splitter.h" #include "wx/dcmirror.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index 31a26ddfbb..e053fe1642 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -50,7 +50,7 @@ #include "wx/numdlg.h" #include "wx/fontdlg.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 8e5de67641..8db40419ef 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -44,7 +44,7 @@ //---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index 159a15cf9c..8e792daa71 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -36,7 +36,7 @@ #include "bitmaps/help.xpm" #include "SVGlogo24.xpm" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/taborder/taborder.cpp b/samples/taborder/taborder.cpp index 39165b2d75..934dedcd3d 100644 --- a/samples/taborder/taborder.cpp +++ b/samples/taborder/taborder.cpp @@ -39,7 +39,7 @@ #include "wx/notebook.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index d8934e9a6e..f5f8312666 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -29,7 +29,7 @@ #endif // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/text/text.cpp b/samples/text/text.cpp index d25968ce9e..12662153bd 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -45,7 +45,7 @@ #include "wx/numdlg.h" #include "wx/tokenzr.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 734a3d39df..172fd95ba6 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -60,7 +60,7 @@ // resources // ---------------------------------------------------------------------------- -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 94563cad03..229a9badb8 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -53,7 +53,7 @@ #include "unchecked.xpm" #include "checked.xpm" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/treelist/treelist.cpp b/samples/treelist/treelist.cpp index d7b5dc9527..081a594e68 100644 --- a/samples/treelist/treelist.cpp +++ b/samples/treelist/treelist.cpp @@ -45,7 +45,7 @@ // Resources // ---------------------------------------------------------------------------- -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/typetest/typetest.cpp b/samples/typetest/typetest.cpp index 61a6de06df..69e074b65d 100644 --- a/samples/typetest/typetest.cpp +++ b/samples/typetest/typetest.cpp @@ -25,7 +25,7 @@ #include "typetest.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/uiaction/uiaction.cpp b/samples/uiaction/uiaction.cpp index 6cf4d99f6d..3e0a7fd7b5 100644 --- a/samples/uiaction/uiaction.cpp +++ b/samples/uiaction/uiaction.cpp @@ -40,7 +40,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index 59c9d95036..82736d8a79 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -33,7 +33,7 @@ #include "wx/valtext.h" #include "wx/valnum.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/vscroll/vstest.cpp b/samples/vscroll/vstest.cpp index dbacf7830e..47e2822b3c 100644 --- a/samples/vscroll/vstest.cpp +++ b/samples/vscroll/vstest.cpp @@ -40,7 +40,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 325111fa00..de03b11709 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -35,7 +35,7 @@ #include "wx/filesys.h" #include "wx/fs_arc.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/wrapsizer/wrapsizer.cpp b/samples/wrapsizer/wrapsizer.cpp index 86d95a25f6..7ad2c93903 100644 --- a/samples/wrapsizer/wrapsizer.cpp +++ b/samples/wrapsizer/wrapsizer.cpp @@ -21,7 +21,7 @@ #include "wx/wrapsizer.h" #include "wx/artprov.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/xrc/myframe.cpp b/samples/xrc/myframe.cpp index 2a3dfe2cca..6662b34597 100644 --- a/samples/xrc/myframe.cpp +++ b/samples/xrc/myframe.cpp @@ -61,7 +61,7 @@ // the application icon (under Windows and OS/2 it is in resources and even // though we could still include the XPM here it would be unused) -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/samples/xti/xti.cpp b/samples/xti/xti.cpp index 2b61783ce4..f67a32fbdb 100644 --- a/samples/xti/xti.cpp +++ b/samples/xti/xti.cpp @@ -58,7 +58,7 @@ // resources // ---------------------------------------------------------------------------- -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif diff --git a/utils/emulator/src/emulator.cpp b/utils/emulator/src/emulator.cpp index 2547c62559..41ef3eec8f 100644 --- a/utils/emulator/src/emulator.cpp +++ b/utils/emulator/src/emulator.cpp @@ -48,7 +48,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "emulator.xpm" #endif diff --git a/utils/helpview/src/client.cpp b/utils/helpview/src/client.cpp index dfcae4f0d0..bc45c5dfdc 100644 --- a/utils/helpview/src/client.cpp +++ b/utils/helpview/src/client.cpp @@ -45,7 +45,7 @@ //#define wxUSE_DDE_FOR_IPC 0 #include -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "mondrian.xpm" #endif diff --git a/utils/helpview/src/remhelp.cpp b/utils/helpview/src/remhelp.cpp index 312cd1190a..ee8da0e31b 100644 --- a/utils/helpview/src/remhelp.cpp +++ b/utils/helpview/src/remhelp.cpp @@ -31,7 +31,7 @@ //#include "ddesetup.h" //#define wxUSE_DDE_FOR_IPC 0 -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "mondrian.xpm" #endif