diff options
author | Oleg Besedin | 2008-04-25 19:52:33 +0000 |
---|---|---|
committer | Oleg Besedin | 2008-04-25 19:52:33 +0000 |
commit | c8726d76b065f408ad30f094324ed7791abec619 (patch) | |
tree | 6b2458056a84e8ce11b2bfdb82bd3662802cd3ce /bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java | |
parent | 93a454ad5e38c991b3c588f6183a3688f4f02861 (diff) | |
download | rt.equinox.bundles-c8726d76b065f408ad30f094324ed7791abec619.tar.gz rt.equinox.bundles-c8726d76b065f408ad30f094324ed7791abec619.tar.xz rt.equinox.bundles-c8726d76b065f408ad30f094324ed7791abec619.zip |
Bug 228943 Alter Logout button depending on the state
Diffstat (limited to 'bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java')
-rw-r--r-- | bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java index a14b42a51..a13e33549 100644 --- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java +++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/StoragePreferencePage.java @@ -13,6 +13,8 @@ package org.eclipse.equinox.internal.security.ui.storage; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.*; @@ -37,12 +39,25 @@ public class StoragePreferencePage extends PreferencePage implements IWorkbenchP Composite pageArea = new Composite(parent, SWT.NONE); pageArea.setLayout(new RowLayout()); - TabFolder folder = new TabFolder(parent, SWT.TOP); + final TabFolder folder = new TabFolder(parent, SWT.TOP); passwordTab = new TabPassword(folder, 0, getShell()); contentsTab = new TabContents(folder, 1, getShell(), convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH)); advancedTab = new TabAdvanced(folder, 2, getShell()); folder.setSelection(0); folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + folder.addSelectionListener(new SelectionListener() { + + public void widgetDefaultSelected(SelectionEvent e) { + // nothing to do + } + + public void widgetSelected(SelectionEvent e) { + int i = folder.getSelectionIndex(); + if (i == 0 && passwordTab != null) // password page + passwordTab.onActivated(); + } + }); return folder; } |