From cb28d8af598958d5767a2e4b65232fb375c9a5f9 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Mon, 10 Sep 2012 17:52:45 -0300
Subject: [PATCH Browse] Busy indication SL #851
Show WATCH Cursor when the page is loading and LEFT_PTR when the
load finishes.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
---
browser.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/browser.py b/browser.py
index 7379d2b..90378cb 100644
a
|
b
|
class TabLabel(Gtk.HBox): |
404 | 404 | def __load_status_changed_cb(self, widget, param): |
405 | 405 | status = widget.get_load_status() |
406 | 406 | if status == WebKit.LoadStatus.FAILED: |
| 407 | self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR)) |
407 | 408 | self._label.set_text(self._title) |
408 | 409 | elif WebKit.LoadStatus.PROVISIONAL <= status \ |
409 | 410 | < WebKit.LoadStatus.FINISHED: |
| 411 | self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH)) |
410 | 412 | self._label.set_text(_('Loading...')) |
411 | 413 | elif status == WebKit.LoadStatus.FINISHED: |
412 | 414 | if widget.props.title == None: |
413 | 415 | self._label.set_text(_('Untitled')) |
414 | 416 | self._title = _('Untitled') |
| 417 | self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR)) |
| 418 | |
415 | 419 | |
416 | 420 | |
417 | 421 | class Browser(WebKit.WebView): |