X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/127eab18f80e5b298b8c0326609ed811035e6829..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/mgl/settings.cpp diff --git a/src/mgl/settings.cpp b/src/mgl/settings.cpp index 060e5bf51a..107eb14b12 100644 --- a/src/mgl/settings.cpp +++ b/src/mgl/settings.cpp @@ -14,10 +14,13 @@ #endif #include "wx/settings.h" -#include "wx/colour.h" -#include "wx/font.h" -#include "wx/gdicmn.h" -#include "wx/module.h" + +#ifndef WX_PRECOMP + #include "wx/colour.h" + #include "wx/font.h" + #include "wx/gdicmn.h" + #include "wx/module.h" +#endif // ---------------------------------------------------------------------------- // global data @@ -31,8 +34,7 @@ public: virtual bool OnInit() { return true; } virtual void OnExit() { - delete gs_fontDefault; - gs_fontDefault = NULL; + wxDELETE(gs_fontDefault); } private: @@ -45,7 +47,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule) wxColour wxSystemSettingsNative::GetColour(wxSystemColour WXUNUSED(index)) { - // not implemented, the mean is in wxUniversal + // overridden by wxSystemSettings::GetColour in wxUniversal return wxColour(0,0,0); } @@ -68,6 +70,9 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) gs_fontDefault = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL, false, "Arial"); return *gs_fontDefault; } + default: + { + } } return wxNullFont; @@ -85,9 +90,9 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w case wxSYS_SCREEN_Y: wxDisplaySize(NULL, &val); return val; - case wxSYS_VSCROLL_X: - case wxSYS_HSCROLL_Y: - return 15; + default: + { + } } return -1; // unsupported metric @@ -98,9 +103,12 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index) switch (index) { case wxSYS_CAN_ICONIZE_FRAME: - return false; case wxSYS_CAN_DRAW_FRAME_DECORATIONS: + case wxSYS_TABLET_PRESENT: return false; + + default: + wxFAIL_MSG( wxT("unknown feature") ); } return false;