diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets')
3 files changed, 9 insertions, 135 deletions
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; |