220852 Combo control does not fire modify events on gtk+
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 853d1b1..453e1a5 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
@@ -1736,12 +1736,19 @@
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.gtk_combo_box_set_active (handle, index);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+ if ((style & SWT.READ_ONLY) != 0) {
+ /*
+ * Feature in GTK. Read Only combo boxes do not get a chance to send out a
+ * Modify event in the gtk_changed callback. The fix is to send a Modify event
+ * here.
+ */
+ sendEvent (SWT.Modify);
+ }
} else {
ignoreSelect = true;
OS.gtk_list_select_item (listHandle, index);
ignoreSelect = false;
}
- sendEvent (SWT.Modify);
}
void setBackgroundColor (GdkColor color) {
@@ -2036,6 +2043,11 @@
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.gtk_combo_box_set_active (handle, index);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+ /*
+ * Feature in GTK. Read Only combo boxes do not get a chance to send out a
+ * Modify event in the gtk_changed callback. The fix is to send a Modify event
+ * here.
+ */
sendEvent (SWT.Modify);
return;
}