From 055eeb4c70257d284d2f3bb1f12303e36c65209a Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Sep 16 2014 10:39:53 +0000 Subject: Fix for autocomplete selection color. - Rebuild for latest jetty. --- diff --git a/eclipse-bug-444143.patch b/eclipse-bug-444143.patch new file mode 100644 index 0000000..d9e7d93 --- /dev/null +++ b/eclipse-bug-444143.patch @@ -0,0 +1,96 @@ +From 716d35d30c1f639a04515188fedd89bb3aaf12bc Mon Sep 17 00:00:00 2001 +From: Sami Wagiaalla +Date: Mon, 15 Sep 2014 11:51:44 -0400 +Subject: Bug 444143 - [GTK3] Reset selected background color in Table + +When setBackgroundColor is called for Table it results in +a call to gtk_widget_override_background_color with the flag +GTK_STATE_FLAG_NORMAL which overrides the color for selected +items' background despite the flag. Therefore the selected item +color must be reset to the default. + +Change-Id: Iab3cad4e01cf87cca04e536fdea8991c818d0336 +Signed-off-by: Sami Wagiaalla + +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +index 96493c6..2558fd1 100644 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +@@ -11,12 +11,28 @@ + package org.eclipse.swt.widgets; + + +-import org.eclipse.swt.*; +-import org.eclipse.swt.internal.*; +-import org.eclipse.swt.internal.cairo.*; +-import org.eclipse.swt.internal.gtk.*; +-import org.eclipse.swt.graphics.*; +-import org.eclipse.swt.events.*; ++import org.eclipse.swt.SWT; ++import org.eclipse.swt.SWTException; ++import org.eclipse.swt.events.SelectionEvent; ++import org.eclipse.swt.events.SelectionListener; ++import org.eclipse.swt.graphics.Color; ++import org.eclipse.swt.graphics.Font; ++import org.eclipse.swt.graphics.GC; ++import org.eclipse.swt.graphics.Image; ++import org.eclipse.swt.graphics.Point; ++import org.eclipse.swt.graphics.Rectangle; ++import org.eclipse.swt.internal.Converter; ++import org.eclipse.swt.internal.ImageList; ++import org.eclipse.swt.internal.cairo.Cairo; ++import org.eclipse.swt.internal.gtk.GdkColor; ++import org.eclipse.swt.internal.gtk.GdkEventButton; ++import org.eclipse.swt.internal.gtk.GdkEventExpose; ++import org.eclipse.swt.internal.gtk.GdkRGBA; ++import org.eclipse.swt.internal.gtk.GdkRectangle; ++import org.eclipse.swt.internal.gtk.GtkAllocation; ++import org.eclipse.swt.internal.gtk.GtkCellRendererClass; ++import org.eclipse.swt.internal.gtk.GtkRequisition; ++import org.eclipse.swt.internal.gtk.OS; + + /** + * Instances of this class implement a selectable user interface +@@ -3006,6 +3022,17 @@ void setBackgroundColor (GdkColor color) { + super.setBackgroundColor (color); + if (!OS.GTK3) { + OS.gtk_widget_modify_base (handle, 0, color); ++ } else { ++ // Setting the background color overrides the selected background color ++ // so we have to reset it the default. ++ GdkColor defaultColor = getDisplay().COLOR_LIST_SELECTION; ++ GdkRGBA selectedBackground = new GdkRGBA (); ++ selectedBackground.alpha = 1; ++ selectedBackground.red = (defaultColor.red & 0xFFFF) / (float)0xFFFF; ++ selectedBackground.green = (defaultColor.green & 0xFFFF) / (float)0xFFFF; ++ selectedBackground.blue = (defaultColor.blue & 0xFFFF) / (float)0xFFFF; ++ ++ OS.gtk_widget_override_background_color (handle, OS.GTK_STATE_FLAG_SELECTED, selectedBackground); + } + } + +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +index 2a40869..4603cff 100644 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +@@ -3038,6 +3038,17 @@ void setBackgroundColor (GdkColor color) { + super.setBackgroundColor (color); + if (!OS.GTK3) { + OS.gtk_widget_modify_base (handle, 0, color); ++ } else { ++ // Setting the background color overrides the selected background color ++ // so we have to reset it the default. ++ GdkColor defaultColor = getDisplay().COLOR_LIST_SELECTION; ++ GdkRGBA selectedBackground = new GdkRGBA (); ++ selectedBackground.alpha = 1; ++ selectedBackground.red = (defaultColor.red & 0xFFFF) / (float)0xFFFF; ++ selectedBackground.green = (defaultColor.green & 0xFFFF) / (float)0xFFFF; ++ selectedBackground.blue = (defaultColor.blue & 0xFFFF) / (float)0xFFFF; ++ ++ OS.gtk_widget_override_background_color (handle, OS.GTK_STATE_FLAG_SELECTED, selectedBackground); + } + } + +-- +cgit v0.10.1-9-gd18e + diff --git a/eclipse.spec b/eclipse.spec index f20f34d..81627da 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -15,7 +15,7 @@ Epoch: 1 %global eb_commit db6b9cd54787feb7cf7c7a28c80e740340213bd3 %global eclipse_tag R4_4 %global eclipse_version %{eclipse_major}.%{eclipse_minor}.%{eclipse_micro} -%global _jetty_version 9.2.1 +%global _jetty_version 9.2.3 %ifarch %{ix86} %define eclipse_arch x86 @@ -38,7 +38,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: %{?scl_prefix}eclipse Version: %{eclipse_version} -Release: 18%{?dist} +Release: 19%{?dist} License: EPL Group: Development/Tools URL: http://www.eclipse.org/ @@ -114,6 +114,7 @@ Patch22: %{pkg_name}-policy-comparators.patch # https://bugs.eclipse.org/bugs/show_bug.cgi?id=438992 Patch23: %{pkg_name}-bug-438992.patch Patch24: %{pkg_name}-webkit2-support.patch +Patch25: %{pkg_name}-bug-444143.patch BuildRequires: rsync BuildRequires: make, gcc @@ -327,6 +328,7 @@ tar --strip-components=1 -xf %{SOURCE1} %patch22 %patch23 -p1 %patch24 +%patch25 -p1 #Disable as many things as possible to make the build faster. We care only for Eclipse. %pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder @@ -1018,6 +1020,10 @@ fi %{_libdir}/%{pkg_name}/plugins/org.eclipse.osgi.compatibility.state_* %changelog +* Tue Sep 16 2014 Alexander Kurtakov 1:4.4.0-19 +- Fix for autocomplete selection color. +- Rebuild for latest jetty. + * Tue Sep 09 2014 Mat Booth - 1:4.4.0-18 - Symlink more equinox and some core jars into javadir - Enables tycho to unbundle it's eclipse platform jars