Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

0001-AttributError-fixed.patch (1.7 KB) - added by humitos 11 years ago.
Checks if the widget is attached to the main window before trying to change the cursor
0001-load-status-signal-handled-properly.patch (3.1 KB) - added by humitos 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by garycmartin

It was 'Busy indication SL #851' commit a07d27 on Sept 10th.

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.

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 .

comment:6 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.