Changeset 268


Ignore:
Timestamp:
Oct 30, 2009, 1:06:49 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

3rdparty: os2/xsystray: Fixed vertical centering and added support for the "Frame around statics" XCenter style option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/3rdparty/os2/xsystray/xsystray.c

    r265 r268  
    152152
    153153#define TID_CHECKALIVE          1
    154          // check alive timer
    155 #define TID_CHECKALIVE_TIMEOUT  1000 // ms
    156          // how often to check if windows associated with icons are still alive
     154         //
     155#define TID_CHECKALIVE_TIMEOUT  000 // ms
     156         // how often to
    157157
    158158/* ******************************************************************
     
    210210 */
    211211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
    212238/* ******************************************************************
    213239 *
     
    255281 ********************************************************************/
    256282
     283
     284
     285
     286
     287
     288
    257289VOID FreeIconData(PICONDATA pData)
    258290{
     
    271303        pData->pszToolTip = NULL;
    272304    }
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
    273317}
    274318
     
    334378}
    335379
    336 static
    337 BOOL DrawPointer(HPS hps, LONG lx, LONG ly, HPOINTER hptrPointer, BOOL bMini)
    338 {
    339     return WinDrawPointer(hps, lx, ly, hptrPointer, bMini ? DP_MINI : DP_NORMAL);
    340     // @todo:
    341     // 1) for icons w/o real alpha, draw them manually by correctly selecting
    342     //    the normal or mini HBITMAP (WinDrawPointer fails to do so);
    343     // 2) for icons with real alpha, do manual alpha blending
    344 }
    345 
    346380/*
    347381 *@@ WgtPaint:
     
    365399        RECTL   rcl;
    366400        BOOL    bLeftToRight;
    367         LONG    x, lTotalWidth;
     401        LONG    x, lTotalWidth;
    368402        size_t  i;
    369403
     
    383417
    384418        LOGF(("rclPaint %d,%d-%d,%d\n",
    385               rclPaint.xLeft, rclPaint.xRight, rclPaint.yBottom, rclPaint.yTop));
     419              rclPaint.xLeft, rclPaint., rclPaint.yTop));
    386420
    387421        // switch HPS to RGB mode
     
    394428        WinFillRect(hps, &rclPaint,
    395429                    WinQuerySysColor(HWND_DESKTOP, SYSCLR_DIALOGBACKGROUND, 0));
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
    396445
    397446        if (bLeftToRight)
     
    420469                break;
    421470
    422             DrawPointer(hps, x, pSysTrayData->lIconPad,
    423                         pSysTrayData->pIcons[i].hIcon, DP_MINI);
     471            DrawPointer(hps, x, y, pSysTrayData->pIcons[i].hIcon, DP_MINI);
    424472            if (bLeftToRight)
    425473                x += lTotalWidth;
     
    845893                             PSZ pszErrorMsg)       // if 0 is returned, 500 bytes of error msg
    846894{
    847     ULONG       ulrc = 0;
     895    ULONG       ulrc = 0;
    848896    CLASSINFO   ClassInfo;
    849897
     
    852900    do
    853901    {
     902
     903
     904
     905
     906
     907
     908
     909
     910
     911
     912
     913
     914
     915
     916
     917
     918
     919
     920
     921
     922
     923
     924
    854925        // register our PM window class
    855926        if (!WinRegisterClass(hab,
     
    861932            )
    862933        {
    863             LOG(("WinRegisterClass(%s) failed with %lX",
    864                  WNDCLASS_WIDGET_XSYSTRAY, WinGetLastError(hab)));
     934            snprintf(pszErrorMsg, 500,
     935                     "WinRegisterClass(%s) failed with %lX.",
     936                     WNDCLASS_WIDGET_XSYSTRAY, WinGetLastError(hab));
    865937            break;
    866938        }
     
    882954        {
    883955            // error registering class: report error then
    884             snprintf(pszErrorMsg, 500, "WinRegisterClass(%s) failed with %lX",
     956            snprintf(pszErrorMsg, 500,
     957                     "WinRegisterClass(%s) failed with %lX",
    885958                     WNDCLASS_WIDGET_XSYSTRAY_SERVER, WinGetLastError(hab));
    886959            break;
     
    896969    while (0);
    897970
    898     LOGF(("pszErrorMsg %s\n", pszErrorMsg));
     971    LOGF(("pszErrorMsg \n", pszErrorMsg));
    899972    LOGF(("ulrc %d\n", ulrc));
    900973
Note: See TracChangeset for help on using the changeset viewer.