From ed7fdb860627d516ad32f9f01d14146012220b4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 7 Jun 2005 19:16:15 +0000 Subject: [PATCH] First part of '[ 1216148 ] cleanup: unused variables and declarations'. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/bmpbuttn.cpp | 2 -- src/msw/mdi.cpp | 5 ----- src/msw/menu.cpp | 12 +++++------- src/msw/mimetype.cpp | 1 - src/msw/tbar95.cpp | 9 +++------ 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 05d6d3807a..4d982db963 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -103,8 +103,6 @@ bitmap "focus" , bitmap "disabled" , */ -#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1) - bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index d3ed9137f9..e55c7f6b18 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -76,7 +76,6 @@ static HWND invalidHandle = 0; // constants // --------------------------------------------------------------------------- -static const int IDM_WINDOWTILE = 4001; static const int IDM_WINDOWTILEHOR = 4001; static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; @@ -88,10 +87,6 @@ static const int IDM_WINDOWPREV = 4006; static const int wxFIRST_MDI_CHILD = 4100; static const int wxLAST_MDI_CHILD = 4600; -// Status border dimensions -static const int wxTHICK_LINE_BORDER = 3; -static const int wxTHICK_LINE_WIDTH = 1; - // --------------------------------------------------------------------------- // private functions // --------------------------------------------------------------------------- diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 6e7201f524..05b9370dbf 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -66,8 +66,6 @@ // global variables // ---------------------------------------------------------------------------- -extern wxMenu *wxCurrentPopupMenu; - // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -229,7 +227,7 @@ void wxMenu::Init() } // if we have a title, insert it in the beginning of the menu - if ( !m_title.IsEmpty() ) + if ( !m_title.empty() ) { Append(idMenuTitle, m_title); AppendSeparator(); @@ -633,14 +631,14 @@ size_t wxMenu::CopyAccels(wxAcceleratorEntry *accels) const void wxMenu::SetTitle(const wxString& label) { - bool hasNoTitle = m_title.IsEmpty(); + bool hasNoTitle = m_title.empty(); m_title = label; HMENU hMenu = GetHmenu(); if ( hasNoTitle ) { - if ( !label.IsEmpty() ) + if ( !label.empty() ) { if ( !::InsertMenu(hMenu, 0u, MF_BYPOSITION | MF_STRING, (unsigned)idMenuTitle, m_title) || @@ -652,7 +650,7 @@ void wxMenu::SetTitle(const wxString& label) } else { - if ( label.IsEmpty() ) + if ( label.empty() ) { // remove the title and the separator after it if ( !RemoveMenu(hMenu, 0, MF_BYPOSITION) || @@ -689,7 +687,7 @@ void wxMenu::SetTitle(const wxString& label) #ifdef __WIN32__ // put the title string in bold face - if ( !m_title.IsEmpty() ) + if ( !m_title.empty() ) { SetDefaultMenuItem(GetHmenu(), (UINT)idMenuTitle); } diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index 71334a8134..7ff39b6427 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -787,7 +787,6 @@ bool wxFileTypeImpl::RemoveCommand(const wxString& verb) wxCHECK_MSG( !m_ext.empty() && !verb.empty(), false, _T("RemoveCommand() needs an extension and a verb") ); - wxString sKey = m_strFileType; wxRegKey rkey(wxRegKey::HKCR, GetVerbPath(verb)); // if the key already doesn't exist, it's a success diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 5744077dfa..539b71780e 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -93,9 +93,6 @@ // these values correspond to those used by comctl32.dll #define DEFAULTBITMAPX 16 #define DEFAULTBITMAPY 15 -#define DEFAULTBUTTONX 24 -#define DEFAULTBUTTONY 24 -#define DEFAULTBARHEIGHT 27 // ---------------------------------------------------------------------------- // wxWin macros @@ -256,7 +253,7 @@ bool wxToolBar::Create(wxWindow *parent, #if 1 wxUxThemeEngine *p = wxUxThemeEngine::Get(); if ( !p || !p->IsThemeActive() ) -#endif +#endif { DWORD dwToolbarStyle; @@ -897,7 +894,7 @@ bool wxToolBar::Realize() wxToolBarToolBase *tool = nodePrev->GetData(); if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO ) break; - + if ( tool->Toggle(false) ) { DoToggleTool(tool, false); @@ -905,7 +902,7 @@ bool wxToolBar::Realize() prevButton.fsState = TBSTATE_ENABLED; nodePrev = nodePrev->GetPrevious(); prevIndex--; - } + } } isRadio = true; -- 2.45.2