summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-08-28 11:07:03 -0400
committerAnatoly Spektor <aspektor@redhat.com>2012-08-28 11:07:03 -0400
commit97be2e59da48ecf0ac05d0b55b7e587b8dd04bb7 (patch)
tree81ac24305d7e14df4d815b74a52624cf1934bfff /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
parent4764388a0a9afb9e042874f30979a69aae6fd14c (diff)
parentf9c7f286716e1457f10365cf85e9924d4a2e869b (diff)
downloadeclipse.platform.swt-97be2e59da48ecf0ac05d0b55b7e587b8dd04bb7.tar.gz
eclipse.platform.swt-97be2e59da48ecf0ac05d0b55b7e587b8dd04bb7.tar.xz
eclipse.platform.swt-97be2e59da48ecf0ac05d0b55b7e587b8dd04bb7.zip
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java28
1 files changed, 7 insertions, 21 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index b1e3bbd1f9..6e3cb9f984 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -166,32 +166,17 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
forceResize ();
int /*long*/ clientHandle = clientHandle ();
- int clientX = 0;
- int clientY = 0;
GtkAllocation allocation = new GtkAllocation ();
- if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
- OS.gtk_widget_get_allocation(clientHandle, allocation);
- clientX = allocation.x;
- clientY = allocation.y;
- } else {
- clientX = OS.GTK_WIDGET_X (clientHandle);
- clientY = OS.GTK_WIDGET_Y (clientHandle);
- }
+ gtk_widget_get_allocation (clientHandle, allocation);
+ int clientX = allocation.x;
+ int clientY = allocation.y;
x -= clientX;
y -= clientY;
width += clientX + clientX;
if ((style & SWT.BOTTOM) != 0) {
- int parentHeight = 0;
- int clientHeight = 0;
- if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
- OS.gtk_widget_get_allocation(clientHandle, allocation);
- clientHeight = allocation.height;
- OS.gtk_widget_get_allocation(handle, allocation);
- parentHeight = allocation.height;
- } else {
- parentHeight = OS.GTK_WIDGET_HEIGHT (handle);
- clientHeight = OS.GTK_WIDGET_HEIGHT (clientHandle);
- }
+ int clientHeight = allocation.height;
+ gtk_widget_get_allocation (handle, allocation);
+ int parentHeight = allocation.height;
height += parentHeight - clientHeight;
} else {
height += clientX + clientY;
@@ -202,6 +187,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
+ if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
gtk_widget_set_has_window (fixedHandle, true);
handle = OS.gtk_notebook_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);