diff --git a/deluge/ui/webui/pages.py b/deluge/ui/webui/pages.py
index 0e142e0e1..706e3e552 100644
--- a/deluge/ui/webui/pages.py
+++ b/deluge/ui/webui/pages.py
@@ -39,6 +39,8 @@ from config import config_page
from torrent_options import torrent_options
from torrent_move import torrent_move
+from deluge.common import get_pixmap
+
#debugerror
from debugerror import deluge_debugerror
web.webapi.internalerror = deluge_debugerror
@@ -134,7 +136,8 @@ urls = [
"/", "home",
"", "home",
"/robots.txt","robots",
- "/template_style.css","template_style"
+ "/template_style.css","template_style",
+ "/pixmaps/(.*)","pixmaps"
]
#/routing
@@ -472,10 +475,18 @@ class template_style:
style = Storage()
print render.template_style(style)
+class pixmaps:
+ "use the deluge-images. located in data/pixmaps"
+ def GET(self, name):
+ web.header("Content-Type", "image/png")
+ f = open(get_pixmap(name) ,'rb')
+ print f.read()
+ f.close()
+
#/pages
-#for plugins..
-page_classes = dict(globals()) #test-1
+#for plugins:
+page_classes = dict(globals())
def register_page(url, klass):
urls.append(url)
@@ -486,17 +497,3 @@ def unregister_page(url):
raise NotImplemenetedError()
#page_classes[klass.__name__] = None
-"""
-class test:
- @deco.deluge_page
- def GET(self, name):
- return "HI"
-
-
-register_page('/test(.*)', test)
-
-
-print urls
-print page_classes['index']
-print page_classes['test']
-"""
\ No newline at end of file
diff --git a/deluge/ui/webui/render.py b/deluge/ui/webui/render.py
index 837326538..b738e1bd8 100644
--- a/deluge/ui/webui/render.py
+++ b/deluge/ui/webui/render.py
@@ -162,6 +162,7 @@ template.Template.globals.update({
'_': _ , #gettext/translations
'str': str, #because % in templetor is broken.
'int':int,
+ 'len':len,
'deluge_int':deluge_int,
'sorted': sorted,
'altrow':altrow,
diff --git a/deluge/ui/webui/static/images/dht16.png b/deluge/ui/webui/static/images/dht16.png
deleted file mode 100644
index be59e5e61..000000000
Binary files a/deluge/ui/webui/static/images/dht16.png and /dev/null differ
diff --git a/deluge/ui/webui/static/images/downloading16.png b/deluge/ui/webui/static/images/downloading16.png
deleted file mode 100644
index 53a2b6e61..000000000
Binary files a/deluge/ui/webui/static/images/downloading16.png and /dev/null differ
diff --git a/deluge/ui/webui/static/images/inactive16.png b/deluge/ui/webui/static/images/inactive16.png
deleted file mode 100644
index 10342be18..000000000
Binary files a/deluge/ui/webui/static/images/inactive16.png and /dev/null differ
diff --git a/deluge/ui/webui/static/images/seeding16.png b/deluge/ui/webui/static/images/seeding16.png
deleted file mode 100644
index 6994323de..000000000
Binary files a/deluge/ui/webui/static/images/seeding16.png and /dev/null differ
diff --git a/deluge/ui/webui/templates/advanced/part_stats.html b/deluge/ui/webui/templates/advanced/part_stats.html
index 0a38f0789..4600dbc28 100644
--- a/deluge/ui/webui/templates/advanced/part_stats.html
+++ b/deluge/ui/webui/templates/advanced/part_stats.html
@@ -7,11 +7,11 @@ $def with (stats)
$stats.num_connections ($deluge_int(stats.max_num_connections))
-
$stats.download_rate ($deluge_int(stats.max_download))
+
$stats.download_rate ($deluge_int(stats.max_download))
-
$stats.upload_rate ($deluge_int(stats.max_upload))
+
$stats.upload_rate ($deluge_int(stats.max_upload))
-
$stats.dht_nodes
+
$stats.dht_nodes
diff --git a/deluge/ui/webui/templates/advanced/part_torrent_list.html b/deluge/ui/webui/templates/advanced/part_torrent_list.html
index bd27abb48..92f6168c7 100644
--- a/deluge/ui/webui/templates/advanced/part_torrent_list.html
+++ b/deluge/ui/webui/templates/advanced/part_torrent_list.html
@@ -42,7 +42,7 @@ $for torrent in torrent_list: