From 6d8edd32b5041d1124b5cbe03e281062ae0220a7 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Mon, 4 Apr 2005 10:34:56 +0000 Subject: [PATCH] fixed cases where __WXMAC_CLASSIC__, __WXMAC_CARBON__, and __WXMAC_OSX__ were being treated as 0/1 value instead of (un)defined symbol git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/features.h | 6 +++--- include/wx/mac/apptbase.h | 2 +- include/wx/mac/apptrait.h | 2 +- include/wx/mac/display.h | 2 +- include/wx/mac/gsockmac.h | 2 +- include/wx/mac/helpxxxx.h | 2 +- include/wx/mac/imaglist.h | 2 +- include/wx/mac/listctrl.h | 2 +- include/wx/mac/treectrl.h | 2 +- src/mac/classic/app.cpp | 11 +++-------- 10 files changed, 14 insertions(+), 19 deletions(-) diff --git a/include/wx/features.h b/include/wx/features.h index 62370ae63b..fbe9692d3a 100644 --- a/include/wx/features.h +++ b/include/wx/features.h @@ -30,9 +30,9 @@ #endif /* taskbar is implemented in the major ports */ -#if defined(__WXMSW__) || defined(__WXCOCOA__) || \ - defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || \ - (defined(__WXMAC__) && defined(__WXMAC_OSX__)) || defined(__WXCOCOA__) +#if defined(__WXMSW__) || defined(__WXCOCOA__) \ + || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \ + || defined(__WXMAC_OSX__) || defined(__WXCOCOA__) #define wxHAS_TASK_BAR_ICON #else #undef wxHAS_TASK_BAR_ICON diff --git a/include/wx/mac/apptbase.h b/include/wx/mac/apptbase.h index a2f5ea97f9..6216f9082c 100644 --- a/include/wx/mac/apptbase.h +++ b/include/wx/mac/apptbase.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/apptbase.h" #else #include "wx/mac/carbon/apptbase.h" diff --git a/include/wx/mac/apptrait.h b/include/wx/mac/apptrait.h index fe7b4791a9..e3ff75ce83 100644 --- a/include/wx/mac/apptrait.h +++ b/include/wx/mac/apptrait.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/apptrait.h" #else #include "wx/mac/carbon/apptrait.h" diff --git a/include/wx/mac/display.h b/include/wx/mac/display.h index 9a523e41f8..4347bb2797 100644 --- a/include/wx/mac/display.h +++ b/include/wx/mac/display.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/display.h" #else #include "wx/mac/carbon/display.h" diff --git a/include/wx/mac/gsockmac.h b/include/wx/mac/gsockmac.h index 68bdf47b85..23cc004d5f 100644 --- a/include/wx/mac/gsockmac.h +++ b/include/wx/mac/gsockmac.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/gsockmac.h" #else #include "wx/mac/carbon/gsockmac.h" diff --git a/include/wx/mac/helpxxxx.h b/include/wx/mac/helpxxxx.h index 9cfb4b2994..aaea7f2871 100644 --- a/include/wx/mac/helpxxxx.h +++ b/include/wx/mac/helpxxxx.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/helpxxxx.h" #else #include "wx/mac/carbon/helpxxxx.h" diff --git a/include/wx/mac/imaglist.h b/include/wx/mac/imaglist.h index f09045cc89..6d8ca15ec9 100644 --- a/include/wx/mac/imaglist.h +++ b/include/wx/mac/imaglist.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/imaglist.h" #else #include "wx/mac/carbon/imaglist.h" diff --git a/include/wx/mac/listctrl.h b/include/wx/mac/listctrl.h index a38858d19d..be9ffdfed1 100644 --- a/include/wx/mac/listctrl.h +++ b/include/wx/mac/listctrl.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/listctrl.h" #else #include "wx/mac/carbon/listctrl.h" diff --git a/include/wx/mac/treectrl.h b/include/wx/mac/treectrl.h index a7781a8ed6..09a33f0dae 100644 --- a/include/wx/mac/treectrl.h +++ b/include/wx/mac/treectrl.h @@ -1,4 +1,4 @@ -#if __WXMAC_CLASSIC__ +#ifdef __WXMAC_CLASSIC__ #include "wx/mac/classic/treectl.h" #else #include "wx/mac/carbon/treectrl.h" diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index c2aaf86cd0..f3506c025c 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -1856,14 +1856,9 @@ bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons")); -#if __WXMAC_CARBON__ -//TODO: Low get map... - return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key)); -#else - KeyMap keymap; - GetKeys(keymap); - return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key)); -#endif + KeyMap keymap; + GetKeys(keymap); + return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key)); } #if !TARGET_CARBON -- 2.45.2