Author: bombe
Date: 2006-08-09 21:50:27 +0000 (Wed, 09 Aug 2006)
New Revision: 10010

Modified:
   trunk/freenet/src/freenet/clients/http/PageMaker.java
   trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
Log:
oops. make theme changeable on-the-fly again.

Modified: trunk/freenet/src/freenet/clients/http/PageMaker.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PageMaker.java       2006-08-09 
21:31:32 UTC (rev 10009)
+++ trunk/freenet/src/freenet/clients/http/PageMaker.java       2006-08-09 
21:50:27 UTC (rev 10010)
@@ -33,14 +33,18 @@
        private List jarThemesCache = null;

        PageMaker(String t) {
-               if (t == null) {
+               setTheme(t);
+       }
+       
+       void setTheme(String theme) {
+               if (theme == null) {
                        this.theme = DEFAULT_THEME;
                } else {
-                       URL themeurl = 
getClass().getResource("staticfiles/themes/"+t+"/theme.css");
+                       URL themeurl = 
getClass().getResource("staticfiles/themes/" + theme + "/theme.css");
                        if (themeurl == null)
                                this.theme = DEFAULT_THEME;
                        else
-                               this.theme = t;
+                               this.theme = theme;
                }
        }


Modified: trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java     
2006-08-09 21:31:32 UTC (rev 10009)
+++ trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java     
2006-08-09 21:50:27 UTC (rev 10010)
@@ -113,6 +113,7 @@
                        if((CSSName.indexOf(':') != -1) || 
(CSSName.indexOf('/') != -1))
                                throw new InvalidConfigValueException("CSS name 
must not contain slashes or colons!");
                        cssName = CSSName;
+                       pageMaker.setTheme(cssName);
                }
        }



Reply via email to