diff options
author | Manuel Quiñones <manuq@laptop.org> | 2012-01-04 02:45:36 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2012-01-04 02:45:36 (GMT) |
commit | e23ae0747e4648c3f15a11b49c4aaf196dd3423a (patch) | |
tree | bc2d96e0c29757ca993ddefeb18ee82aba7d115c /webactivity.py | |
parent | b830858e6b807636169d9dd5bdedacf12d1c2565 (diff) |
Improve session store and restore
This is the review from Simon Schampijer of commit
14102bcd65f015dcbf12d1406df8ef7ffb64d13d .
* the sessionstore code is moved into Browser, we do have
set_history_index/get_history_index already there, the TabbedView
does use that path for their requests about the history
* Rename a few bits s/session/history and the return value from
self.get_back_forward_list() Use back_forward_list as variable
* Fold _get_history and _set_history into their appropriate 'mother'
methods
* Make set_history_index a bit cleaner, the API provided by webkitgtk
does not seem to cleanly allow our usage like:
get_current_item_index and go_to_back_forward_item(index) also the
API does seem to miss a back_forward_list.get_length() (see the code
we have to do in _items_history_as_list) there only exist a
back_forward_list.get_back_length() and
back_forward_list.get_forward_length().
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webactivity.py b/webactivity.py index 9ccbe4c..48eb780 100644 --- a/webactivity.py +++ b/webactivity.py @@ -399,7 +399,7 @@ class WebActivity(activity.Activity): link['color'], link['title'], link['owner'], -1, link['hash']) logging.debug('########## reading %s', data) - self._tabbed_view.set_session(self.model.data['history']) + self._tabbed_view.set_history(self.model.data['history']) for number, tab in enumerate(self.model.data['currents']): scrolled_window = self._tabbed_view.get_nth_page(number) browser = scrolled_window.get_child() @@ -431,7 +431,7 @@ class WebActivity(activity.Activity): else: self.metadata['title'] = browser.props.title - self.model.data['history'] = self._tabbed_view.get_session() + self.model.data['history'] = self._tabbed_view.get_history() current_tab = self._tabbed_view.get_current_page() self.model.data['current_tab'] = current_tab |