Ticket #851: 0001-Busy-indication-SL-851.patch

File 0001-Busy-indication-SL-851.patch, 1.3 KB (added by humitos, 11 years ago)
  • browser.py

    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): 
    404404    def __load_status_changed_cb(self, widget, param):
    405405        status = widget.get_load_status()
    406406        if status == WebKit.LoadStatus.FAILED:
     407            self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
    407408            self._label.set_text(self._title)
    408409        elif WebKit.LoadStatus.PROVISIONAL <= status \
    409410                < WebKit.LoadStatus.FINISHED:
     411            self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
    410412            self._label.set_text(_('Loading...'))
    411413        elif status == WebKit.LoadStatus.FINISHED:
    412414            if widget.props.title == None:
    413415                self._label.set_text(_('Untitled'))
    414416                self._title = _('Untitled')
     417            self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
     418
    415419
    416420
    417421class Browser(WebKit.WebView):