From 0f94cf2316ce823435b0a9d330295678066e6999 Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Mon, 27 Oct 2008 00:26:01 +0000 Subject: [PATCH] allow favicon.png --- deluge/ui/gtkui/filtertreeview.py | 2 +- deluge/ui/webui/pages.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deluge/ui/gtkui/filtertreeview.py b/deluge/ui/gtkui/filtertreeview.py index 38e0f4614..99ac66e81 100644 --- a/deluge/ui/gtkui/filtertreeview.py +++ b/deluge/ui/gtkui/filtertreeview.py @@ -38,7 +38,7 @@ import pkg_resources import deluge.component as component import deluge.common -from deluge.tracker_icons import TrackerIcons +from deluge.ui.tracker_icons import TrackerIcons from deluge.log import LOG as log from deluge.ui.client import aclient from deluge.configmanager import ConfigManager diff --git a/deluge/ui/webui/pages.py b/deluge/ui/webui/pages.py index b9f0c2c46..208c60e56 100644 --- a/deluge/ui/webui/pages.py +++ b/deluge/ui/webui/pages.py @@ -51,7 +51,7 @@ import os from deluge import component from deluge.ui.client import sclient as proxy from deluge.configmanager import ConfigManager -from deluge.tracker_icons import TrackerIcons +from deluge.ui.tracker_icons import TrackerIcons page_manager = component.get("PageManager") config = ConfigManager("webui06.conf") @@ -456,7 +456,10 @@ class tracker_icon: if filename: log.debug("file-name=%s" % name) web.header("Cache-Control" , "public, must-revalidate, max-age=86400") - web.header("Content-Type", "image/x-icon") + if filename.endswith(".ico"): + web.header("Content-Type", "image/x-icon") + elif filename.endswith(".png"): + web.header("Content-Type", "image/png") data = open(filename, "rb").read() print data else: