Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2010-10-06 17:39:37 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2010-10-06 17:39:37 (GMT)
commit18c756760b78ebdf7680a6cfc44600d90e5cbbb0 (patch)
tree82bf55cf63800431359ddde6149e9f9342ab7f53 /browser.py
parent85cfa5b196e978424efd9f01af5cc93020dabedf (diff)
fix #2383 : Browse: history not right when resuming
Previously Browse does not saved the current tabs opened, saved the history and assumes the last url in the history is the current.
Diffstat (limited to 'browser.py')
-rw-r--r--browser.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/browser.py b/browser.py
index b0a7ae7..3781e2e 100644
--- a/browser.py
+++ b/browser.py
@@ -172,6 +172,14 @@ class Browser(WebView):
uri = self.web_navigation.currentURI
persist.saveURI(uri, self.doc_shell, None, None, None, local_file)
+ def get_url_from_nsiuri(self, uri):
+ """
+ get a nsIURI object and return a string with the url
+ """
+ cls = components.classes['@mozilla.org/intl/texttosuburi;1']
+ texttosuburi = cls.getService(interfaces.nsITextToSubURI)
+ return texttosuburi.unEscapeURIForUI(uri.originCharset, uri.spec)
+
def zoom_in(self):
contentViewer = self.doc_shell.queryInterface( \
interfaces.nsIDocShell).contentViewer