Find favicon.ico in a more OS friendly way.

svn: r20400
This commit is contained in:
Gary Burton 2012-09-16 07:58:25 +00:00
parent 36228d2808
commit e6864165ee
2 changed files with 9 additions and 8 deletions

View File

@ -186,6 +186,7 @@ WEB_DIR = os.path.join(ROOT_DIR, 'webapp')
#SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml") #SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml")
TIP_DATA = os.path.join(DATA_DIR, "tips.xml") TIP_DATA = os.path.join(DATA_DIR, "tips.xml")
WEBSTUFF_DIR = os.path.join(PLUGINS_DIR, "webstuff") WEBSTUFF_DIR = os.path.join(PLUGINS_DIR, "webstuff")
WEBSTUFF_IMAGE_DIR = os.path.join(WEBSTUFF_DIR, "images")
PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml") PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml")

View File

@ -47,7 +47,7 @@ from gen.ggettext import gettext as _
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.utils.image import resize_to_jpeg from gen.utils.image import resize_to_jpeg
from gen.const import DATA_DIR, WEBSTUFF_DIR, PROGRAM_NAME, URL_HOMEPAGE, VERSION from gen.const import DATA_DIR, WEBSTUFF_IMAGE_DIR, PROGRAM_NAME, URL_HOMEPAGE, VERSION
from gen.plug.docgen import BaseDoc, TextDoc, FONT_SANS_SERIF, URL_PATTERN from gen.plug.docgen import BaseDoc, TextDoc, FONT_SANS_SERIF, URL_PATTERN
from libhtmlbackend import HtmlBackend, process_spaces from libhtmlbackend import HtmlBackend, process_spaces
from libhtml import Html from libhtml import Html
@ -296,7 +296,7 @@ class HtmlDoc(BaseDoc, TextDoc):
if os.path.exists(fullpath): if os.path.exists(fullpath):
self.copy_file(fullpath, _HTMLSCREEN) self.copy_file(fullpath, _HTMLSCREEN)
#favicon #favicon
self.copy_file(os.path.join(WEBSTUFF_DIR + "/images", 'favicon.ico'), self.copy_file(os.path.join(WEBSTUFF_IMAGE_DIR, 'favicon.ico'),
'favicon.ico') 'favicon.ico')
def __reduce_list(self): def __reduce_list(self):