Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java5
3 files changed, 12 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index c0b33d73db..f2ba212bac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -11404,17 +11404,17 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1columns)
#ifndef NO__1gtk_1tree_1view_1get_1cursor
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1cursor)
- (JNIEnv *env, jclass that, jlong arg0, jintLongArray arg1, jintLongArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlongArray arg2)
{
- jintLong *lparg1=NULL;
- jintLong *lparg2=NULL;
+ jlong *lparg1=NULL;
+ jlong *lparg2=NULL;
GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1cursor_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_tree_view_get_cursor((GtkTreeView *)arg0, (GtkTreePath **)lparg1, (GtkTreeViewColumn **)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1cursor_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index 250785978c..e45bcb2fc7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -8076,8 +8076,8 @@ public class GTK extends OS {
* @param path cast=(GtkTreePath **)
* @param focus_column cast=(GtkTreeViewColumn **)
*/
- public static final native void _gtk_tree_view_get_cursor(long tree_view, long /*int*/[] path, long /*int*/[] focus_column);
- public static final void gtk_tree_view_get_cursor(long tree_view, long /*int*/[] path, long /*int*/[] focus_column) {
+ public static final native void _gtk_tree_view_get_cursor(long tree_view, long [] path, long [] focus_column);
+ public static final void gtk_tree_view_get_cursor(long tree_view, long [] path, long [] focus_column) {
lock.lock();
try {
_gtk_tree_view_get_cursor(tree_view, path, focus_column);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index fd6199efa9..273436bfb3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1094,11 +1094,12 @@ void releaseWidget () {
@Override
public void dispose () {
// Workaround to Bug489751, avoid selecting next node when selected node is disposed.
+ Tree tmpParent = null;
if (parent != null && parent.getItemCount() > 0 && parent.getSelectionCount() == 0) {
- parent.setSelection(parent.getItem(0));
- parent.deselectAll();
+ tmpParent = parent;
}
super.dispose();
+ if (tmpParent != null) tmpParent.deselectAll();
}
/**

Back to the top