diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index 47a98445fe..c090c17bf2 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -1611,7 +1611,7 @@ void EDA_BASE_FRAME::onIconize( wxIconizeEvent& aEvent ) } -#ifdef _WIN32 +#ifdef __WXMSW__ WXLRESULT EDA_BASE_FRAME::MSWWindowProc( WXUINT message, WXWPARAM wParam, WXLPARAM lParam ) { // This will help avoid the menu keeping focus when the alt key is released diff --git a/common/paths.cpp b/common/paths.cpp index 0127666e80..4b239f0a85 100644 --- a/common/paths.cpp +++ b/common/paths.cpp @@ -177,7 +177,7 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir ) } -#ifdef __WXMSW__ +#ifdef _WIN32 /** * Gets the stock (install) data path, which is the base path for things like scripting, etc */ @@ -485,7 +485,7 @@ wxString PATHS::GetOSXKicadDataDir() #endif -#ifdef __WXMSW__ +#ifdef _WIN32 wxString PATHS::GetWindowsFontConfigDir() { wxFileName fn; diff --git a/common/tool/action_menu.cpp b/common/tool/action_menu.cpp index 728434fa01..98ed4262c5 100644 --- a/common/tool/action_menu.cpp +++ b/common/tool/action_menu.cpp @@ -653,7 +653,7 @@ wxMenuItem* ACTION_MENU::appendCopy( const wxMenuItem* aSource ) // On Windows, for Checkable Menu items, adding a bitmap adds also // our predefined checked alternate bitmap // On other OS, wxITEM_CHECK and wxITEM_RADIO Menu items do not use custom bitmaps. -#if defined( _WIN32 ) +#if defined( __WXMSW__ ) // On Windows, AddBitmapToMenuItem() uses the unchecked bitmap for wxITEM_CHECK and // wxITEM_RADIO menuitems and autoamtically adds a checked bitmap. // For other menuitrms, use the "checked" bitmap. diff --git a/common/widgets/number_badge.cpp b/common/widgets/number_badge.cpp index 80807bfacf..ddf17c02b5 100644 --- a/common/widgets/number_badge.cpp +++ b/common/widgets/number_badge.cpp @@ -112,19 +112,11 @@ void NUMBER_BADGE::SetTextSize( int aSize ) // OSX has prevalent badges in the application bar at the bottom of the screen so we try to // match those. Other platforms may also need tweaks to spacing, fontweight, etc. -#ifdef __WXMAC__ +#if defined( __WXMAC__ ) #define BADGE_FONTWEIGHT wxFONTWEIGHT_NORMAL #define PLATFORM_FUDGE_X 0.92 #define PLATFORM_FUDGE_Y 1.6 -#endif - -#ifdef __WXGTK__ -#define BADGE_FONTWEIGHT wxFONTWEIGHT_BOLD -#define PLATFORM_FUDGE_X 1.0 -#define PLATFORM_FUDGE_Y 1.0 -#endif - -#ifdef __WXMSW__ +#else #define BADGE_FONTWEIGHT wxFONTWEIGHT_BOLD #define PLATFORM_FUDGE_X 1.0 #define PLATFORM_FUDGE_Y 1.0 diff --git a/include/eda_base_frame.h b/include/eda_base_frame.h index 6a9be60187..b82c9b77c2 100644 --- a/include/eda_base_frame.h +++ b/include/eda_base_frame.h @@ -726,7 +726,7 @@ private: */ virtual bool IsModal() const { return false; } -#ifdef _WIN32 +#ifdef __WXMSW__ /** * Windows specific override of the wxWidgets message handler for a window */ diff --git a/include/gal/opengl/kiglew.h b/include/gal/opengl/kiglew.h index a846731605..7eaf8fccc3 100644 --- a/include/gal/opengl/kiglew.h +++ b/include/gal/opengl/kiglew.h @@ -36,7 +36,7 @@ // includes since they transitively include the OpenGL headers. #define GL_SILENCE_DEPRECATION 1 -#ifdef __WXGTK__ +#if defined( __unix__ ) and not defined( __APPLE__ ) #ifdef KICAD_USE_EGL @@ -58,12 +58,12 @@ #endif // KICAD_USE_EGL -#else // __WXGTK__ +#else // defined( __unix__ ) and not defined( __APPLE__ ) // Non-GTK platforms only need the normal GLEW include #include -#endif // __WXGTK__ +#endif // defined( __unix__ ) and not defined( __APPLE__ ) #ifdef _WIN32 diff --git a/include/paths.h b/include/paths.h index 574fdbb558..84052eb7c3 100644 --- a/include/paths.h +++ b/include/paths.h @@ -182,7 +182,7 @@ public: static wxString GetOSXKicadDataDir(); #endif -#ifdef __WXMSW__ +#ifdef _WIN32 /** * @return The directory the font config support files can be found */ @@ -234,7 +234,7 @@ private: */ static void getUserDocumentPath( wxFileName& aPath ); -#ifdef __WXMSW__ +#ifdef _WIN32 /** * Gets the root of the kicad install on Windows specifically. * KiCad on Windows has a pseudo posix folder structure contained in its installed folder diff --git a/kicad/pcm/pcm.cpp b/kicad/pcm/pcm.cpp index b976ad67c5..598fa017fb 100644 --- a/kicad/pcm/pcm.cpp +++ b/kicad/pcm/pcm.cpp @@ -672,13 +672,11 @@ void PLUGIN_CONTENT_MANAGER::PreparePackage( PCM_PACKAGE& aPackage ) && parse_version_tuple( *ver.kicad_version_max, 999 ) < m_kicad_version ) ver.compatible = false; -#ifdef __WXMSW__ +#if defined( _WIN32 ) wxString platform = wxT( "windows" ); -#endif -#ifdef __WXOSX__ +#elif defined( __APPLE__ ) wxString platform = wxT( "macos" ); -#endif -#ifdef __WXGTK__ +#else wxString platform = wxT( "linux" ); #endif diff --git a/scripting/python_manager.cpp b/scripting/python_manager.cpp index 576ca0988d..02c60a8c77 100644 --- a/scripting/python_manager.cpp +++ b/scripting/python_manager.cpp @@ -90,7 +90,7 @@ void PYTHON_MANAGER::Execute( const wxString& aArgs, wxString PYTHON_MANAGER::FindPythonInterpreter() { -#ifdef __WXMSW__ +#ifdef _WIN32 // TODO(JE) where #else wxArrayString output;