[Sugar-devel] [PATCH Browse] Busy indication SL #851
Manuel Kaufmann
humitos at gmail.com
Mon Sep 10 16:55:29 EDT 2012
Show WATCH Cursor when the page is loading and LEFT_PTR when the
load finishes.
Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
browser.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/browser.py b/browser.py
index 7379d2b..90378cb 100644
--- a/browser.py
+++ b/browser.py
@@ -404,14 +404,18 @@ class TabLabel(Gtk.HBox):
def __load_status_changed_cb(self, widget, param):
status = widget.get_load_status()
if status == WebKit.LoadStatus.FAILED:
+ self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
self._label.set_text(self._title)
elif WebKit.LoadStatus.PROVISIONAL <= status \
< WebKit.LoadStatus.FINISHED:
+ self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
self._label.set_text(_('Loading...'))
elif status == WebKit.LoadStatus.FINISHED:
if widget.props.title == None:
self._label.set_text(_('Untitled'))
self._title = _('Untitled')
+ self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
+
class Browser(WebKit.WebView):
--
1.7.11.4
More information about the Sugar-devel
mailing list