diff options
author | Silenio Quarti | 2012-01-20 20:46:43 +0000 |
---|---|---|
committer | Silenio Quarti | 2012-01-20 20:46:43 +0000 |
commit | d75d4475abf1097b928839bee25f9f0bb2bc7878 (patch) | |
tree | 997b4c7b5bff675527374d272144763580c8e7f8 | |
parent | 4fe8da6f2bab6d03a443071a684658611aa5499d (diff) | |
download | eclipse.platform.swt-d75d4475abf1097b928839bee25f9f0bb2bc7878.tar.gz eclipse.platform.swt-d75d4475abf1097b928839bee25f9f0bb2bc7878.tar.xz eclipse.platform.swt-d75d4475abf1097b928839bee25f9f0bb2bc7878.zip |
Bug 369228 - Kill pre GTK 2.4 leftovers from Tree. (review)
5 files changed, 3 insertions, 68 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index a38b242c09..45a9973a56 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -216,10 +216,6 @@ public class Display extends Device { boolean idleNeeded; /* GtkTreeView callbacks */ - int[] treeSelection; - int treeSelectionLength; - int /*long*/ treeSelectionProc; - Callback treeSelectionCallback; int /*long*/ cellDataProc; Callback cellDataCallback; @@ -2547,10 +2543,6 @@ void initializeCallbacks () { shellMapProcClosure = OS.g_cclosure_new (shellMapProc, 0, 0); OS.g_closure_ref (shellMapProcClosure); - - treeSelectionCallback = new Callback(this, "treeSelectionProc", 4); //$NON-NLS-1$ - treeSelectionProc = treeSelectionCallback.getAddress(); - if (treeSelectionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); cellDataCallback = new Callback (this, "cellDataProc", 5); //$NON-NLS-1$ cellDataProc = cellDataCallback.getAddress (); @@ -3273,8 +3265,6 @@ void releaseDisplay () { idleHandle = 0; /* Dispose GtkTreeView callbacks */ - treeSelectionCallback.dispose (); treeSelectionCallback = null; - treeSelectionProc = 0; cellDataCallback.dispose (); cellDataCallback = null; cellDataProc = 0; @@ -3389,7 +3379,7 @@ void releaseDisplay () { thread = null; lastWidget = activeShell = null; flushData = closures = null; - indexTable = signalIds = treeSelection = null; + indexTable = signalIds = null; widgetTable = modalShells = null; data = null; values = keys = null; @@ -4141,12 +4131,6 @@ int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long return widget.sizeRequestProc (handle, arg0, user_data); } -int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int /*long*/ data) { - Widget widget = getWidget (data); - if (widget == null) return 0; - return widget.treeSelectionProc (model, path, iter, treeSelection, treeSelectionLength++); -} - void saveResources () { int resourceCount = 0; if (resources == null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 847f4e268c..5ea80a8294 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -1550,16 +1550,4 @@ public void showSelection () { OS.g_free (iter); } -int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int[] selection, int length) { - if (selection != null) { - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); - if (indices != 0) { - int [] index = new int [1]; - OS.memmove (index, indices, 4); - selection [length] = index [0]; - } - } - return 0; -} - } 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 f78f77d711..7cc3998e67 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 @@ -3533,18 +3533,6 @@ public void showSelection () { showItem (item.handle); } -int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int[] selection, int length) { - if (selection != null) { - int /*long*/ indices = OS.gtk_tree_path_get_indices (path); - if (indices != 0) { - int [] index = new int [1]; - OS.memmove (index, indices, 4); - selection [(int)/*64*/length] = index [0]; - } - } - return 0; -} - void updateScrollBarValue (ScrollBar bar) { super.updateScrollBarValue (bar); /* diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 1fa150e0ed..30ef7ba698 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -655,12 +655,7 @@ void createColumn (TreeColumn 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); @@ -1676,8 +1671,7 @@ int /*long*/ getPixbufRenderer (int /*long*/ column) { public TreeItem[] getSelection () { 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); TreeItem [] treeSelection = new TreeItem [count]; @@ -1948,12 +1942,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_motion_notify_event (int /*long*/ widget, int /*long*/ event) { int /*long*/ window = OS.GDK_EVENT_WINDOW (event); if (window != OS.gtk_tree_view_get_bin_window (handle)) return 0; @@ -3405,15 +3393,6 @@ public void showItem (TreeItem item) { OS.gtk_tree_path_free (path); } -int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int[] selection, int length) { - if (selection != null) { - int [] index = new int [1]; - OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); - selection [(int)/*64*/length] = index [0]; - } - return 0; -} - void updateScrollBarValue (ScrollBar bar) { super.updateScrollBarValue (bar); /* 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 6285902129..31968313ea 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 @@ -1679,10 +1679,6 @@ int /*long*/ timerProc (int /*long*/ widget) { return 0; } -int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int [] selection, int length) { - return 0; -} - boolean translateTraversal (int event) { return false; } |