Lines 3526-3538
Link Here
|
3526 |
|
3526 |
|
3527 |
int imageIndex (Image image, int index) { |
3527 |
int imageIndex (Image image, int index) { |
3528 |
if (image == null) return OS.I_IMAGENONE; |
3528 |
if (image == null) return OS.I_IMAGENONE; |
|
|
3529 |
boolean updateImageList; |
3529 |
if (imageList == null) { |
3530 |
if (imageList == null) { |
3530 |
Rectangle bounds = image.getBounds (); |
3531 |
Rectangle bounds = image.getBounds (); |
3531 |
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); |
3532 |
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); |
|
|
3533 |
updateImageList = true; |
3534 |
} else { |
3535 |
updateImageList = false; |
3532 |
} |
3536 |
} |
3533 |
int imageIndex = imageList.indexOf (image); |
3537 |
int imageIndex = imageList.indexOf (image); |
3534 |
if (imageIndex == -1) imageIndex = imageList.add (image); |
3538 |
if (imageIndex == -1) { |
3535 |
if (hwndHeader == 0 || OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) == index) { |
3539 |
imageIndex = imageList.add (image); |
|
|
3540 |
} |
3541 |
if (updateImageList && (hwndHeader == 0 || OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) == index)) { |
3536 |
int /*long*/ hImageList = imageList.getHandle (); |
3542 |
int /*long*/ hImageList = imageList.getHandle (); |
3537 |
int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0); |
3543 |
int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0); |
3538 |
if (hOldImageList != hImageList) { |
3544 |
if (hOldImageList != hImageList) { |