Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2002-04-02 19:45:53 +0000
committerSilenio Quarti2002-04-02 19:45:53 +0000
commit7f9c8e5a1331ee8e05aca37e85a27d5f705008d3 (patch)
tree8645ff7054cf6dc310a1ccde21e36db616894949
parentd9c84cad0b9ea4010402ea7db42e6655926a5be8 (diff)
downloadeclipse.platform.swt-7f9c8e5a1331ee8e05aca37e85a27d5f705008d3.tar.gz
eclipse.platform.swt-7f9c8e5a1331ee8e05aca37e85a27d5f705008d3.tar.xz
eclipse.platform.swt-7f9c8e5a1331ee8e05aca37e85a27d5f705008d3.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java14
2 files changed, 6 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
index 29beaf1716..c1a7e585c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/swt.c
@@ -1760,7 +1760,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_gtk_OS_g_1signal_1connect_1
jbyte *detailed_signal1 = NULL;
if (detailed_signal) detailed_signal1 = (*env)->GetByteArrayElements(env, detailed_signal, NULL);
- rc = (jint)gtk_signal_connect((gpointer)instance, (const char*)detailed_signal1, (GCallback)c_handler, (gpointer)data);
+ rc = (jint)gtk_signal_connect_swapped((gpointer)instance, (const char*)detailed_signal1, (GCallback)c_handler, (gpointer)data);
if (detailed_signal) (*env)->ReleaseByteArrayElements(env, detailed_signal, detailed_signal1, 0);
return rc;
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 94105014f1..bb06ff4e0d 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
@@ -273,10 +273,8 @@ void createWidget (int index) {
*/
public void deselectAll() {
checkWidget();
- int root = OS.gtk_ctree_node_nth (handle, 0);
- if (root == 0) return;
OS.gtk_signal_handler_block_by_data (handle, SWT.Selection);
- OS.gtk_ctree_unselect_recursive (handle, root);
+ OS.gtk_ctree_unselect_recursive (handle, 0);
OS.gtk_signal_handler_unblock_by_data (handle, SWT.Selection);
}
@@ -806,10 +804,8 @@ public void removeTreeListener(TreeListener listener) {
*/
public void selectAll () {
checkWidget();
- int root = OS.gtk_ctree_node_nth (handle, 0);
- if (root == 0) return;
OS.gtk_signal_handler_block_by_data (handle, SWT.Selection);
- OS.gtk_ctree_select_recursive (handle, root);
+ OS.gtk_ctree_select_recursive (handle, 0);
OS.gtk_signal_handler_unblock_by_data (handle, SWT.Selection);
}
@@ -843,10 +839,10 @@ public void setRedraw (boolean redraw) {
public void setSelection (TreeItem [] items) {
checkWidget();
if (items == null) error (SWT.ERROR_NULL_ARGUMENT);
- int root = OS.gtk_ctree_node_nth (handle, 0);
- if (root == 0) return;
OS.gtk_signal_handler_block_by_data (handle, SWT.Selection);
- OS.gtk_ctree_unselect_recursive (handle, root);
+ if ((style & SWT.MULTI) != 0) {
+ OS.gtk_ctree_unselect_recursive (handle, 0);
+ }
int index = 0, length = items.length;
while (index < length) {
TreeItem item = items [index];

Back to the top