Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-22 12:52:39 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-22 12:52:39 (GMT)
commit336e98675742987620350ca08693f1af2a9723d6 (patch)
tree29dfd4aaa3e857e21262c510090c101282432b71 /webtoolbar.py
parentcb2b6c8639964cf5c6562a0a91354ffc3990726b (diff)
Fix history retrieval limits in history palettes.
Diffstat (limited to 'webtoolbar.py')
-rw-r--r--webtoolbar.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index ffa8131..7bf6b49 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -397,9 +397,10 @@ class PrimaryToolbar(ToolbarBox):
self._stop_and_reload.set_tooltip(_('Reload'))
def _reload_session_history(self):
+ logging.debug('Updating history palettes.')
+
browser = self._tabbed_view.props.current_browser
history = browser.get_back_forward_list()
- limit = history.get_limit()
back_palette = self._back.get_palette()
forward_palette = self._forward.get_palette()
@@ -408,12 +409,19 @@ class PrimaryToolbar(ToolbarBox):
for menu_item in palette.menu.get_children():
palette.menu.remove(menu_item)
+
+ back_length = history.get_back_length()
+ forward_length = history.get_forward_length()
+
self._populate_history_palette(
- history.get_back_list_with_limit(limit), back_palette)
+ history.get_back_list_with_limit(back_length),
+ back_palette)
self._populate_history_palette(
- history.get_forward_list_with_limit(limit), forward_palette)
+ history.get_forward_list_with_limit(forward_length),
+ forward_palette)
def _populate_history_palette(self, history_list, palette):
+ logging.debug('Populating a history palette.')
for history_item in history_list:
menu_item = MenuItem(history_item.get_title(), text_maxlen=60)
menu_item.connect('activate', self.__history_item_activated_cb,