Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2010-11-12 22:48:50 +0000
committerSilenio Quarti2010-11-12 22:48:50 +0000
commite347e9beeb0973472f7f8e0318ac84f72cdcf722 (patch)
tree3c2a75aca202e2670855be110d8df7297d611731
parenta1dee47244e7608d471ac0dde00cd267fd490b76 (diff)
downloadeclipse.platform.swt-e347e9beeb0973472f7f8e0318ac84f72cdcf722.tar.gz
eclipse.platform.swt-e347e9beeb0973472f7f8e0318ac84f72cdcf722.tar.xz
eclipse.platform.swt-e347e9beeb0973472f7f8e0318ac84f72cdcf722.zip
Bug 304724 - [Widgets] clear icon not enabled when setText is called on a Text with the SWT.ICON_CANCEL style
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 273963ff77..d2bbdbc5b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -2123,7 +2123,11 @@ void setText (char [] text) {
OS.gtk_text_view_scroll_mark_onscreen (handle, mark);
}
sendEvent (SWT.Modify);
- if ((style & SWT.ICON_CANCEL) != 0) OS.gtk_entry_set_icon_sensitive (handle, OS.GTK_ENTRY_ICON_SECONDARY, true);
+ if ((style & SWT.SEARCH) != 0) {
+ if ((style & SWT.ICON_CANCEL) != 0) {
+ OS.gtk_entry_set_icon_sensitive (handle, OS.GTK_ENTRY_ICON_SECONDARY, true);
+ }
+ }
}
/**

Back to the top