about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch')
-rw-r--r--nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch b/nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch
new file mode 100644
index 000000000000..0f894c46a53b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/pytrainer/pytrainer-webkit.patch
@@ -0,0 +1,14 @@
+diff -Nurp pytrainer-1.10.0-orig/pytrainer/extensions/mapviewer.py pytrainer-1.10.0/pytrainer/extensions/mapviewer.py
+--- pytrainer-1.10.0-orig/pytrainer/extensions/mapviewer.py	2013-03-31 12:28:29.000000000 +0200
++++ pytrainer-1.10.0/pytrainer/extensions/mapviewer.py	2014-12-22 11:44:44.367032126 +0100
+@@ -46,7 +46,9 @@ class MapViewer:
+ 		logging.debug(">>")
+ 		if htmlfile is None:
+ 			htmlfile = self.createErrorHtml()
+-		self.wkview.load_uri("file://%s" % (htmlfile))
++		content = open(htmlfile, 'r').read()
++		self.wkview.load_string(content, 'text/html', 'UTF-8', 'file:///')
++		#self.wkview.load_uri("file://%s" % (htmlfile))
+ 		#self.box.show_all()
+ 		logging.debug("<<")
+