Merge lp://qastaging/~didrocks/unity/fix-711189 into lp://qastaging/unity
Proposed by
Didier Roche-Tolomelli
Status: | Merged |
---|---|
Approved by: | Gord Allott |
Approved revision: | no longer in the source branch. |
Merged at revision: | 824 |
Proposed branch: | lp://qastaging/~didrocks/unity/fix-711189 |
Merge into: | lp://qastaging/unity |
Diff against target: |
50 lines (+31/-2) 1 file modified
src/IconTexture.cpp (+31/-2) |
To merge this branch: | bzr merge lp://qastaging/~didrocks/unity/fix-711189 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gord Allott (community) | Needs Fixing | ||
Review via email: mp+48760@code.qastaging.launchpad.net |
Description of the change
Support incorrectly formated .desktop file when Icon=<filename>
#711189)
To post a comment you must log in.
When splitting the string your doing some manual splitting stuff. we should let glib do that, so i'll mark this as needs fixing
So instead of splitting the string manually and worrying me about leaking memory ;) - we should
gchar **foo = g_strsplit (_icon_name, ".", -1); // to get an array of strings split on .
g_free (foo [g_strv_length (foo) - 1]); // to remove the extension from the array of strings
stripped_icon_name = g_strjoinv (".", foo); //gets our final stripped icon name
g_strfreev (foo); // to free the previously created array of strings
This will also make sure we catch the case of "this.is. my.icon. png", which is horrible and anyone that does that should be shot, but that is linux for you.