diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-05-15 08:07:44 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-05-15 08:07:44 +0000 |
commit | 172d7a935c1829c5e0b95a6b8be6ae43d99c10c0 (patch) | |
tree | 7d4f882629816aad34b78756cdda30de1b534aee | |
parent | c382d34899b8acf3df34cd6d8ef01c1c80eef980 (diff) | |
download | vaadin-framework-172d7a935c1829c5e0b95a6b8be6ae43d99c10c0.tar.gz vaadin-framework-172d7a935c1829c5e0b95a6b8be6ae43d99c10c0.zip |
Additional fix for #2954 - Change default theme to reindeer
svn changeset:7824/svn branch:6.0
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java | 6 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/CommunicationManager.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/ui/LoginForm.java | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index bdf81c7ccc..4413edf172 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -153,7 +153,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet { private static final String ERROR_NO_WINDOW_FOUND = "Application did not give any window, did you remember to setMainWindow()?"; - private static final String DEFAULT_THEME = "reindeer"; + private static final String DEFAULT_THEME_NAME = "reindeer"; private String resourcePath = null; @@ -759,8 +759,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet { * * @return */ - String getDefaultTheme() { - return DEFAULT_THEME; + public static String getDefaultTheme() { + return DEFAULT_THEME_NAME; } /** diff --git a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java index 0a69778e13..9ad8f7725e 100644 --- a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java @@ -533,7 +533,7 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, themeName = request.getParameter("theme"); } if (themeName == null) { - themeName = applicationServlet.getDefaultTheme(); + themeName = AbstractApplicationServlet.getDefaultTheme(); } // TODO We should only precache the layouts that are not diff --git a/src/com/vaadin/ui/LoginForm.java b/src/com/vaadin/ui/LoginForm.java index 3a8103e1a6..6e2c06c24a 100644 --- a/src/com/vaadin/ui/LoginForm.java +++ b/src/com/vaadin/ui/LoginForm.java @@ -13,6 +13,7 @@ import com.vaadin.terminal.ApplicationResource; import com.vaadin.terminal.DownloadStream; import com.vaadin.terminal.ParameterHandler; import com.vaadin.terminal.URIHandler; +import com.vaadin.terminal.gwt.server.AbstractApplicationServlet; /** * LoginForm is a Toolkit component to handle common problem among Ajax @@ -125,12 +126,14 @@ public class LoginForm extends CustomComponent { */ protected byte[] getLoginHTML() { + String defaultThemeName = AbstractApplicationServlet.getDefaultTheme(); + String theme = getApplication().getMainWindow().getTheme(); String guessedThemeUri = getApplication().getURL() + "VAADIN/themes/" - + (theme == null ? "default" : theme) + "/styles.css"; + + (theme == null ? defaultThemeName : theme) + "/styles.css"; String guessedThemeUri2 = getApplication().getURL() - + "../VAADIN/themes/" + (theme == null ? "default" : theme) - + "/styles.css"; + + "../VAADIN/themes/" + + (theme == null ? defaultThemeName : theme) + "/styles.css"; String appUri = getApplication().getURL().toString(); |