Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF">
<filter id="926941240">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="IE"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java" type="org.eclipse.swt.ole.win32.OleControlSite">
<filter id="643846161">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,12 @@
<message_argument value="IE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.swt.SWT"/>
<message_argument value="NO_SEARCH"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener">
<filter id="576720909">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,20 @@ public class SWT {
*/
public static final int SEARCH = 1 << 7;

/**
* Style constant for disabling GTK interactive search popup (value is 1&lt;&lt;10).
* <br>Note that this is a <em>HINT</em> and is currently only supported on GTK.
* <p><b>Used By:</b></p>
* <ul>
* <li><code>List</code></li>
* <li><code>Table</code></li>
* <li><code>Tree</code></li>
* </ul>
*
* @since 3.130
*/
public static final int NO_SEARCH = 1 << 10;

/**
* Style constant for simple (not drop down) behavior (value is 1&lt;&lt;6).
* <br>Note that this is a <em>HINT</em>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* when a string is selected. A list may be single or multi select.
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI</dd>
* <dd>SINGLE, MULTI, NO_SEARCH</dd>
* <dt><b>Events:</b></dt>
* <dd>Selection, DefaultSelection</dd>
* </dl>
Expand Down Expand Up @@ -248,15 +248,8 @@ void createHandle (int index) {
GTK3.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
}
}
/*
* Bug in GTK. When a treeview is the child of an override shell,
* and if the user has ever invokes the interactive search field,
* and the treeview is disposed on a focus out event, it segment
* faults. The fix is to disable the search field in an override
* shell.
*/
if ((getShell ().style & SWT.ON_TOP) != 0) {
GTK.gtk_tree_view_set_search_column (handle, -1);
if (!search_enabled()) {
GTK.gtk_tree_view_set_search_column(handle, -1);
}
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
// reset to default font to get the usual behavior
Expand Down Expand Up @@ -1299,6 +1292,20 @@ public void removeSelectionListener(SelectionListener listener) {
eventTable.unhook (SWT.DefaultSelection,listener);
}

private boolean search_enabled() {
/* Disable searching when using NO_SEARCH */
if ((style & SWT.NO_SEARCH) != 0
/*
* Bug in GTK. When a treeview is the child of an override shell,
* and if the user has ever invokes the interactive search field,
* and the treeview is disposed on a focus out event, it segment
* faults. The fix is to disable the search field in an override
* shell.
*/
|| (getShell ().style & SWT.ON_TOP) != 0) return false;
return true;
}

/**
* Selects the item at the given zero-relative index in the receiver's
* list. If the item at the index was already selected, it remains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* </p>
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL, NO_SCROLL</dd>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL, NO_SCROLL, NO_SEARCH</dd>
* <dt><b>Events:</b></dt>
* <dd>Selection, DefaultSelection, SetData, MeasureItem, EraseItem, PaintItem</dd>
* </dl>
Expand Down Expand Up @@ -3247,8 +3247,8 @@ void reskinChildren (int flags) {
}

boolean searchEnabled () {
/* Disable searching when using VIRTUAL */
if ((style & SWT.VIRTUAL) != 0) return false;
/* Disable searching when using VIRTUAL or NO_SEARCH */
if ((style & SWT.VIRTUAL) != 0 || (style & SWT.NO_SEARCH) != 0) return false;
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* </p>
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL, NO_SEARCH</dd>
* <dt><b>Events:</b></dt>
* <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem, EmptinessChanged</dd>
* </dl>
Expand Down Expand Up @@ -3449,8 +3449,8 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
boolean searchEnabled () {
/* Disable searching when using VIRTUAL */
if ((style & SWT.VIRTUAL) != 0) return false;
/* Disable searching when using VIRTUAL or NO_SEARCH */
if ((style & SWT.VIRTUAL) != 0 || (style & SWT.NO_SEARCH) != 0) return false;
return true;
}
/**
Expand Down
Loading