allow the t...
Content-type: text/plain
Author: damoxc
Revision: 5136
Log:
fix starting the web via deluge -u web
allow the theme to be specified in the config file
Diff:
Modified: trunk/deluge/ui/web/server.py
===================================================================
--- trunk/deluge/ui/web/server.py 2009-04-22 07:12:15 UTC (rev 5135)
+++ trunk/deluge/ui/web/server.py 2009-04-23 07:26:14 UTC (rev 5136)
@@ -68,7 +68,7 @@
CONFIG_DEFAULTS = {
"port": 8112,
- "template": "slate",
+ "theme": "slate",
"pwd_salt": "16f65d5c79b7e93278a28b60fed2431e",
"pwd_md5": "2c9baa929ca38fb5c9eb5b054474d1ce",
"base": "",
@@ -220,7 +220,6 @@
__stylesheets = [
"/css/ext-all.css",
- "/css/xtheme-slate.css",
"/css/Spinner.css",
"/css/deluge.css"
]
@@ -283,6 +282,9 @@
self.putChild("render", Render())
self.putChild("themes", static.File(rpath("themes")))
self.putChild("tracker", Tracker())
+
+ theme = component.get("DelugeWeb").config["theme"]
+ self.__stylesheets.insert(1, "/css/xtheme-%s.css" % theme)
@property
def scripts(self):
@@ -313,11 +315,13 @@
return template.render(scripts=scripts, stylesheets=self.stylesheets)
class DelugeWeb(component.Component):
+
def __init__(self):
super(DelugeWeb, self).__init__("DelugeWeb")
+ self.config = ConfigManager("web.conf", CONFIG_DEFAULTS)
+
self.top_level = TopLevel()
self.site = server.Site(self.top_level)
- self.config = ConfigManager("web.conf", CONFIG_DEFAULTS)
self.port = self.config["port"]
self.web_api = WebApi()
Modified: trunk/deluge/ui/web/web.py
===================================================================
--- trunk/deluge/ui/web/web.py 2009-04-22 07:12:15 UTC (rev 5135)
+++ trunk/deluge/ui/web/web.py 2009-04-23 07:26:14 UTC (rev 5136)
@@ -55,5 +55,6 @@
if self.options.port: self.server.port = self.options.port
self.server.start()
-web = Web()
-start = web.start
\ No newline at end of file
+def start():
+ web = Web()
+ web.start()
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---