X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fwidgets%2Fauth%2FCompositeCallbackHandler.java;h=bc99bc48bb8ff362d9e80e2becaac1f2e5dceaa3;hb=b0d074d8d5e59d320b3e44d64a54476bcc889ba9;hp=30f8308e30f395d0f0a4d5a8e1df0652496e8484;hpb=bd811d9fad35f55aa1ab3afbc835ff24367ffbbe;p=lgpl%2Fargeo-commons.git
diff --git a/org.argeo.cms/src/org/argeo/cms/widgets/auth/CompositeCallbackHandler.java b/org.argeo.cms/src/org/argeo/cms/widgets/auth/CompositeCallbackHandler.java
index 30f8308e3..bc99bc48b 100644
--- a/org.argeo.cms/src/org/argeo/cms/widgets/auth/CompositeCallbackHandler.java
+++ b/org.argeo.cms/src/org/argeo/cms/widgets/auth/CompositeCallbackHandler.java
@@ -10,7 +10,7 @@ import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.TextOutputCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.argeo.util.LocaleCallback;
+import org.argeo.util.LocaleChoice;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
@@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Text;
*
* Supported Argeo {@link Callback}s are:
*
- * - {@link LocaleCallback}
+ * - {@link LocaleChoice}
*
*
*/
@@ -82,15 +82,15 @@ public class CompositeCallbackHandler extends Composite implements
if (!wasUsedAlready)
wasUsedAlready = true;
- while (!isSubmitted() && !isCanceled()) {
- try {
- wait(1000l);
- } catch (InterruptedException e) {
- // silent
- }
- }
+// while (!isSubmitted() && !isCanceled()) {
+// try {
+// wait(1000l);
+// } catch (InterruptedException e) {
+// // silent
+// }
+// }
- cleanCallbacksAfterCancel(callbacks);
+// cleanCallbacksAfterCancel(callbacks);
}
public void checkCallbackSupported(Callback callback)
@@ -98,7 +98,7 @@ public class CompositeCallbackHandler extends Composite implements
if (callback instanceof TextOutputCallback
|| callback instanceof NameCallback
|| callback instanceof PasswordCallback
- || callback instanceof LocaleCallback) {
+ || callback instanceof LocaleChoice) {
return;
} else {
throw new UnsupportedCallbackException(callback);
@@ -137,8 +137,8 @@ public class CompositeCallbackHandler extends Composite implements
createNameHandler(composite, (NameCallback) callback);
} else if (callback instanceof PasswordCallback) {
createPasswordHandler(composite, (PasswordCallback) callback);
- } else if (callback instanceof LocaleCallback) {
- createLocaleHandler(composite, (LocaleCallback) callback);
+ } else if (callback instanceof LocaleChoice) {
+ createLocaleHandler(composite, (LocaleChoice) callback);
}
}
}
@@ -220,12 +220,12 @@ public class CompositeCallbackHandler extends Composite implements
}
protected Combo createLocaleHandler(Composite composite,
- final LocaleCallback callback) {
+ final LocaleChoice callback) {
String[] labels = callback.getSupportedLocalesLabels();
if (labels.length == 0)
return null;
Label label = new Label(composite, SWT.NONE);
- label.setText(callback.getPrompt());
+ label.setText("Language");
final Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setItems(labels);