Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine2005-01-26 16:26:18 +0000
committerVeronika Irvine2005-01-26 16:26:18 +0000
commitfd4ff9c44d98ded417d9b638388c950bd93e865c (patch)
treeb373687c970a9f9576ddbec308187827f69034a3
parent7752af94649ff3781401576ef108513585b255fb (diff)
downloadeclipse.platform.swt-fd4ff9c44d98ded417d9b638388c950bd93e865c.tar.gz
eclipse.platform.swt-fd4ff9c44d98ded417d9b638388c950bd93e865c.tar.xz
eclipse.platform.swt-fd4ff9c44d98ded417d9b638388c950bd93e865c.zip
83543 alpha
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
index 2544b2cfd8..673a944e99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
@@ -454,10 +454,15 @@ public void setImage (Image image) {
checkWidget ();
super.setImage (image);
if (image != null) {
- OS.gtk_image_set_from_pixmap (imageHandle, image.pixmap, image.mask);
+ ImageList imageList = parent.imageList;
+ if (imageList == null) imageList = parent.imageList = new ImageList ();
+ int imageIndex = imageList.indexOf (image);
+ if (imageIndex == -1) imageIndex = imageList.add (image);
+ int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
+ OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
OS.gtk_widget_show (imageHandle);
} else {
- OS.gtk_image_set_from_pixmap (imageHandle, 0, 0);
+ OS.gtk_image_set_from_pixbuf (imageHandle, 0);
OS.gtk_widget_hide (imageHandle);
}

Back to the top