summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2008-04-22 20:17:57 +0000
committerFelipe Heidrich <fheidric>2008-04-22 20:17:57 +0000
commitccfb481a6e5aa3d494a91fc1a1e0ae8ad3c8aac4 (patch)
tree653c74c965c9f923256d0fecb014d8ee0d5c92cc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
parentb2efc2a73138acda642a0eba6be79c6f19695a7b (diff)
downloadeclipse.platform.swt-ccfb481a6e5aa3d494a91fc1a1e0ae8ad3c8aac4.tar.gz
eclipse.platform.swt-ccfb481a6e5aa3d494a91fc1a1e0ae8ad3c8aac4.tar.xz
eclipse.platform.swt-ccfb481a6e5aa3d494a91fc1a1e0ae8ad3c8aac4.zip
Bug 222594: BIDI3.4:HCG Context menu is not mirrored
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index c908a4b00c..791caa81c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -670,6 +670,7 @@ void hookEvents () {
OS.g_signal_connect_closure (entryHandle, OS.insert_text, display.closures [INSERT_TEXT], false);
OS.g_signal_connect_closure (entryHandle, OS.delete_text, display.closures [DELETE_TEXT], false);
OS.g_signal_connect_closure (entryHandle, OS.activate, display.closures [ACTIVATE], false);
+ OS.g_signal_connect_closure (entryHandle, OS.populate_popup, display.closures [POPULATE_POPUP], false);
}
int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK |
OS.GDK_BUTTON_RELEASE_MASK;
@@ -1381,6 +1382,14 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
return result;
}
+int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) {
+ if ((style & SWT.RIGHT_TO_LEFT) != 0) {
+ OS.gtk_widget_set_direction (menu, OS.GTK_TEXT_DIR_RTL);
+ OS.gtk_container_forall (menu, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL);
+ }
+ return 0;
+}
+
/**
* Searches the receiver's list starting at the first item
* (index 0) until an item is found that is equal to the