summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-01-20 15:22:39 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-01-20 15:22:39 -0500
commitfa5f2489bdf14a8636f01b8292ce465b8e1cfb0a (patch)
tree74a0ae8b0598a92e4d1aaec588168e6e9ed87e96 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
parent05fa8251b9ef2b3f6a0320b4459410a59e0eab46 (diff)
downloadeclipse.platform.swt-fa5f2489bdf14a8636f01b8292ce465b8e1cfb0a.tar.gz
eclipse.platform.swt-fa5f2489bdf14a8636f01b8292ce465b8e1cfb0a.tar.xz
eclipse.platform.swt-fa5f2489bdf14a8636f01b8292ce465b8e1cfb0a.zip
Bug 369226 - Cleanup pre GTK 2.4 leftovers in Table. (review)
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.java27
1 files changed, 4 insertions, 23 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 0926c239ce..f78f77d711 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
@@ -550,12 +550,7 @@ void createColumn (TableColumn column, int index) {
createRenderers (checkColumn.handle, checkColumn.modelIndex, false, checkColumn.style);
}
createRenderers (columnHandle, modelIndex, index == 0, column == null ? 0 : column.style);
- /*
- * Use GTK_TREE_VIEW_COLUMN_GROW_ONLY on GTK versions < 2.3.2
- * because fixed_height_mode is not supported.
- */
- boolean useVirtual = (style & SWT.VIRTUAL) != 0 ;
- if (!useVirtual && columnCount == 0) {
+ if ((style & SWT.VIRTUAL) == 0 && columnCount == 0) {
OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);
} else {
OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_FIXED);
@@ -1600,13 +1595,7 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) {
public TableItem [] getSelection () {
checkWidget();
int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
- /*
- * Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults
- * in versions smaller than 2.2.4 if the model is NULL. The fix is
- * to give a valid pointer instead.
- */
- int /*long*/ [] model = null;
- int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
+ int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null);
if (list != 0) {
int count = OS.g_list_length (list);
int [] treeSelection = new int [count];
@@ -1660,8 +1649,7 @@ public int getSelectionCount () {
public int getSelectionIndex () {
checkWidget();
int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
- int /*long*/ [] model = null;
- int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
+ int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null);
if (list != 0) {
int count = OS.g_list_length (list);
int [] index = new int [1];
@@ -1703,8 +1691,7 @@ public int getSelectionIndex () {
public int [] getSelectionIndices () {
checkWidget();
int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
- int /*long*/ [] model = null;
- int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
+ int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, null);
if (list != 0) {
int count = OS.g_list_length (list);
int [] treeSelection = new int [count];
@@ -1941,12 +1928,6 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
return super.gtk_expose_event (widget, eventPtr);
}
-int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
- int /*long*/ result = super.gtk_key_press_event (widget, eventPtr);
- if (result != 0) return result;
- return result;
-}
-
int /*long*/ gtk_popup_menu (int /*long*/ widget) {
int /*long*/ result = super.gtk_popup_menu (widget);
/*