]> source.dussan.org Git - vaadin-framework.git/commitdiff
Additional fix for #2954 - Change default theme to reindeer
authorArtur Signell <artur.signell@itmill.com>
Fri, 15 May 2009 08:07:44 +0000 (08:07 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 15 May 2009 08:07:44 +0000 (08:07 +0000)
svn changeset:7824/svn branch:6.0

src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
src/com/vaadin/terminal/gwt/server/CommunicationManager.java
src/com/vaadin/ui/LoginForm.java

index bdf81c7ccce80d01b3f110344a36c88586369d2c..4413edf172d9bcb4aff045d857869a1587d453be 100644 (file)
@@ -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;
     }
 
     /**
index 0a69778e1389be04c3e6ed331311d6eb90a23600..9ad8f7725e74ede161abd0469b959db630ae1f2d 100644 (file)
@@ -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
index 3a8103e1a62cb43ed0636d97947558d87940b8e8..6e2c06c24a9acd7873ceae61bfb71f1f28e7bbd0 100644 (file)
@@ -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();