diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2013-07-13 10:44:23 +0300 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2013-07-13 10:44:23 +0300 |
commit | 5d74999766f9e86d70ddcdddef0aa7477038ff84 (patch) | |
tree | 3dc1afc13d91ea7bb505429d9d196a34d130b88d /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | |
parent | dd2aca966bc039ce9a2eb77aaa5738d3e28bb872 (diff) | |
download | eclipse.platform.swt-5d74999766f9e86d70ddcdddef0aa7477038ff84.tar.gz eclipse.platform.swt-5d74999766f9e86d70ddcdddef0aa7477038ff84.tar.xz eclipse.platform.swt-5d74999766f9e86d70ddcdddef0aa7477038ff84.zip |
Remove hacks for GtkTree from pre Gtk 2.10.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 2a8d1e5c7f..739e271191 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -3426,23 +3426,6 @@ public void setTopIndex (int index) { if (!(0 <= index && index < itemCount)) return; long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, _getItem (index).handle); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0f, 0f); - if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) { - /* - * Bug in GTK. According to the documentation, gtk_tree_view_scroll_to_cell - * should vertically scroll the cell to the top if use_align is true and row_align is 0. - * However, prior to version 2.8 it does not scroll at all. The fix is to determine - * the new location and use gtk_tree_view_scroll_to_point. - * If the widget is a pinhead, calling gtk_tree_view_scroll_to_point - * will have no effect. Therefore, it is still neccessary to call - * gtk_tree_view_scroll_to_cell. - */ - OS.gtk_widget_realize (handle); - GdkRectangle cellRect = new GdkRectangle (); - OS.gtk_tree_view_get_cell_area (handle, path, 0, cellRect); - int[] tx = new int[1], ty = new int[1]; - OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty); - OS.gtk_tree_view_scroll_to_point (handle, -1, ty[0]); - } OS.gtk_tree_path_free (path); } |