diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2013-07-12 14:22:57 -0400 |
---|---|---|
committer | aspektor <aspektor@redhat.com> | 2013-07-17 14:56:14 -0400 |
commit | fc282b273b54983a12c8e57a6d399f9a2735f409 (patch) | |
tree | 621c05140309a3db52170ecd50c9f03673df9a40 | |
parent | 6d2109680e67f01ec005aa6e7ba9c30428f9e77a (diff) | |
download | eclipse.platform.swt-cleanup_210.tar.gz eclipse.platform.swt-cleanup_210.tar.xz eclipse.platform.swt-cleanup_210.zip |
Bug 412880 - Dropping Version less than 2.10 in Widget and Tooltip cleanup_210
Signed-off-by: Anatoly Spektor <aspektor@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java | 19 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java | 5 |
2 files changed, 4 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 8784c9b5f6..7ae3ae929b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -344,21 +344,10 @@ Point getLocation () { int y = this.y; if (item != null) { long /*int*/ itemHandle = item.handle; - if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { - GdkRectangle area = new GdkRectangle (); - OS.gtk_status_icon_get_geometry (itemHandle, 0, area, 0); - x = area.x + area.width / 2; - y = area.y + area.height / 2; - } else { - OS.gtk_widget_realize (itemHandle); - long /*int*/ window = gtk_widget_get_window (itemHandle); - int [] px = new int [1], py = new int [1]; - OS.gdk_window_get_origin (window, px, py); - GtkAllocation allocation = new GtkAllocation (); - gtk_widget_get_allocation (itemHandle, allocation); - x = px [0] + allocation.width / 2; - y = py [0] + allocation.height / 2; - } + GdkRectangle area = new GdkRectangle (); + OS.gtk_status_icon_get_geometry (itemHandle, 0, area, 0); + x = area.x + area.width / 2; + y = area.y + area.height / 2; } if (x == -1 || y == -1) { int [] px = new int [1], py = new int [1]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index f9666a80ba..d8c48aaf2c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -332,11 +332,6 @@ void checkOrientation (Widget parent) { } } style = checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0); - /* Versions of GTK prior to 2.8 do not render RTL text properly */ - if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) { - style &= ~SWT.RIGHT_TO_LEFT; - style |= SWT.LEFT_TO_RIGHT; - } } /** |