summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-05-25 13:19:16 +0000
committerBilly Biggs <bbiggs>2005-05-25 13:19:16 +0000
commit7a5eebc09215b86b51b8ee6f40494ee145b8cad0 (patch)
treeb69e95cea053a73a33c819745782646dbf50fc62
parente15c566f433cfa3075dfa927395d9d855200e379 (diff)
downloadeclipse.platform.swt-7a5eebc09215b86b51b8ee6f40494ee145b8cad0.tar.gz
eclipse.platform.swt-7a5eebc09215b86b51b8ee6f40494ee145b8cad0.tar.xz
eclipse.platform.swt-7a5eebc09215b86b51b8ee6f40494ee145b8cad0.zip
85645
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java9
7 files changed, 45 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
index 4ddf3a7ddd..cc47c70428 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
@@ -3477,6 +3477,10 @@ OS__gtk_tree_view_set_rules_hint=
OS__gtk_tree_view_set_rules_hint_0=cast=(GtkTreeView *)
OS__gtk_tree_view_set_rules_hint_1=
+OS__gtk_tree_view_set_search_column=
+OS__gtk_tree_view_set_search_column_0=cast=(GtkTreeView *)
+OS__gtk_tree_view_set_search_column_1=cast=(gint)
+
OS__gtk_tree_view_tree_to_widget_coords=
OS__gtk_tree_view_tree_to_widget_coords_0=cast=(GtkTreeView *)
OS__gtk_tree_view_tree_to_widget_coords_1=cast=(gint)
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 e068cb107a..c11dfda9fa 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
@@ -9887,6 +9887,16 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1set_1rules_1hint)
}
#endif
+#ifndef NO__1gtk_1tree_1view_1set_1search_1column
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1set_1search_1column)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1search_1column_FUNC);
+ gtk_tree_view_set_search_column((GtkTreeView *)arg0, (gint)arg1);
+ OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1search_1column_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1tree_1view_1tree_1to_1widget_1coords
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1tree_1to_1widget_1coords)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index f9de761be7..17ba23a09f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 989;
-int OS_nativeFunctionCallCount[989];
+int OS_nativeFunctionCount = 990;
+int OS_nativeFunctionCallCount[990];
char * OS_nativeFunctionNames[] = {
"Call",
"GDK_1WINDOWING_1X11",
@@ -787,6 +787,7 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1tree_1view_1set_1headers_1visible",
"_1gtk_1tree_1view_1set_1model",
"_1gtk_1tree_1view_1set_1rules_1hint",
+ "_1gtk_1tree_1view_1set_1search_1column",
"_1gtk_1tree_1view_1tree_1to_1widget_1coords",
"_1gtk_1tree_1view_1unset_1rows_1drag_1dest",
"_1gtk_1tree_1view_1widget_1to_1tree_1coords",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 47893c948f..296b74ca21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -791,6 +791,7 @@ typedef enum {
_1gtk_1tree_1view_1set_1headers_1visible_FUNC,
_1gtk_1tree_1view_1set_1model_FUNC,
_1gtk_1tree_1view_1set_1rules_1hint_FUNC,
+ _1gtk_1tree_1view_1set_1search_1column_FUNC,
_1gtk_1tree_1view_1tree_1to_1widget_1coords_FUNC,
_1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC,
_1gtk_1tree_1view_1widget_1to_1tree_1coords_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index a4ee1318b1..dbbb0c9bb0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -6786,6 +6786,15 @@ public static final void gtk_tree_view_set_rules_hint(int /*long*/ tree_view, bo
lock.unlock();
}
}
+public static final native void _gtk_tree_view_set_search_column(int /*long*/ tree_view, int column);
+public static final void gtk_tree_view_set_search_column(int /*long*/ tree_view, int column) {
+ lock.lock();
+ try {
+ _gtk_tree_view_set_search_column(tree_view, column);
+ } finally {
+ lock.unlock();
+ }
+}
public static final native void _gtk_tree_view_tree_to_widget_coords(int /*long*/ tree_view, int tx, int ty, int[] wx, int[] wy);
public static final void gtk_tree_view_tree_to_widget_coords(int /*long*/ tree_view, int tx, int ty, int[] wx, int[] wy) {
lock.lock();
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 9bd848c08b..0de1992bac 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
@@ -416,6 +416,9 @@ void createColumn (TableColumn column, int index) {
column.handle = columnHandle;
column.modelIndex = modelIndex;
}
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
void createHandle (int index) {
@@ -824,6 +827,9 @@ void destroyItem (TableColumn column) {
}
column.handle = column.buttonHandle = column.labelHandle = 0;
column.imageHandle = 0;
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
void destroyItem (TableItem item) {
@@ -1945,6 +1951,9 @@ public void removeAll () {
items = new TableItem [4];
itemCount = 0;
resetCustomDraw ();
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
/**
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 106f343580..ebb7db258f 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
@@ -343,6 +343,9 @@ void createColumn (TreeColumn column, int index) {
column.handle = columnHandle;
column.modelIndex = modelIndex;
}
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
void createHandle (int index) {
@@ -652,6 +655,9 @@ void destroyItem (TreeColumn column) {
}
column.handle = column.buttonHandle = column.labelHandle = 0;
column.imageHandle = 0;
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
@@ -1650,6 +1656,9 @@ public void removeAll () {
if (item != null && !item.isDisposed ()) item.releaseResources ();
}
items = new TreeItem[4];
+ /* Set the search column whenever the model changes */
+ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
+ OS.gtk_tree_view_set_search_column (handle, firstColumn + CELL_TEXT);
}
/**