Merge lp://qastaging/~unity-team/unity/unity.fix-sc-icon-to-launcher-animation-981168 into lp://qastaging/unity

Proposed by Jay Taoko
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 2367
Proposed branch: lp://qastaging/~unity-team/unity/unity.fix-sc-icon-to-launcher-animation-981168
Merge into: lp://qastaging/unity
Diff against target: 120 lines (+47/-18)
2 files modified
launcher/Launcher.cpp (+36/-18)
launcher/Launcher.h (+11/-0)
To merge this branch: bzr merge lp://qastaging/~unity-team/unity/unity.fix-sc-icon-to-launcher-animation-981168
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+102239@code.qastaging.launchpad.net

Commit message

* Capture information about the icon of the application to be installed from the software center. Re-use it when rendering the launcher interface.
* Fix bug #981168

Description of the change

* Capture information about the icon of the application to be installed from the software center. Re-use it when rendering the launcher interface.
* Fix bug #981168

UNBLOCK

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

just a quick fix needed on this branch,
first the we need to g_free the _sc_* pointers in the destructor

Then secondly, in this code, after g_free'ing the pointers the pointers should be set to NULL:

25 +
26 + if (_sc_anim_icon)
27 + {
28 + launcher_addrequest_special.emit(_sc_icon_desktop_file, AbstractLauncherIcon::Ptr(), _sc_icon_aptdaemon_task, _sc_icon, _sc_icon_x, _sc_icon_y, _sc_icon_size);
29 + g_free(_sc_icon);
30 + g_free(_sc_icon_title);
31 + g_free(_sc_icon_desktop_file);
32 + g_free(_sc_icon_aptdaemon_task);
33 + _sc_anim_icon = false;
34 + }

Then thirdly, before this code we should be g_free'ing the pointers to ensure there is no possible memory leak

58 + self->_sc_anim_icon = true;
59 + g_variant_get(parameters, "(ssiiiss)", &self->_sc_icon_title,
60 + &self->_sc_icon,
61 + &self->_sc_icon_x,
62 + &self->_sc_icon_y,
63 + &self->_sc_icon_size,
64 + &self->_sc_icon_desktop_file,
65 + &self->_sc_icon_aptdaemon_task, NULL);

Other than that, looks good to me

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote :

My thoughts were around why not use glib::String objects?

Revision history for this message
Gord Allott (gordallott) wrote :

fixed up myself..

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.