Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java')
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
index d07c3e268a8..9c131267022 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
@@ -327,6 +327,8 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
String message= SearchMessages.SearchPageSelectionDialog_message;
ListSelectionDialog dialog= new ListSelectionDialog(getShell(), input, new ArrayContentProvider(), labelProvider, message) {
+ Button fLastUsedPageButton;
+
public void create() {
super.create();
final CheckboxTableViewer viewer= getViewer();
@@ -347,17 +349,16 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
protected Control createDialogArea(Composite parent) {
Composite control= (Composite)super.createDialogArea(parent);
-
- final Button lastUsedPageButton= new Button(control, SWT.CHECK);
- lastUsedPageButton.setText(SearchMessages.SearchPageSelectionDialog_rememberLastUsedPage_message);
- lastUsedPageButton.setSelection(fDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE));
- lastUsedPageButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fDialogSettings.put(STORE_IS_OPEN_PREVIOUS_PAGE, lastUsedPageButton.getSelection());
- }
- });
+ fLastUsedPageButton= new Button(control, SWT.CHECK);
+ fLastUsedPageButton.setText(SearchMessages.SearchPageSelectionDialog_rememberLastUsedPage_message);
+ fLastUsedPageButton.setSelection(fDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE));
return control;
}
+
+ protected void okPressed() {
+ fDialogSettings.put(STORE_IS_OPEN_PREVIOUS_PAGE, fLastUsedPageButton.getSelection());
+ super.okPressed();
+ }
};
dialog.setTitle(SearchMessages.SearchPageSelectionDialog_title);
dialog.setInitialSelections(SearchPlugin.getDefault().getEnabledSearchPageDescriptors(fInitialPageId).toArray());

Back to the top