Changeset 6419


Ignore:
Timestamp:
Jul 1, 2016, 1:34:31 PM (8 years ago)
Author:
ldelgass
Message:

Make squeezer build with Tk 8.5 (as well as Tk 8.4)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/src/RpSqueezer.c

    r5673 r6419  
    199199        }
    200200    }
     201#if TK_MAJOR_VERSION > 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION > 4)
     202    if (Tk_PhotoSetSize(interp, destPhoto, destw, srch) != TCL_OK) {
     203        ckfree((char*)destBlock.pixelPtr);
     204        return TCL_ERROR;
     205    }
     206    if (Tk_PhotoPutBlock(interp, destPhoto, &destBlock, 0, 0,
     207                         destBlock.width, destBlock.height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) {
     208        ckfree((char*)destBlock.pixelPtr);
     209        return TCL_ERROR;
     210    }
     211#else
    201212    Tk_PhotoSetSize(destPhoto, destw, srch);
    202213    Tk_PhotoPutBlock(destPhoto, &destBlock, 0, 0,
    203214        destBlock.width, destBlock.height, TK_PHOTO_COMPOSITE_SET);
    204 
     215#endif
    205216    ckfree((char*)destBlock.pixelPtr);
    206217    return TCL_OK;
Note: See TracChangeset for help on using the changeset viewer.