Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-12 23:03:21 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-12 23:03:21 (GMT)
commitb5e4ddf131d4ee334962fd4d9e80ed0793342d0c (patch)
tree2e0b97fad73e5a49d7c85543c1ddf8728b251cdf /browser.py
parent48a9ee168f581731e790057f0562d1e8362f6e33 (diff)
Add workaround for the lack of WebBackForwardList.clear() in webkitgtk+ less than 1.3.1.
Diffstat (limited to 'browser.py')
-rw-r--r--browser.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/browser.py b/browser.py
index 49ed9c9..c80fe8b 100644
--- a/browser.py
+++ b/browser.py
@@ -243,8 +243,16 @@ class Browser(webkit.WebView):
return entries
def set_session(self, data):
- history = self.get_back_forward_list()
- history.clear()
+ history = webkit.WebBackForwardList()
+
+ # webkitgtk+ v1.3.1+
+ #history = self.get_back_forward_list()
+ #history.clear()
+
+ # temporary workaround to clear history
+ limit = history.get_limit()
+ history.set_limit(0)
+ history.set_limit(limit)
for entry_dict in data:
logging.debug('entry_dict: %r' % entry_dict)