From 78f933650057d0e09ee06b59f7d23cb83b48e1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 26 Jan 2006 19:22:56 +0000 Subject: [PATCH] Blind fixes for warnings in wxTinderbox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/settings.cpp | 9 +++++++++ src/mgl/toplevel.cpp | 13 ++++++++----- src/univ/menu.cpp | 9 ++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/mgl/settings.cpp b/src/mgl/settings.cpp index 060e5bf51a..465cf23591 100644 --- a/src/mgl/settings.cpp +++ b/src/mgl/settings.cpp @@ -68,6 +68,9 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) gs_fontDefault = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL, false, "Arial"); return *gs_fontDefault; } + default: + { + } } return wxNullFont; @@ -88,6 +91,9 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w case wxSYS_VSCROLL_X: case wxSYS_HSCROLL_Y: return 15; + default: + { + } } return -1; // unsupported metric @@ -101,6 +107,9 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index) return false; case wxSYS_CAN_DRAW_FRAME_DECORATIONS: return false; + default: + { + } } return false; diff --git a/src/mgl/toplevel.cpp b/src/mgl/toplevel.cpp index 69bbdf584a..80646a601f 100644 --- a/src/mgl/toplevel.cpp +++ b/src/mgl/toplevel.cpp @@ -22,9 +22,12 @@ #pragma hdrstop #endif -#include "wx/defs.h" -#include "wx/toplevel.h" -#include "wx/app.h" +#ifndef WX_PRECOMP + #include "wx/defs.h" + #include "wx/toplevel.h" + #include "wx/app.h" +#endif // WX_PRECOMP + #include "wx/mgl/private.h" // ---------------------------------------------------------------------------- @@ -115,8 +118,8 @@ wxTopLevelWindowMGL::~wxTopLevelWindowMGL() if (wxTheApp->GetTopWindow() == this) wxTheApp->SetTopWindow(NULL); - if ((wxTopLevelWindows.Number() == 0) && - (wxTheApp->GetExitOnFrameDelete())) + if (wxTopLevelWindows.IsEmpty() && + wxTheApp->GetExitOnFrameDelete()) { wxTheApp->ExitMainLoop(); } diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index ae7eab4f2a..22949bed1d 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/menu.cpp +// Name: src/univ/menu.cpp // Purpose: wxMenuItem, wxMenu and wxMenuBar implementation // Author: Vadim Zeitlin // Modified by: @@ -23,6 +23,8 @@ #pragma hdrstop #endif +#if wxUSE_MENUS + #ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/control.h" // for FindAccelIndex() @@ -32,8 +34,6 @@ #include "wx/log.h" #endif // WX_PRECOMP -#if wxUSE_MENUS - #include "wx/popupwin.h" #include "wx/evtloop.h" #include "wx/dcclient.h" @@ -2491,7 +2491,7 @@ void wxMenuBar::OnDismiss() bool wxMenuBar::ReleaseMouseCapture() { -#if __WXX11__ +#ifdef __WXX11__ // With wxX11, when a menu is closed by clicking away from it, a control // under the click will still get an event, even though the menu has the // capture (bug?). So that control may already have taken the capture by @@ -2607,4 +2607,3 @@ void wxWindow::DismissPopupMenu() } #endif // wxUSE_MENUS -