Ticket #7052: Deskbar_TimeView_cpp_style_fix.diff

File Deskbar_TimeView_cpp_style_fix.diff, 2.5 KB (added by jscipione, 13 years ago)
  • src/apps/deskbar/TimeView.cpp

    diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp
    index 5a2c43e..96a7936 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
    TTimeView::GetPreferredSize(float* width, float* height)  
    154155
    155156    GetCurrentTime();
    156157
    157     // TODO: SetOrientation never gets called, fix that
    158     // When in vertical mode, we want to limit the width so that it can't
    159     // overlap the bevels in the parent view.
     158    // TODO: SetOrientation never gets called, fix that when in vertical mode,
     159    // we want to limit the width so that it can't overlap the bevels in the
     160    // parent view.
    160161    *width = fOrientation ?
    161162        min_c(fMaxWidth - kHMargin, kHMargin + StringWidth(fTimeStr))
    162163        : kHMargin + StringWidth(fTimeStr);
    TTimeView::MessageReceived(BMessage* message)  
    217218
    218219        default:
    219220            BView::MessageReceived(message);
     221            break;
    220222    }
    221223}
    222224
    TTimeView::GetCurrentDate()  
    262264
    263265    fLocale.FormatDate(tmp, 64, fTime, B_FULL_DATE_FORMAT);
    264266
    265     //  remove leading 0 from date when month is less than 10 (MM/DD/YY)
    266     //  or remove leading 0 from date when day is less than 10 (DD/MM/YY)
     267    // remove leading 0 from date when month is less than 10 (MM/DD/YY)
     268    // or remove leading 0 from date when day is less than 10 (DD/MM/YY)
    267269    const char* str = tmp;
    268270    if (str[0] == '0')
    269271        str++;
    TTimeView::Pulse()  
    325327        // For dates, Update() could be called two times in a row,
    326328        // but that should only happen very rarely
    327329        if ((fLastTimeStr[1] != fTimeStr[1]
    328                 && (fLastTimeStr[1] == ':' || fTimeStr[1] == ':'))
     330            && (fLastTimeStr[1] == ':' || fTimeStr[1] == ':'))
    329331            || !fLastTimeStr[0])
    330332            Update();
    331333
    TTimeView::Update()  
    360362    GetCurrentTime();
    361363    GetCurrentDate();
    362364
    363 
    364365    SetToolTip(fDateStr);
    365366
    366367    ResizeToPreferred();