From 87e58488da30e8b2e25a699114ff6b6d32d823a7 Mon Sep 17 00:00:00 2001 From: Silenio Quarti Date: Wed, 7 Nov 2012 09:46:23 -0500 Subject: setBackground() junit test failing --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index 5ad04507ee..22f5034ab4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -1065,16 +1065,19 @@ void sendSelectionEvent () { public void setBackground(Color color) { super.setBackground(color); + if (!OS.GTK3) { + if (((style & SWT.CALENDAR) != 0) && color == null) { + OS.gtk_widget_modify_base(handle, 0, null); + } + } bg = color; if (text != null) text.setBackground(color); if (popupCalendar != null) popupCalendar.setBackground(color); } void setBackgroundColor (GdkColor color) { - if ((style & SWT.CALENDAR) != 0) { - if (!OS.GTK3) { - OS.gtk_widget_modify_base(handle, 0, color); - } + if ((style & SWT.CALENDAR) != 0 && !OS.GTK3) { + OS.gtk_widget_modify_base(handle, 0, color); } else { super.setBackgroundColor (color); } -- cgit