diff options
author | Silenio Quarti | 2010-11-12 22:48:50 +0000 |
---|---|---|
committer | Silenio Quarti | 2010-11-12 22:48:50 +0000 |
commit | e347e9beeb0973472f7f8e0318ac84f72cdcf722 (patch) | |
tree | 3c2a75aca202e2670855be110d8df7297d611731 | |
parent | a1dee47244e7608d471ac0dde00cd267fd490b76 (diff) | |
download | eclipse.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.java | 6 |
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); + } + } } /** |