]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/app.cpp
Applied patch [ 882493 ] Added XRC support for wxStatusBar
[wxWidgets.git] / src / mac / app.cpp
index cfc97e1c3e15fd36432fb7dbc6b01b7b2996966c..a5f703819b6203f297d434c791e16f83d753f346 100644 (file)
@@ -69,7 +69,9 @@
 extern wxList wxPendingDelete;
 extern wxList *wxWinMacWindowList;
 extern wxList *wxWinMacControlList;
+#if wxUSE_THREADS
 extern size_t g_numberOfThreads;
+#endif // wxUSE_THREADS
 
 // statics for implementation
 
@@ -645,6 +647,11 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     if ( !wxAppBase::Initialize(argc, argv) )
         return false;
 
+#if wxUSE_INTL
+    wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
+#endif
+
+
     wxWinMacWindowList = new wxList(wxKEY_INTEGER);
     wxWinMacControlList = new wxList(wxKEY_INTEGER);
 
@@ -1277,11 +1284,13 @@ void wxApp::MacDoOneEvent()
             sleepTime = kEventDurationNoWait ;
         else
         {
+#if wxUSE_THREADS
             if (g_numberOfThreads)
             {
                 sleepTime = kEventDurationNoWait;
             }
             else
+#endif // wxUSE_THREADS
             {
                 sleepTime = kEventDurationSecond;
             }
@@ -1320,11 +1329,13 @@ void wxApp::MacDoOneEvent()
             sleepTime = kEventDurationNoWait;
         else
         {
+#if wxUSE_THREADS
             if (g_numberOfThreads)
             {
                 sleepTime = kEventDurationNoWait;
             }
             else
+#endif // wxUSE_THREADS
             {
                 sleepTime = kEventDurationSecond;
             }
@@ -1806,6 +1817,10 @@ int wxKeyCodeToMacModifier(wxKeyCode key)
 
 bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
 {
+//#ifdef __DARWIN__
+//     wxHIDKeyboard keyboard;
+//     return keyboard.IsActive(key);
+//#else
 // TODO:  Have it use HID Manager on OSX...
 //if OS X > 10.2 (i.e. 10.2.x)
 //a known apple bug prevents the system from determining led
@@ -1815,6 +1830,7 @@ bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
 //  KeyMapByteArray keymap; 
 //  GetKeys((BigEndianLong*)keymap);
 //  return !!(BitTst(keymap, (sizeof(KeyMapByteArray)*8) - iKey));
+//#endif
 }
 
 #if !TARGET_CARBON