Improve UX
[lgpl/argeo-commons.git] / swt / org.argeo.cms.swt / src / org / argeo / cms / swt / widgets / SwtGuidedFormDialog.java
index a7242b9a976b2315a0cb2212c2336f00611337cb..15d531de1870be2e86b6a7278401d02bc39bb2d9 100644 (file)
@@ -6,6 +6,7 @@ import org.argeo.cms.CmsMsg;
 import org.argeo.cms.swt.CmsSwtUtils;
 import org.argeo.cms.swt.Selected;
 import org.argeo.cms.swt.dialogs.LightweightDialog;
+import org.argeo.cms.ux.widgets.CmsDialog;
 import org.argeo.cms.ux.widgets.GuidedForm;
 import org.argeo.cms.ux.widgets.GuidedForm.Page;
 import org.argeo.eclipse.ui.EclipseUiUtils;
@@ -65,7 +66,7 @@ public class SwtGuidedFormDialog extends LightweightDialog implements GuidedForm
                        Button cancelButton = new Button(messageArea, SWT.FLAT);
                        cancelButton.setText(CmsMsg.cancel.lead());
                        cancelButton.setLayoutData(new GridData(SWT.END, SWT.TOP, false, false, 1, 3));
-                       cancelButton.addSelectionListener((Selected) (e) -> closeShell(CANCEL));
+                       cancelButton.addSelectionListener((Selected) (e) -> closeShell(CmsDialog.CANCEL));
                        message = new Label(messageArea, SWT.WRAP);
                        message.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 2));
                        updateMessage();
@@ -191,7 +192,7 @@ public class SwtGuidedFormDialog extends LightweightDialog implements GuidedForm
 
        protected void finishPressed() {
                if (guidedForm.performFinish())
-                       closeShell(OK);
+                       closeShell(CmsDialog.OK);
        }
 
        private static void setSwitchingFormData(Composite composite) {