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
This commit is contained in:
@@ -236,10 +236,9 @@ private:
|
|||||||
|
|
||||||
bool _CustomTrackingWantsToQuit();
|
bool _CustomTrackingWantsToQuit();
|
||||||
|
|
||||||
// private methods called by BWindow
|
int _State(BMenuItem** _item = NULL) const;
|
||||||
int State(BMenuItem** _item = NULL) const;
|
void _InvokeItem(BMenuItem* item, bool now = false);
|
||||||
void InvokeItem(BMenuItem* item, bool now = false);
|
void _QuitTracking(bool onlyThis = true);
|
||||||
void QuitTracking(bool onlyThis = true);
|
|
||||||
|
|
||||||
static menu_info sMenuInfo;
|
static menu_info sMenuInfo;
|
||||||
static bool sAltAsCommandKey;
|
static bool sAltAsCommandKey;
|
||||||
|
|||||||
+11
-11
@@ -869,13 +869,13 @@ BMenu::KeyDown(const char *bytes, int32 numBytes)
|
|||||||
case B_ENTER:
|
case B_ENTER:
|
||||||
case B_SPACE:
|
case B_SPACE:
|
||||||
if (fSelected) {
|
if (fSelected) {
|
||||||
InvokeItem(fSelected);
|
_InvokeItem(fSelected);
|
||||||
QuitTracking(false);
|
_QuitTracking(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_ESCAPE:
|
case B_ESCAPE:
|
||||||
QuitTracking();
|
_QuitTracking();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -887,7 +887,7 @@ BMenu::KeyDown(const char *bytes, int32 numBytes)
|
|||||||
if (item->fTriggerIndex < 0 || item->fTrigger != trigger)
|
if (item->fTriggerIndex < 0 || item->fTrigger != trigger)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
InvokeItem(item);
|
_InvokeItem(item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2135,20 +2135,20 @@ BMenu::_DrawItems(BRect updateRect)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
BMenu::State(BMenuItem **item) const
|
BMenu::_State(BMenuItem **item) const
|
||||||
{
|
{
|
||||||
if (fState == MENU_STATE_TRACKING || fState == MENU_STATE_CLOSED)
|
if (fState == MENU_STATE_TRACKING || fState == MENU_STATE_CLOSED)
|
||||||
return fState;
|
return fState;
|
||||||
|
|
||||||
if (fSelected != NULL && fSelected->Submenu() != NULL)
|
if (fSelected != NULL && fSelected->Submenu() != NULL)
|
||||||
return fSelected->Submenu()->State(item);
|
return fSelected->Submenu()->_State(item);
|
||||||
|
|
||||||
return fState;
|
return fState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMenu::InvokeItem(BMenuItem *item, bool now)
|
BMenu::_InvokeItem(BMenuItem *item, bool now)
|
||||||
{
|
{
|
||||||
if (!item->IsEnabled())
|
if (!item->IsEnabled())
|
||||||
return;
|
return;
|
||||||
@@ -2564,7 +2564,7 @@ BMenu::_CustomTrackingWantsToQuit()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMenu::QuitTracking(bool onlyThis)
|
BMenu::_QuitTracking(bool onlyThis)
|
||||||
{
|
{
|
||||||
_SelectItem(NULL);
|
_SelectItem(NULL);
|
||||||
if (BMenuBar *menuBar = dynamic_cast<BMenuBar *>(this))
|
if (BMenuBar *menuBar = dynamic_cast<BMenuBar *>(this))
|
||||||
@@ -2692,7 +2692,7 @@ MenuPrivate::IsAltCommandKey() const
|
|||||||
int
|
int
|
||||||
MenuPrivate::State(BMenuItem **item) const
|
MenuPrivate::State(BMenuItem **item) const
|
||||||
{
|
{
|
||||||
return fMenu->State(item);
|
return fMenu->_State(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2727,14 +2727,14 @@ MenuPrivate::SetSuperItem(BMenuItem *item)
|
|||||||
void
|
void
|
||||||
MenuPrivate::InvokeItem(BMenuItem *item, bool now)
|
MenuPrivate::InvokeItem(BMenuItem *item, bool now)
|
||||||
{
|
{
|
||||||
fMenu->InvokeItem(item, now);
|
fMenu->_InvokeItem(item, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MenuPrivate::QuitTracking(bool thisMenuOnly)
|
MenuPrivate::QuitTracking(bool thisMenuOnly)
|
||||||
{
|
{
|
||||||
fMenu->QuitTracking(thisMenuOnly);
|
fMenu->_QuitTracking(thisMenuOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user