summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2013-07-12 19:09:45 +0300
committerAlexander Kurtakov <akurtako@redhat.com>2013-07-12 19:09:45 +0300
commit4c12d494486dd1ab75b7abc45b6e43b9bfe348e4 (patch)
tree83b1a153467937cbed0860d17834f759730da5f8
parentb23ea2e24f758a54ab6758b6481dfb86a9443288 (diff)
downloadeclipse.platform.swt-4c12d494486dd1ab75b7abc45b6e43b9bfe348e4.tar.gz
eclipse.platform.swt-4c12d494486dd1ab75b7abc45b6e43b9bfe348e4.tar.xz
eclipse.platform.swt-4c12d494486dd1ab75b7abc45b6e43b9bfe348e4.zip
Get rid of gtk_tree_view_set_enable_search .
Calls to it are useless on post 2.6 GTK versions.
-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.c1
-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.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java64
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java64
7 files changed, 9 insertions, 157 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 909b4c4b78..34ca537b05 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
@@ -17684,16 +17684,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1set_1drag_1dest_1row)
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1enable_1search
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1set_1enable_1search)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
- OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1enable_1search_FUNC);
- gtk_tree_view_set_enable_search((GtkTreeView *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1enable_1search_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1tree_1view_1set_1grid_1lines
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1set_1grid_1lines)
(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
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 fe58a914b3..a8572273ef 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
@@ -1297,7 +1297,6 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1tree_1view_1scroll_1to_1point",
"_1gtk_1tree_1view_1set_1cursor",
"_1gtk_1tree_1view_1set_1drag_1dest_1row",
- "_1gtk_1tree_1view_1set_1enable_1search",
"_1gtk_1tree_1view_1set_1grid_1lines",
"_1gtk_1tree_1view_1set_1headers_1visible",
"_1gtk_1tree_1view_1set_1model",
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 a0b7eef9ab..804127cd5a 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
@@ -1307,7 +1307,6 @@ typedef enum {
_1gtk_1tree_1view_1scroll_1to_1point_FUNC,
_1gtk_1tree_1view_1set_1cursor_FUNC,
_1gtk_1tree_1view_1set_1drag_1dest_1row_FUNC,
- _1gtk_1tree_1view_1set_1enable_1search_FUNC,
_1gtk_1tree_1view_1set_1grid_1lines_FUNC,
_1gtk_1tree_1view_1set_1headers_1visible_FUNC,
_1gtk_1tree_1view_1set_1model_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 3a02e87b4c..41096a1de4 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
@@ -12940,16 +12940,6 @@ public static final void gtk_tree_view_set_drag_dest_row(long /*int*/ view, long
lock.unlock();
}
}
-/** @param view cast=(GtkTreeView *) */
-public static final native void _gtk_tree_view_set_enable_search (long /*int*/ view, boolean enable_search);
-public static final void gtk_tree_view_set_enable_search (long /*int*/ view, boolean enable_search) {
- lock.lock();
- try {
- _gtk_tree_view_set_enable_search(view, enable_search);
- } finally {
- lock.unlock();
- }
-}
/**
* @param view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
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 97f645cfdb..22589a874e 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
@@ -228,21 +228,7 @@ void createHandle (int index) {
* shell.
*/
if ((getShell ().style & SWT.ON_TOP) != 0) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
}
}
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 af72e9e527..521024ef21 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
@@ -582,21 +582,7 @@ void createColumn (TableColumn column, int index) {
column.modelIndex = modelIndex;
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
@@ -637,21 +623,7 @@ void createHandle (int index) {
OS.g_object_set (handle, OS.fixed_height_mode, true, 0);
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
}
}
@@ -1048,21 +1020,7 @@ void destroyItem (TableColumn column) {
}
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
@@ -2460,21 +2418,7 @@ public void removeAll () {
resetCustomDraw ();
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)){
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
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 f7c4856be3..786e843516 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
@@ -688,21 +688,7 @@ void createColumn (TreeColumn column, int index) {
column.modelIndex = modelIndex;
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
@@ -743,21 +729,7 @@ void createHandle (int index) {
OS.g_object_set (handle, OS.fixed_height_mode, true, 0);
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- };
+ OS.gtk_tree_view_set_search_column (handle, -1);
}
}
@@ -1050,21 +1022,7 @@ void destroyItem (TreeColumn column) {
}
}
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;
@@ -2439,21 +2397,7 @@ public void removeAll () {
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
if (!searchEnabled ()) {
- /*
- * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
- * would prevent the user from being able to type in text to search the tree.
- * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive
- * search. This meant that even if FALSE was passed to enable_search, the user
- * can still bring up the search pop up using the keybinding. GTK also introduced
- * the notion of passing a -1 to gtk_set_search_column to disable searching
- * (including the search key binding). The fix is to use the right calls
- * for the right version.
- */
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) {
- OS.gtk_tree_view_set_search_column (handle, -1);
- } else {
- OS.gtk_tree_view_set_enable_search (handle, false);
- }
+ OS.gtk_tree_view_set_search_column (handle, -1);
} else {
/* Set the search column whenever the model changes */
int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex;