208427 GTK-BIDI: RTL support in MenuItems
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index e5d2675..6713fe7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -832,7 +832,8 @@
String accelString = "";
int index = string.indexOf ('\t');
if (index != -1) {
- accelString = string.substring (index, string.length());
+ boolean isRTL = (parent.style & SWT.RIGHT_TO_LEFT) != 0;
+ accelString = (isRTL? "" : " ") + string.substring (index+1, string.length()) + (isRTL? " " : "");
string = string.substring (0, index);
}
char [] chars = fixMnemonic (string);