提交 8bc0c3da 编写于 作者: S stooke

8214765: All TrayIcon MessageType icons does not show up with gtk3 option set

Reviewed-by: serb, psadhukhan, clanger
上级 8b0109ca
......@@ -414,12 +414,24 @@ public abstract class InfoWindow extends Window {
private void loadGtkImages() {
if (!gtkImagesLoaded) {
errorImage = (Image)Toolkit.getDefaultToolkit().getDesktopProperty(
"gtk.icon.gtk-dialog-error.6.rtl");
warnImage = (Image)Toolkit.getDefaultToolkit().getDesktopProperty(
"gtk.icon.gtk-dialog-warning.6.rtl");
infoImage = (Image)Toolkit.getDefaultToolkit().getDesktopProperty(
"gtk.icon.gtk-dialog-info.6.rtl");
//check whether the gtk version is >= 3.10 as the Icon names were
//changed from this release
UNIXToolkit tk = (UNIXToolkit) Toolkit.getDefaultToolkit();
if (tk.checkGtkVersion(3, 10, 0)) {
errorImage = (Image) tk.getDesktopProperty(
"gtk.icon.dialog-error.6.rtl");
warnImage = (Image) tk.getDesktopProperty(
"gtk.icon.dialog-warning.6.rtl");
infoImage = (Image) tk.getDesktopProperty(
"gtk.icon.dialog-information.6.rtl");
} else {
errorImage = (Image) tk.getDesktopProperty(
"gtk.icon.gtk-dialog-error.6.rtl");
warnImage = (Image) tk.getDesktopProperty(
"gtk.icon.gtk-dialog-warning.6.rtl");
infoImage = (Image) tk.getDesktopProperty(
"gtk.icon.gtk-dialog-info.6.rtl");
}
gtkImagesLoaded = true;
}
}
......@@ -492,4 +504,3 @@ public abstract class InfoWindow extends Window {
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册