A few changes

This commit is contained in:
meles5 2015-10-17 17:33:05 +02:00
parent 326757917c
commit ff4c002096
3 changed files with 7 additions and 10 deletions

View File

@ -2,7 +2,7 @@ global-exclude __pycache__ *.pyc *.pyo
recursive-include qutebrowser *.py
recursive-include qutebrowser/html *.html
recursive-include qutebrowser/img *.svg
recursive-include qutebrowser/img *.svg *.png
recursive-include qutebrowser/test *.py
recursive-include qutebrowser/javascript *.js
graft icons

View File

@ -25,10 +25,8 @@
import os
from PyQt5.QtCore import QUrl
from qutebrowser.browser.network import schemehandler, networkreply
from qutebrowser.utils import utils, jinja
from qutebrowser.utils import jinja
def get_file_list(basedir, all_files, filterfunc):
@ -76,7 +74,6 @@ def dirbrowser_html(path):
# pylint: disable=no-member
# https://bitbucket.org/logilab/pylint/issue/490/
if is_root(path):
parent = None
else:

View File

@ -63,11 +63,11 @@ def _guess_autoescape(template_name):
def resource_url(path):
# If Windows is the operating system, replace slashes with backslashes
if os.name == "nt":
path = path.replace("/", os.sep)
path = path[:-1]
"""Load images from a relative path (to qutebrowser).
Arguments:
path: The relative path to the image
"""
image = utils.resource_filename(path)
return QUrl.fromLocalFile(image).toString(QUrl.FullyEncoded)