]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Fix warning for unknown menu stock id.
[wxWidgets.git] / src / common / appbase.cpp
index b16ea3d8374b207cc6c82698872aa911124d3328..40706d3aee03a262fed7419bc8da299e89eb8351 100644 (file)
@@ -25,6 +25,9 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #ifdef __WXMSW__
+        #include  "wx/msw/wrapwin.h"  // includes windows.h for MessageBox()
+    #endif
     #include "wx/list.h"
     #include "wx/app.h"
     #include "wx/intl.h"
   #include  <signal.h>      // for SIGTRAP used by wxTrap()
 #endif  //Win/Unix
 
-#if defined(__WXMSW__)
-  #include  "wx/msw/wrapwin.h"  // includes windows.h for MessageBox()
-#endif
-
 #if wxUSE_FONTMAP
     #include "wx/fontmap.h"
 #endif // wxUSE_FONTMAP
@@ -216,6 +215,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
 // ----------------------------------------------------------------------------