From 18c756760b78ebdf7680a6cfc44600d90e5cbbb0 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Wed, 06 Oct 2010 17:39:37 +0000 Subject: 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. --- (limited to 'webactivity.py') 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()) -- cgit v0.9.1