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();
// 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());
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())