]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - swt/org.argeo.cms.swt/src/org/argeo/cms/swt/auth/CmsLogin.java
Merge remote-tracking branch 'origin/unstable' into merge-to-testing
[lgpl/argeo-commons.git] / swt / org.argeo.cms.swt / src / org / argeo / cms / swt / auth / CmsLogin.java
index 4af0c6c1ac79f20e19596b12056cbe4e59aa4f01..b27c6f360e9de78e196a4a0e71ce156d4d503b43 100644 (file)
@@ -71,7 +71,7 @@ public class CmsLogin implements CmsStyles, CallbackHandler {
                if (this.cmsContext != null) {
                        defaultLocale = this.cmsContext.getDefaultLocale();
                        List<Locale> locales = this.cmsContext.getLocales();
-                       if (locales != null)
+                       if (locales != null && locales.size() > 1)
                                localeChoice = new LocaleChoice(locales, defaultLocale);
                } else {
                        defaultLocale = Locale.getDefault();
@@ -161,7 +161,7 @@ public class CmsLogin implements CmsStyles, CallbackHandler {
                // credentialsBlock.setLayoutData(CmsUiUtils.fillAll());
                CmsSwtUtils.style(credentialsBlock, CMS_LOGIN_DIALOG);
 
-               Integer textWidth = 120;
+               Integer textWidth = 200;
                if (parent instanceof Shell)
                        CmsSwtUtils.style(parent, CMS_USER_MENU);
                // new Label(this, SWT.NONE).setText(CmsMsg.username.lead());
@@ -279,7 +279,7 @@ public class CmsLogin implements CmsStyles, CallbackHandler {
                                loginContext = new LoginContext(CmsAuth.LOGIN_CONTEXT_USER, subject, this);
                        loginContext.login();
                        cmsView.authChange(loginContext);
-                       cmsContext.sendEvent("cms", Collections.singletonMap("msg", "New login"));
+                       cmsContext.getCmsEventBus().sendEvent("cms", Collections.singletonMap("msg", "New login"));
                        return true;
                } catch (LoginException e) {
                        if (log.isTraceEnabled())