[Sugar-devel] [PATCH browse 4/5] Restore reload/stop loading functionality
Manuel Quiñones
manuq at laptop.org
Wed Dec 21 07:54:43 EST 2011
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
webtoolbar.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/webtoolbar.py b/webtoolbar.py
index 869da8b..47ece72 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -347,7 +347,7 @@ class PrimaryToolbar(ToolbarBase):
status = widget.get_load_status()
if status <= WebKit.LoadStatus.COMMITTED:
self._set_title(None)
- self._set_loading(status >= WebKit.LoadStatus.FINISHED)
+ self._set_loading(status < WebKit.LoadStatus.FINISHED)
self._update_navigation_buttons()
def __progress_changed_cb(self, widget, param):
@@ -410,10 +410,9 @@ class PrimaryToolbar(ToolbarBase):
def _stop_and_reload_cb(self, entry, icon_pos, button):
browser = self._tabbed_view.props.current_browser
if self._loading:
- browser.web_navigation.stop(interfaces.nsIWebNavigation.STOP_ALL)
+ browser.stop_loading()
else:
- flags = interfaces.nsIWebNavigation.LOAD_FLAGS_NONE
- browser.web_navigation.reload(flags)
+ browser.reload()
def _set_loading(self, loading):
self._loading = loading
--
1.7.7.4
More information about the Sugar-devel
mailing list