Merge lp:~cando/unity/fix_692444 into lp:unity
Status: | Rejected |
---|---|
Rejected by: | Brandon Schaefer |
Proposed branch: | lp:~cando/unity/fix_692444 |
Merge into: | lp:unity |
Diff against target: |
178 lines (+65/-15) 3 files modified
src/LauncherController.cpp (+2/-2) src/TrashLauncherIcon.cpp (+53/-11) src/TrashLauncherIcon.h (+10/-2) |
To merge this branch: | bzr merge lp:~cando/unity/fix_692444 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Launi (community) | Needs Fixing | ||
Mirco Müller (community) | Approve | ||
Jason Smith (community) | Approve | ||
Review via email: mp+48767@code.launchpad.net |
Description of the change
In this branch i've fixed the problem with the multiple click on the trash icon.
Here's how it works:
1)when the user clicks on the trash icon, i connect to the "ViewOpened" signal emitted by the BamfMatcher.
2) In the callback i check if the name of the opened view is equal to the localized version of "Trash": if so i connect to the "Closed" signal of this view and set QUIRK_RUNNING to true.
3)when the window is closed i simply put the QUIRK_RUNNING to false.
It works flawlessy, but i don't like the point 2)...it's just an hack and it works fine with Nautilus but i really don't know if others FileManager nominate their windows with the directory's name they are opening. Finally, i know that's almost impossible that, in the very small time range from the user click on the trashbin and the opening of the window, the user opens another window named "Trash", but i think that there could be a better solution.
Maybe modifying BAMF : we could expose the get_window_pid method from BamfLegacyWindow and then compare this pid to the one obtained from g_spawn_
Anyway, maybe you like this solution....
Unmerged revisions
- 825. By Stefano Candori
-
Quick Fix:removed unused variable
- 824. By Stefano Candori
-
Quick Fix:removed unused #include
- 823. By Stefano Candori
-
Fix #692444
Overall this looks ok. But I agree that point 2.) is a hack. Your suggestion with the process-id sounds better. I'd like to hear form Jason, who knows bamf much better then me, what's his view on this. I'll wait with approving until he had a look over it.