Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java =================================================================== RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java,v retrieving revision 1.285 diff -u -r1.285 Control.java --- Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 30 Sep 2005 22:10:48 -0000 1.285 +++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 3 Oct 2005 04:11:11 -0000 @@ -3139,6 +3139,10 @@ state |= ZERO_SIZED; int /*long*/ topHandle = topHandle (); int /*long*/ parentHandle = parent.parentingHandle (); + if (parent instanceof Table) { + OS.gtk_widget_realize (parent.handle); + OS.gtk_widget_set_parent_window (topHandle, OS.gtk_tree_view_get_bin_window (parent.handle)); + } OS.gtk_container_add (parentHandle, topHandle); if (handle != 0 && handle != topHandle) OS.gtk_widget_show (handle); if ((state & ZERO_SIZED) == 0) { Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java =================================================================== RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java,v retrieving revision 1.208 diff -u -r1.208 Table.java --- Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java 15 Sep 2005 19:48:17 -0000 1.208 +++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java 3 Oct 2005 04:11:13 -0000 @@ -1839,6 +1839,17 @@ return OS.gtk_tree_view_get_bin_window (handle); } +public Rectangle getClientArea() { + checkWidget (); + Rectangle rect = super.getClientArea(); + int border = getBorderWidth (); + int headerHeight = getHeaderHeight (); + rect.y += (headerHeight == 0 ? border : headerHeight); + rect.x = border; + rect.width = 1600; // HACK + return rect; +} + int /*long*/ pixbufCellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, int /*long*/ data) { if (cell == ignorePixbufCell) return 0; int modelIndex = -1; Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java =================================================================== RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java,v retrieving revision 1.73 diff -u -r1.73 TableItem.java --- Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java 15 Sep 2005 19:48:40 -0000 1.73 +++ Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java 3 Oct 2005 04:11:13 -0000 @@ -239,9 +239,13 @@ if (column == 0) return new Rectangle (0, 0, 0, 0); int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); + OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, false, false); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); + int [] cw = new int [1], ch = new int [1]; + OS.gtk_tree_view_column_cell_get_size (column, null, null, null, cw, ch); + rect.height = ch [0]; if (index == 0 && (parent.style & SWT.CHECK) != 0) { if (OS.GTK_VERSION >= OS.VERSION (2, 1, 3)) { @@ -259,22 +263,7 @@ } } - /* - * In the horizontal direction, the origin of the bin window is - * not the same as the origin of the scrolled handle. - * The method gtk_tree_view_get_cell_area returns the - * x coordinate relative to the bin window. In order to - * get the coordinates relative to the top left corner - * of the client area, we need to account for the - * horizontal scroll adjustment. - */ - int[] wx = new int[1]; - OS.gtk_tree_view_tree_to_widget_coords(parentHandle, rect.x, 0, wx, null); - rect.x = wx[0]; - - int border = parent.getBorderWidth (); - int headerHeight = parent.getHeaderHeight (); - return new Rectangle (rect.x + border, rect.y + (headerHeight == 0 ? border : headerHeight), rect.width + 1, rect.height + 1); + return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1); } /** @@ -496,22 +485,7 @@ rect.width = w [0]; } - /* - * In the horizontal direction, the origin of the bin window is - * not the same as the origin of the scrolled handle. - * The method gtk_tree_view_get_cell_area returns the - * x coordinate relative to the bin window. In order to - * get the coordinates relative to the top left corner - * of the client area, we need to account for the - * horizontal scroll adjustment. - */ - int[] wx = new int[1]; - OS.gtk_tree_view_tree_to_widget_coords(parentHandle, rect.x, 0, wx, null); - rect.x = wx[0]; - - int border = parent.getBorderWidth (); - int headerHeight = parent.getHeaderHeight (); - return new Rectangle (rect.x + border, rect.y + (headerHeight == 0 ? border : headerHeight), rect.width, rect.height + 1); + return new Rectangle (rect.x, rect.y, rect.width, rect.height + 1); } /**