lp://qastaging/~mikemc/ubuntuone-control-panel/fix-sync-status
- Get this branch:
- bzr branch lp://qastaging/~mikemc/ubuntuone-control-panel/fix-sync-status
Branch merges
- Alejandro J. Cura (community): Approve
- Roberto Alsina (community): Approve
-
Diff: 313 lines (+92/-56)9 files modifiedubuntuone/controlpanel/backend.py (+21/-17)
ubuntuone/controlpanel/dbus_service.py (+1/-2)
ubuntuone/controlpanel/dbustests/test_dbus_service.py (+12/-25)
ubuntuone/controlpanel/gui/qt/filesyncstatus.py (+1/-1)
ubuntuone/controlpanel/gui/qt/systray.py (+1/-1)
ubuntuone/controlpanel/gui/qt/tests/__init__.py (+1/-0)
ubuntuone/controlpanel/gui/qt/tests/test_filesyncstatus.py (+4/-3)
ubuntuone/controlpanel/gui/qt/tests/test_systray.py (+4/-4)
ubuntuone/controlpanel/tests/test_backend.py (+47/-3)
Related bugs
Related blueprints
Branch information
Recent revisions
- 356. By Mike McCracken
-
Added support in controlbackend for multiple status handlers.
Both the filsyncstatus.py widget in the main window and the menu item
in systray.py try to set the handler. This results in the
filesyncstatus widget no longer being updated, as the single variable
holding the callback in controlbackend is overwritten.The issue does not appear on linux, because although the
controlbackend only has one variable, when it is changed, it wraps the
new callback and calls sd_client.set_status_ changed_ handler( ) with
that wrapper. On linux, the dbus implementation of the proxy that
sd_client uses *ADDS* the wrapper, while on the other platforms the
twisted implementation just overwrites the old handler.This branch changes it so that we only ever set the sd_client callback
once, to a function in controlbackend that calls each of a list of
callbacks.The filesyncstatus and systray widgets now call an
add_status_changed_ handler function that adds to that list instead of
setting the single callback via a property.Tests are included that use the new API, but would break if the new
API behaved the same as the old one.IRL test shows this working on darwin. I had great difficulty getting
windows running from source, so I didn't do an IRL test on windows.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://qastaging/ubuntuone-control-panel