Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webactivity.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 /webactivity.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 'webactivity.py')
-rw-r--r--webactivity.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py
index a7c55bb..39bb67e 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -412,6 +412,12 @@ class WebActivity(activity.Activity):
'list of multiple uris by now.')
else:
self._browser.load_uri(file_path)
+ self._load_urls()
+
+ def _load_urls(self):
+ if self.model.data['currents'] != None:
+ for current in self.model.data['currents']:
+ self._browser.load_uri(current['url'])
def write_file(self, file_path):
if not self.metadata['mime_type']:
@@ -424,6 +430,10 @@ class WebActivity(activity.Activity):
self.model.data['history'] = self._browser.get_session()
+ self.model.data['currents'] = []
+ ui_uri = self._browser.get_url_from_nsiuri(self._browser.progress.location)
+ self.model.data['currents'].append({'title':self._browser.props.title,'url':ui_uri})
+ logging.error(self.model.data)
f = open(file_path, 'w')
try:
f.write(self.model.serialize())