Missed these as part of r40817. Style cleanup by John Scipione from bug 7052.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Fredrik Holmqvist
2011-03-05 16:33:57 +00:00
parent c562239723
commit 1075cc34a0
3 changed files with 25 additions and 23 deletions
+16 -14
View File
@@ -26,9 +26,10 @@ Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
of Be Incorporated in the United States and other countries. Other brand product trademarks of Be Incorporated in the United States and other countries. Other
names are registered trademarks or trademarks of their respective holders. brand product names are registered trademarks or trademarks of their respective
holders.
All rights reserved. All rights reserved.
*/ */
@@ -63,8 +64,8 @@ All rights reserved.
#define B_TRANSLATE_CONTEXT "MainWindow" #define B_TRANSLATE_CONTEXT "MainWindow"
// This is a very ugly hack to be able to call the private BMenuBar::StartMenuBar() // This is a very ugly hack to be able to call the private
// method from the TBarWindow::ShowBeMenu() method. // BMenuBar::StartMenuBar() method from the TBarWindow::ShowBeMenu() method.
// Don't do this at home -- but why the hell is this method private? // Don't do this at home -- but why the hell is this method private?
#if __MWERKS__ #if __MWERKS__
#define BMenuBar_StartMenuBar_Hack StartMenuBar__8BMenuBarFlbbP5BRect #define BMenuBar_StartMenuBar_Hack StartMenuBar__8BMenuBarFlbbP5BRect
@@ -75,7 +76,8 @@ All rights reserved.
#else #else
# error "You may want to port this ugly hack to your compiler ABI" # error "You may want to port this ugly hack to your compiler ABI"
#endif #endif
extern "C" void BMenuBar_StartMenuBar_Hack(BMenuBar*,int32,bool,bool,BRect*); extern "C" void
BMenuBar_StartMenuBar_Hack(BMenuBar*, int32, bool, bool, BRect*);
TBeMenu* TBarWindow::sBeMenu = NULL; TBeMenu* TBarWindow::sBeMenu = NULL;
@@ -317,7 +319,7 @@ TBarWindow::ShowBeMenu()
if (menuBar == NULL) if (menuBar == NULL)
return; return;
BMenuBar_StartMenuBar_Hack(menuBar,0,true,true,NULL); BMenuBar_StartMenuBar_Hack(menuBar, 0, true, true, NULL);
} }
@@ -331,11 +333,11 @@ TBarWindow::ShowTeamMenu()
if (KeyMenuBar() == NULL) if (KeyMenuBar() == NULL)
return; return;
BMenuBar_StartMenuBar_Hack(KeyMenuBar(),index,true,true,NULL); BMenuBar_StartMenuBar_Hack(KeyMenuBar(), index, true, true, NULL);
} }
/** determines the actual location of the window */ // determines the actual location of the window
deskbar_location deskbar_location
TBarWindow::DeskbarLocation() const TBarWindow::DeskbarLocation() const
@@ -557,7 +559,6 @@ TBarWindow::AddItem(BMessage* message)
if (err < B_OK) if (err < B_OK)
delete archive; delete archive;
} else if (message->FindRef("addon", &ref) == B_OK) { } else if (message->FindRef("addon", &ref) == B_OK) {
//
// exposing the name of the view here is not so great // exposing the name of the view here is not so great
TReplicantTray* tray TReplicantTray* tray
= dynamic_cast<TReplicantTray*>(FindView("Status")); = dynamic_cast<TReplicantTray*>(FindView("Status"));
@@ -584,8 +585,8 @@ TBarWindow::RemoveItem(BMessage* message)
int32 id; int32 id;
const char* name; const char* name;
// ids ought to be unique across all shelves, assuming, of course, // ids ought to be unique across all shelves, assuming, of course,
// that sometime in the future there may be more than one // that sometime in the future there may be more than one
#if SHELF_AWARE #if SHELF_AWARE
if (message->FindInt32("shelf", (int32*)&shelf) == B_OK) { if (message->FindInt32("shelf", (int32*)&shelf) == B_OK) {
if (message->FindString("name", &name) == B_OK) if (message->FindString("name", &name) == B_OK)
@@ -594,8 +595,8 @@ TBarWindow::RemoveItem(BMessage* message)
#endif #endif
if (message->FindInt32("id", &id) == B_OK) { if (message->FindInt32("id", &id) == B_OK) {
fBarView->RemoveItem(id); fBarView->RemoveItem(id);
// remove the following two lines if and when the // remove the following two lines if and when the
// shelf option returns // shelf option returns
} else if (message->FindString("name", &name) == B_OK) } else if (message->FindString("name", &name) == B_OK)
fBarView->RemoveItem(name, B_DESKBAR_TRAY); fBarView->RemoveItem(name, B_DESKBAR_TRAY);
@@ -637,3 +638,4 @@ TBarWindow::_IsFocusMessage(BMessage* message)
return true; return true;
} }
+4 -3
View File
@@ -26,9 +26,10 @@ Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
of Be Incorporated in the United States and other countries. Other brand product trademarks of Be Incorporated in the United States and other countries. Other
names are registered trademarks or trademarks of their respective holders. brand product names are registered trademarks or trademarks of their respective
holders.
All rights reserved. All rights reserved.
*/ */
#ifndef BAR_WINDOW_H #ifndef BAR_WINDOW_H
+5 -6
View File
@@ -26,9 +26,10 @@ Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated. this Software without prior written authorization from Be Incorporated.
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
of Be Incorporated in the United States and other countries. Other brand product trademarks of Be Incorporated in the United States and other countries. Other
names are registered trademarks or trademarks of their respective holders. brand product names are registered trademarks or trademarks of their respective
holders.
All rights reserved. All rights reserved.
*/ */
@@ -476,9 +477,7 @@ TRecentsMenu::~TRecentsMenu()
void void
TRecentsMenu::DetachedFromWindow() TRecentsMenu::DetachedFromWindow()
{ {
// // BNavMenu::DetachedFromWindow sets the TypesList to NULL
// BNavMenu::DetachedFromWindow sets the TypesList to NULL
//
BMenu::DetachedFromWindow(); BMenu::DetachedFromWindow();
} }