]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
fix wxSTOCK_WITH_MNEMONIC handling (was reversed after recent changes)
[wxWidgets.git] / src / common / appbase.cpp
index efc2c45cbdd055868d09595d805eeff3bbf23ebe..fa5db01ac9682e88b5ceeb0d0229e46368e2b7ae 100644 (file)
@@ -29,9 +29,9 @@
     #include "wx/app.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/utils.h"
 #endif //WX_PRECOMP
 
-#include "wx/utils.h"
 #include "wx/apptrait.h"
 #include "wx/cmdline.h"
 #include "wx/confbase.h"
@@ -216,6 +216,24 @@ void wxAppConsole::Exit()
     exit(-1);
 }
 
+wxLayoutDirection wxAppConsole::GetLayoutDirection() const
+{
+#if wxUSE_INTL
+    const wxLocale *const locale = wxGetLocale();
+    if ( locale )
+    {
+        const wxLanguageInfo *const
+            info = wxLocale::GetLanguageInfo(locale->GetLanguage());
+
+        if ( info )
+            return info->LayoutDirection;
+    }
+#endif // wxUSE_INTL
+
+    // we don't know
+    return wxLayout_Default;
+}
+
 // ----------------------------------------------------------------------------
 // traits stuff
 // ----------------------------------------------------------------------------