diff options
author | Alexander Kurtakov | 2018-09-12 10:52:22 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-09-12 10:52:22 +0000 |
commit | 07bfae7d95348139a69bc2b4680a09bab25d2777 (patch) | |
tree | 27455b79d66c821acd5a828626dcbc7f29c11bbd | |
parent | 2c67c5f8b52468146662fc73028057e7e821ad72 (diff) | |
download | eclipse.platform.swt-07bfae7d95348139a69bc2b4680a09bab25d2777.tar.gz eclipse.platform.swt-07bfae7d95348139a69bc2b4680a09bab25d2777.tar.xz eclipse.platform.swt-07bfae7d95348139a69bc2b4680a09bab25d2777.zip |
Bug 530841: [GTK2] Remove GTK 2.x support
Fix warnings in the nightly build.
Change-Id: I0bcc192d1647fe1e31852a621e405ee0bcb259f4
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java | 3 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java | 12 |
2 files changed, 2 insertions, 13 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java index ae22b89e9e..147987374c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2018 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -136,7 +136,6 @@ public RGB open () { handle = GTK.gtk_color_selection_dialog_new (buffer); } Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); - long /*int*/ colorsel = 0; GdkRGBA rgba; rgba = new GdkRGBA (); if (rgb != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java index fae98b3092..40af8b7c2c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2018 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -1663,7 +1663,6 @@ void drawMessage (long /*int*/ cr) { int [] w = new int [1], h = new int [1]; gdk_window_get_size (window, w, h); GtkBorder innerBorder = Display.getEntryInnerBorder (handle); - int width = w [0] - innerBorder.left - innerBorder.right; int height = h [0] - innerBorder.top - innerBorder.bottom; long /*int*/ context = GTK.gtk_widget_get_pango_context (handle); long /*int*/ lang = OS.pango_context_get_language (context); @@ -1688,19 +1687,10 @@ void drawMessage (long /*int*/ cr) { y = height - rect.height; } y += innerBorder.top; - int x = innerBorder.left; - boolean rtl = (style & SWT.RIGHT_TO_LEFT) != 0; - int alignment = style & (SWT.LEFT | SWT.CENTER | SWT.RIGHT); - switch (alignment) { - case SWT.LEFT: x = rtl ? width - rect.width: innerBorder.left; break; - case SWT.CENTER: x = (width - rect.width) / 2; break; - case SWT.RIGHT: x = rtl ? innerBorder.left : width - rect.width; break; - } long /*int*/ styleContext = GTK.gtk_widget_get_style_context (handle); GdkRGBA textRGBA; textRGBA = display.styleContextGetColor (styleContext, GTK.GTK_STATE_FLAG_INSENSITIVE); Point thickness = getThickness (handle); - x += thickness.x; y += thickness.y; long /*int*/ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(window); Cairo.cairo_set_source_rgba(cairo, textRGBA.red, textRGBA.green, textRGBA.blue, textRGBA.alpha); |