From 18af47f5c48bfd21e0f51562a643eb28c8b23879 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 11 Apr 2008 08:53:25 +0000 Subject: [PATCH] Renamed some private methods to have the underline prefix, now that BWindow doesn't call them directly anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24911 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/Menu.h | 7 +++---- src/kits/interface/Menu.cpp | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/headers/os/interface/Menu.h b/headers/os/interface/Menu.h index 335a27c2ec..0408ef2cde 100644 --- a/headers/os/interface/Menu.h +++ b/headers/os/interface/Menu.h @@ -236,10 +236,9 @@ private: bool _CustomTrackingWantsToQuit(); - // private methods called by BWindow - int State(BMenuItem** _item = NULL) const; - void InvokeItem(BMenuItem* item, bool now = false); - void QuitTracking(bool onlyThis = true); + int _State(BMenuItem** _item = NULL) const; + void _InvokeItem(BMenuItem* item, bool now = false); + void _QuitTracking(bool onlyThis = true); static menu_info sMenuInfo; static bool sAltAsCommandKey; diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 75f16ea5cc..1e32b9691e 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -869,13 +869,13 @@ BMenu::KeyDown(const char *bytes, int32 numBytes) case B_ENTER: case B_SPACE: if (fSelected) { - InvokeItem(fSelected); - QuitTracking(false); + _InvokeItem(fSelected); + _QuitTracking(false); } break; case B_ESCAPE: - QuitTracking(); + _QuitTracking(); break; default: @@ -887,7 +887,7 @@ BMenu::KeyDown(const char *bytes, int32 numBytes) if (item->fTriggerIndex < 0 || item->fTrigger != trigger) continue; - InvokeItem(item); + _InvokeItem(item); } break; } @@ -2135,20 +2135,20 @@ BMenu::_DrawItems(BRect updateRect) int -BMenu::State(BMenuItem **item) const +BMenu::_State(BMenuItem **item) const { if (fState == MENU_STATE_TRACKING || fState == MENU_STATE_CLOSED) return fState; if (fSelected != NULL && fSelected->Submenu() != NULL) - return fSelected->Submenu()->State(item); + return fSelected->Submenu()->_State(item); return fState; } void -BMenu::InvokeItem(BMenuItem *item, bool now) +BMenu::_InvokeItem(BMenuItem *item, bool now) { if (!item->IsEnabled()) return; @@ -2564,7 +2564,7 @@ BMenu::_CustomTrackingWantsToQuit() void -BMenu::QuitTracking(bool onlyThis) +BMenu::_QuitTracking(bool onlyThis) { _SelectItem(NULL); if (BMenuBar *menuBar = dynamic_cast(this)) @@ -2692,7 +2692,7 @@ MenuPrivate::IsAltCommandKey() const int MenuPrivate::State(BMenuItem **item) const { - return fMenu->State(item); + return fMenu->_State(item); } @@ -2727,14 +2727,14 @@ MenuPrivate::SetSuperItem(BMenuItem *item) void MenuPrivate::InvokeItem(BMenuItem *item, bool now) { - fMenu->InvokeItem(item, now); + fMenu->_InvokeItem(item, now); } void MenuPrivate::QuitTracking(bool thisMenuOnly) { - fMenu->QuitTracking(thisMenuOnly); + fMenu->_QuitTracking(thisMenuOnly); } } ;