Ticket #7052: Deskbar_BarMenuBar_cpp_style_fix.diff

File Deskbar_BarMenuBar_cpp_style_fix.diff, 2.8 KB (added by jscipione, 13 years ago)
  • src/apps/deskbar/BarMenuBar.cpp

    diff --git a/src/apps/deskbar/BarMenuBar.cpp b/src/apps/deskbar/BarMenuBar.cpp
    index b246eb3..333e06a 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
    TBarMenuBar::SmartResize(float width, float height)  
    7879        BRect frame = Frame();
    7980        width = frame.Width();
    8081        height = frame.Height();
    81     } else 
     82    } else
    8283        ResizeTo(width, height);
    8384
    8485    width -= 1;
    TBarMenuBar::SmartResize(float width, float height)  
    9697void
    9798TBarMenuBar::AddTeamMenu()
    9899{
    99     if (CountItems() > 1) 
     100    if (CountItems() > 1)
    100101        return;
    101102
    102103    BRect frame(Frame());
    TBarMenuBar::AddTeamMenu()  
    112113void
    113114TBarMenuBar::RemoveTeamMenu()
    114115{
    115     if (CountItems() < 2) 
     116    if (CountItems() < 2)
    116117        return;
    117118
    118119    if (fAppListMenuItem) {
    TBarMenuBar::RemoveTeamMenu()  
    121122        fAppListMenuItem = NULL;
    122123    }
    123124
    124     BRect frame = Frame(); 
     125    BRect frame = Frame();
    125126    SmartResize(frame.Width(), frame.Height());
    126127}
    127128
    init_tracking_hook(BMenuItem* item, bool (*hookFunction)(BMenu*, void*),  
    179180        return;
    180181
    181182    BMenu* windowMenu = item->Submenu();
    182     if (windowMenu)
    183         //  have a menu, set the tracking hook
    184         windowMenu->SetTrackingHook(hookFunction, state);                   
     183    if (windowMenu) {
     184        // have a menu, set the tracking hook
     185        windowMenu->SetTrackingHook(hookFunction, state);
     186    }
    185187}
    186188
    187189
    TBarMenuBar::InitTrackingHook(bool (*hookFunction)(BMenu*, void*),  
    192194    BPoint loc;
    193195    uint32 buttons;
    194196    GetMouse(&loc, &buttons);
    195     //  set the hook functions for the two menus
    196     //  will always have the be menu
    197     //  may have the app menu as well (mini mode)
    198     if (fBeMenuItem->Frame().Contains(loc) || both) 
     197    // set the hook functions for the two menus
     198    // will always have the be menu
     199    // may have the app menu as well (mini mode)
     200    if (fBeMenuItem->Frame().Contains(loc) || both)
    199201        init_tracking_hook(fBeMenuItem, hookFunction, state);
    200202
    201     if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both)) 
     203    if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both))
    202204        init_tracking_hook(fAppListMenuItem, hookFunction, state);
    203205}
    204206