mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
use OK/cancel buttons in EditOpenersDialog for consistency with other preferences dialogs
This commit is contained in:
parent
dc24bf1aaa
commit
0f31037ebe
@ -119,19 +119,30 @@ public class EditOpenersDialog extends AbstractModalDialog {
|
||||
editFieldsGroup.layout();
|
||||
editFieldsGroup.pack();
|
||||
|
||||
Button closeButton = createCloseButton();
|
||||
closeButton.setLayoutData(formData(85, SWT.DEFAULT, null, new FormAttachment(editFieldsGroup, 0, SWT.RIGHT), new FormAttachment(editFieldsGroup, 6), null));
|
||||
|
||||
Button okButton = new Button(shell, SWT.NONE);
|
||||
okButton.setText(Labels.getLabel("button.OK"));
|
||||
|
||||
Button cancelButton = new Button(shell, SWT.NONE);
|
||||
cancelButton.setText(Labels.getLabel("button.cancel"));
|
||||
|
||||
positionButtonsInFormLayout(okButton, cancelButton, editFieldsGroup);
|
||||
|
||||
shell.pack();
|
||||
|
||||
okButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
|
||||
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
|
||||
saveOpeners();
|
||||
shell.close();
|
||||
}
|
||||
});
|
||||
cancelButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
|
||||
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
|
||||
shell.close();
|
||||
}
|
||||
});
|
||||
|
||||
openersList.select(0);
|
||||
loadFieldsForSelection();
|
||||
|
||||
shell.addListener(SWT.Close, new Listener() {
|
||||
public void handleEvent(Event e) {
|
||||
saveOpeners();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void saveOpeners() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user