|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2000, 2018 IBM Corporation and others. |
| 2 | + * Copyright (c) 2000, 2025 IBM Corporation and others. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials |
5 | 5 | * are made available under the terms of the Eclipse Public License 2.0 |
@@ -256,7 +256,7 @@ void createHandle (int index) { |
256 | 256 | labelHandle = GTK.gtk_label_new_with_mnemonic(null); |
257 | 257 | if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES); |
258 | 258 |
|
259 | | - imageHandle = GTK4.gtk_picture_new(); |
| 259 | + imageHandle = GTK.gtk_image_new(); |
260 | 260 | if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES); |
261 | 261 |
|
262 | 262 | GTK4.gtk_box_append(handle, labelHandle); |
@@ -650,15 +650,15 @@ public void setImage (Image image) { |
650 | 650 | long pixbuf = ImageList.createPixbuf(image); |
651 | 651 | long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf); |
652 | 652 | OS.g_object_unref(pixbuf); |
653 | | - GTK4.gtk_picture_set_paintable(imageHandle, texture); |
| 653 | + GTK4.gtk_image_set_from_paintable(imageHandle, texture); |
654 | 654 | } else { |
655 | 655 | GTK3.gtk_image_set_from_surface(imageHandle, image.surface); |
656 | 656 | } |
657 | 657 | gtk_widget_hide (labelHandle); |
658 | 658 | gtk_widget_show (imageHandle); |
659 | 659 | } else { |
660 | 660 | if (GTK.GTK4) { |
661 | | - GTK4.gtk_picture_set_paintable(imageHandle, 0); |
| 661 | + GTK4.gtk_image_set_from_paintable(imageHandle, 0); |
662 | 662 | } else { |
663 | 663 | GTK3.gtk_image_set_from_surface(imageHandle, 0); |
664 | 664 | } |
|
0 commit comments