set base uri for load_string

This commit is contained in:
josch 2013-04-06 20:05:22 +02:00
parent 1742a9cdba
commit 6e0f06bab5

View file

@ -179,12 +179,12 @@ class ContentPane (Gtk.Notebook):
view = child.get_child() view = child.get_child()
view.load_uri(text) view.load_uri(text)
def load_string (self, text): def load_string (self, text, baseuri):
"""load the given uri in the current web view""" """load the given uri in the current web view"""
#child = self.get_nth_page(self.get_current_page()) #child = self.get_nth_page(self.get_current_page())
child = self.get_nth_page(0); child = self.get_nth_page(0);
view = child.get_child() view = child.get_child()
view.load_string(text, "text/html", "utf-8", "") view.load_string(text, "text/html", "utf-8", baseuri)
def back(self): def back(self):
child = self.get_nth_page(self.get_current_page()) child = self.get_nth_page(self.get_current_page())
@ -1031,7 +1031,7 @@ class FeedReaderWindow(Gtk.Window):
content_string = "<h1>%s</h1><p>%s</p>"%(item['title'], ', '.join(item['categories'])) content_string = "<h1>%s</h1><p>%s</p>"%(item['title'], ', '.join(item['categories']))
else: else:
content_string = "<h1>%s</h1>"%item['title'] content_string = "<h1>%s</h1>"%item['title']
content_pane.load_string(content_string+item['content']) content_pane.load_string(content_string+item['content'], item['link'])
toolbar.location_set_text(item['link']) toolbar.location_set_text(item['link'])
self.set_title(_("PyFeRea - %s")%item['title']) self.set_title(_("PyFeRea - %s")%item['title'])
feedtree.update_view_all() feedtree.update_view_all()