summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2002-05-08 21:06:28 +0000
committerSteve Northover <steve>2002-05-08 21:06:28 +0000
commit5b12c761a8b54c6928b6b6488de09603f3a7115f (patch)
tree80d0a3175c9ab0345a66c32dce18c34d2aefc91c /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
parent4fe48d7de7dc852472151a038698832672cc1c21 (diff)
downloadeclipse.platform.swt-5b12c761a8b54c6928b6b6488de09603f3a7115f.tar.gz
eclipse.platform.swt-5b12c761a8b54c6928b6b6488de09603f3a7115f.tar.xz
eclipse.platform.swt-5b12c761a8b54c6928b6b6488de09603f3a7115f.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
index 38d0620f71..fe728f0213 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
@@ -230,15 +230,10 @@ public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
super.setText (string);
- int length = string.length ();
- char [] text = new char [length + 1];
- string.getChars (0, length, text, 0);
- for (int i=0; i<length; i++) {
- if (text [i] == '&') text [i] = '_';
- }
- byte [] buffer = Converter.wcsToMbcs (null, text);
+ char [] chars = fixMnemonic (string);
+ byte [] buffer = Converter.wcsToMbcs (null, chars);
OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer);
- if (length != 0) {
+ if (string.length () != 0) {
OS.gtk_widget_show (labelHandle);
} else {
OS.gtk_widget_hide (labelHandle);