Merge lp:~andreagrandi/unity-2d/main into lp:unity-2d/3.0
Proposed by
Andrea Grandi
Status: | Merged |
---|---|
Approved by: | Ugo Riboni |
Approved revision: | 587 |
Merged at revision: | 585 |
Proposed branch: | lp:~andreagrandi/unity-2d/main |
Merge into: | lp:unity-2d/3.0 |
Diff against target: |
128 lines (+54/-5) 2 files modified
launcher/UnityApplications/trash.cpp (+46/-4) launcher/UnityApplications/trash.h (+8/-1) |
To merge this branch: | bzr merge lp:~andreagrandi/unity-2d/main |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ugo Riboni (community) | Approve | ||
Review via email: mp+63312@code.launchpad.net |
Description of the change
I've fixed bug #715611. Now when you delete something and you're using Unity-2D the Trash icon is updated as expected: if there are some files in the Trash the icon is the full Trash one, else is the empty one.
To post a comment you must log in.
Hi, thanks for the patch :)
I tested it and it works well.
Here's a few things that need to be changed in the code (some are bugs, some are just style issues).
* You are never deleting the monitor that you create with monitor_ directory (file, G_FILE_ MONITOR_ NONE, NULL, NULL);
monitor = g_file_
You should probably save it to a member variable and call g_object_unref on it in the Trash destructor.
* Can you please change the name of the function initTrashIcon to updateTrashIcon ? (It's updating the icon many times, not initializing it only once)
* You don't need to pass to fileChanged all the same arguments as fileChangedProxy. In fact you can just have fileChanged without any arguments and check if the event_type is the right type in fileChangedProxy.
* We have some coding guidelines in place and we can only accept software that conform to these. You can find the guidelines in the CODING file in the root of the lp:unity-2d repo. g_trash with startMonitoring Trash, names of member variables to start with "m_" (like m_iconName instead of iconName), names of local variables like _this to something like currentInstance or something similar.
For example you need to change function names like start_monitorin
Please have a look at the guidelines for other coding standards we follow (like how to put parenthesis after if/else and so on).
* Finally, if you did not submit it already, you have to take care of accepting the Canonical contributor agreement. You can find instructions at http:// www.canonical. com/contributor s . Hopefully you are ok with that.
Thanks !