Ticket #7052: Deskbar_BarWindow_cpp_style_fix.diff

File Deskbar_BarWindow_cpp_style_fix.diff, 3.6 KB (added by jscipione, 13 years ago)
  • src/apps/deskbar/BarWindow.cpp

    diff --git a/src/apps/deskbar/BarWindow.cpp b/src/apps/deskbar/BarWindow.cpp
    index 26b02b7..7702e84 100644
    a b Except as contained in this notice, the name of Be Incorporated shall not be  
    2626used in advertising or otherwise to promote the sale, use or other dealings in
    2727this Software without prior written authorization from Be Incorporated.
    2828
    29 Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
    30 of Be Incorporated in the United States and other countries. Other brand product
    31 names are registered trademarks or trademarks of their respective holders.
     29Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
     30trademarks of Be Incorporated in the United States and other countries. Other
     31brand product names are registered trademarks or trademarks of their respective
     32holders.
    3233All rights reserved.
    3334*/
    3435
    All rights reserved.  
    5859#include <MessagePrivate.h>
    5960
    6061
    61 // This is a very ugly hack to be able to call the private BMenuBar::StartMenuBar()
    62 // method from the TBarWindow::ShowBeMenu() method.
     62// This is a very ugly hack to be able to call the private
     63// BMenuBar::StartMenuBar() method from the TBarWindow::ShowBeMenu() method.
    6364// Don't do this at home -- but why the hell is this method private?
    6465#if __MWERKS__
    6566    #define BMenuBar_StartMenuBar_Hack StartMenuBar__8BMenuBarFlbbP5BRect
    All rights reserved.  
    7071#else
    7172#   error "You may want to port this ugly hack to your compiler ABI"
    7273#endif
    73 extern "C" void BMenuBar_StartMenuBar_Hack(BMenuBar*,int32,bool,bool,BRect*);
     74extern "C" void
     75    BMenuBar_StartMenuBar_Hack(BMenuBar*, int32, bool, bool, BRect*);
    7476
    7577
    7678TBeMenu* TBarWindow::sBeMenu = NULL;
    TBarWindow::ShowBeMenu()  
    312314    if (menuBar == NULL)
    313315        return;
    314316
    315     BMenuBar_StartMenuBar_Hack(menuBar,0,true,true,NULL);
     317    BMenuBar_StartMenuBar_Hack(menuBar, 0, true, true, NULL);
    316318}
    317319
    318320
    TBarWindow::ShowTeamMenu()  
    326328    if (KeyMenuBar() == NULL)
    327329        return;
    328330
    329     BMenuBar_StartMenuBar_Hack(KeyMenuBar(),index,true,true,NULL);
     331    BMenuBar_StartMenuBar_Hack(KeyMenuBar(), index, true, true, NULL);
    330332}
    331333
    332334
    333 /** determines the actual location of the window */
     335// determines the actual location of the window
    334336
    335337deskbar_location
    336338TBarWindow::DeskbarLocation() const
    TBarWindow::AddItem(BMessage* message)  
    552554        if (err < B_OK)
    553555            delete archive;
    554556    } else if (message->FindRef("addon", &ref) == B_OK) {
    555         //
    556557        //  exposing the name of the view here is not so great
    557558        TReplicantTray* tray
    558559            = dynamic_cast<TReplicantTray*>(FindView("Status"));
    TBarWindow::RemoveItem(BMessage* message)  
    579580    int32 id;
    580581    const char* name;
    581582
    582     //  ids ought to be unique across all shelves, assuming, of course,
    583     //  that sometime in the future there may be more than one
     583    // ids ought to be unique across all shelves, assuming, of course,
     584    // that sometime in the future there may be more than one
    584585#if SHELF_AWARE
    585586    if (message->FindInt32("shelf", (int32*)&shelf) == B_OK) {
    586587        if (message->FindString("name", &name) == B_OK)
    TBarWindow::RemoveItem(BMessage* message)  
    589590#endif
    590591        if (message->FindInt32("id", &id) == B_OK) {
    591592            fBarView->RemoveItem(id);
    592         //  remove the following two lines if and when the
    593         //  shelf option returns
     593        // remove the following two lines if and when the
     594        // shelf option returns
    594595        } else if (message->FindString("name", &name) == B_OK)
    595596            fBarView->RemoveItem(name, B_DESKBAR_TRAY);
    596597
    TBarWindow::_IsFocusMessage(BMessage* message)  
    632633
    633634    return true;
    634635}
     636