From c382d34899b8acf3df34cd6d8ef01c1c80eef980 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 15 May 2009 07:15:35 +0000 Subject: [PATCH] Fixed #2954 - Change default theme to reindeer svn changeset:7822/svn branch:6.0 --- .../gwt/server/AbstractApplicationServlet.java | 13 ++++++++++++- .../terminal/gwt/server/CommunicationManager.java | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index 96c0440b57..bdf81c7ccc 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -153,6 +153,8 @@ 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 String resourcePath = null; /** @@ -746,12 +748,21 @@ public abstract class AbstractApplicationServlet extends HttpServlet { } if (themeName == null) { - themeName = "default"; + themeName = getDefaultTheme(); } return themeName; } + /** + * Returns the default theme. Must never return null. + * + * @return + */ + String getDefaultTheme() { + return DEFAULT_THEME; + } + /** * Calls URI handlers for the request. If an URI handler returns a * DownloadStream the stream is passed to the client for downloading. diff --git a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java index 1e11814bf7..0a69778e13 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 = "default"; + themeName = applicationServlet.getDefaultTheme(); } // TODO We should only precache the layouts that are not -- 2.39.5