#4087 closed defect (fixed)
Browse: AttributeError in the logs
Reported by: | manuq | Owned by: | humitos |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Browse | Version: | 0.97.x |
Severity: | Unspecified | Keywords: | 13.1.0, r+ |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Unconfirmed |
Description
Traceback (most recent call last): File "/home/manuq/Activities/Browse.activity/browser.py", line 207, in __load_status_changed_cb self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH)) AttributeError: 'NoneType' object has no attribute 'set_cursor'
Would be nice to know which commit introduced it, and fix.
Attachments (2)
Change History (8)
comment:1 Changed 11 years ago by garycmartin
Changed 11 years ago by humitos
Checks if the widget is attached to the main window before trying to change the cursor
comment:2 Changed 11 years ago by humitos
- Keywords r? added
comment:3 Changed 11 years ago by manuq
Have you tried listening to the signals the GtkNotebook emits when a tab is selected to attach the callbacks instead of adding these conditionals? Otherwise we are writting inefficient code. This one may be useful:
http://developer.gnome.org/gtk3/stable/GtkNotebook.html#GtkNotebook-switch-page
I think webtoolbar.py uses it too.
Changed 11 years ago by humitos
comment:4 Changed 11 years ago by humitos
After a discussion with manuq via email I'm uploading a new patch that handles the signals as manuq suggested me.
comment:5 Changed 11 years ago by manuq
- Keywords r+ added; r? removed
- Resolution set to fixed
- Status changed from new to closed
Thanks. yes I think this is better, reconnecting the callback to the current webkit view to update the cursor, in the same way the toolbar elements do. Tested here and the AttributError is there, so the check for window None is needed. Added it and pushed as b258beebe .
It was 'Busy indication SL #851' commit a07d27 on Sept 10th.