Merge lp://staging/~sinzui/bzr-gtk/fix-threads-icons into lp://staging/bzr-gtk/gtk2
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | 740 |
Merged at revision: | 738 |
Proposed branch: | lp://staging/~sinzui/bzr-gtk/fix-threads-icons |
Merge into: | lp://staging/bzr-gtk/gtk2 |
Diff against target: |
268 lines (+110/-21) 6 files modified
avatarproviders.py (+29/-16) avatarsbox.py (+11/-4) tests/__init__.py (+1/-0) tests/test_annotate_config.py (+8/-1) tests/test_avatarsbox.py (+47/-0) tests/test_revisionview.py (+14/-0) |
To merge this branch: | bzr merge lp://staging/~sinzui/bzr-gtk/fix-threads-icons |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | Approve | ||
Review via email: mp+73975@code.staging.launchpad.net |
Description of the change
Fix running threads and missing images reported by test suite.
added:
tests/
modified:
avatarprovide
avatarsbox.py
tests/__init__.py
tests/
tests/
Setup the window before the working directory is changed, or patch the window
to use a fake implementation of icon_path that know where the icons are.
tests/
tests/
AvatarDownloade
* I refactored the code to just use __stop and removed __end_thread.
* The fix for the worker was to ensure that stop was called during the
widget's destroy event.
* The queue was troublesome because the worker's run() method was blocking on
it--join() would never return.
* The fix was to not start the thread until something was queued,
* The stop() method dequeues the avatars so that the queue knows it
is finished.
* The run() method uses a non-blocking call to something from the queue.
The loop recovered from the Queue.Empty error.
avatarprovide
avatarsbox.py
tests/
tests/
ADDENDUM: The __eq__ method was checking the widget's name attr
(which is always None) instead of the username attr.
tests/__init__.py
tests/
avatarsbox.py
Hi Curtis,
Thanks for fixing this. You should be able to land this yourself, now that you're in the ~bzr-gtk team.