use data/pixmaps instead of copied images
This commit is contained in:
parent
87e7fd5869
commit
1872a2634a
|
@ -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']
|
||||
"""
|
|
@ -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,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 607 B |
Binary file not shown.
Before Width: | Height: | Size: 662 B |
Binary file not shown.
Before Width: | Height: | Size: 588 B |
Binary file not shown.
Before Width: | Height: | Size: 612 B |
|
@ -7,11 +7,11 @@ $def with (stats)
|
|||
|
||||
<img src="/static/images/tango/connections.png" title="$_('Connections')">$stats.num_connections ($deluge_int(stats.max_num_connections))
|
||||
|
||||
<img src="/static/images/downloading16.png" title="$_('Down Speed')">$stats.download_rate ($deluge_int(stats.max_download))
|
||||
<img src="/pixmaps/downloading16.png" title="$_('Down Speed')">$stats.download_rate ($deluge_int(stats.max_download))
|
||||
|
||||
<img src="/static/images/seeding16.png" title="$_('Up Speed')">$stats.upload_rate ($deluge_int(stats.max_upload))
|
||||
<img src="/pixmaps/seeding16.png" title="$_('Up Speed')">$stats.upload_rate ($deluge_int(stats.max_upload))
|
||||
|
||||
<img src="/static/images/dht16.png" title="$_('DHT Nodes')">$stats.dht_nodes
|
||||
<img src="/pixmaps/dht16.png" title="$_('DHT Nodes')">$stats.dht_nodes
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ $for torrent in torrent_list:
|
|||
<form action="/torrent/$torrent.action/$torrent.id" method="POST"
|
||||
class="pause_resume">
|
||||
<input type="image"
|
||||
src="/static/images/$(torrent.calc_state_str)16.png"
|
||||
src="/pixmaps/$(torrent.calc_state_str)16.png"
|
||||
name="pauseresume" value="submit" />
|
||||
</form>
|
||||
</td>
|
||||
|
|
|
@ -26,7 +26,7 @@ $for torrent in torrent_list:
|
|||
<td>
|
||||
<form action="/torrent/$torrent.action/$torrent.id" method="POST" class="pause_resume">
|
||||
<input type="image"
|
||||
src="/static/images/$(torrent.calc_state_str)16.png"
|
||||
src="/pixmaps/$(torrent.calc_state_str)16.png"
|
||||
name="pauseresume" value="submit" /></form></td>
|
||||
<td>$torrent.queue</td>
|
||||
<td style="width:100px; overflow:hidden;white-space: nowrap">
|
||||
|
|
|
@ -61,7 +61,7 @@ $if organize_filters:
|
|||
|
||||
<br />
|
||||
|
||||
|
||||
<img src="/pixmaps/deluge.png">
|
||||
|
||||
<script language='javascript'>
|
||||
/*on_click_action = open_details;*/
|
||||
|
|
|
@ -80,7 +80,7 @@ XX#torrent_table td {
|
|||
}
|
||||
|
||||
tr.altrow1 {
|
||||
background-color:#F0F0F0;
|
||||
background-color:#FAFAFA; /*offf-topic-hint:allo allo*/
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue