diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2013-07-12 14:22:57 -0400 |
---|---|---|
committer | Arun Thondapu <arunkumar.thondapu@in.ibm.com> | 2013-07-18 15:23:04 +0530 |
commit | 84ada67db50238f5e2d9101d22b8080e28b074d2 (patch) | |
tree | a7963ed646999656a0486a8f01b95332b3ee74da /bundles/org.eclipse.swt | |
parent | f44fbcfe05943df863742d52c93eee02ea76cf56 (diff) | |
download | eclipse.platform.swt-84ada67db50238f5e2d9101d22b8080e28b074d2.tar.gz eclipse.platform.swt-84ada67db50238f5e2d9101d22b8080e28b074d2.tar.xz eclipse.platform.swt-84ada67db50238f5e2d9101d22b8080e28b074d2.zip |
Bug 412880 - Dropping Version less than 2.10 in Widget and Tooltip
Signed-off-by: Anatoly Spektor <aspektor@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt')
-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; - } } /** |