Merge lp:~3v1n0/unity/unset-bamficon-on-removal into lp:unity
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2369 |
Proposed branch: | lp:~3v1n0/unity/unset-bamficon-on-removal |
Merge into: | lp:unity |
Diff against target: |
196 lines (+42/-33) 5 files modified
UnityCore/GLibSignal.cpp (+3/-5) UnityCore/GLibSignal.h (+1/-1) launcher/BamfLauncherIcon.cpp (+6/-3) launcher/LauncherController.cpp (+12/-24) tests/test_glib_signals.cpp (+20/-0) |
To merge this branch: | bzr merge lp:~3v1n0/unity/unset-bamficon-on-removal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+107071@code.launchpad.net |
Commit message
BamfLauncherIcon: Unset the BamfApplication when removing the icon.
Doing this manually, we prevent that a duplicated application can be added between the removal of the BamfLauncherIcon and the effective destruction (that is controlled by a timeout in LauncherModel).
Description of the change
In some rare cases, when a BamfLauncherIcon is set as removed and before of being actually destroyed by the LauncherModel (that uses a timeout), it could happen that two BamfLauncherIcon's that wrap the same BamfApplication could be created. And this causes a duplicated Launcher Icon.
Unsetting the signals on removal and the BamfApplication, would avoid this.
We already have tests for duplicated icons checks. This case can't be easily reproduced.
Updated also the glib::SignalManager so that it's possible to disconnect from all signals of a given object (tests included).
Looks good.