Merge lp:~andyhorng/unity/fix-for-unity-bug-741787 into lp:unity

Proposed by Andy Horng
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 1136
Proposed branch: lp:~andyhorng/unity/fix-for-unity-bug-741787
Merge into: lp:unity
Diff against target: 19 lines (+7/-2)
1 file modified
src/LauncherIcon.cpp (+7/-2)
To merge this branch: bzr merge lp:~andyhorng/unity/fix-for-unity-bug-741787
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+56724@code.launchpad.net

Description of the change

Fix Bug #741787 - Launcher Icon count breaks when count > 9999, due to only being alotted four char spaces. All counts > 9999 will be represented by "****" instead.
Extra check inserted in OnRemoteCountChanged() in LauncherIcon.cpp.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Hey Andy! First of all thanks for the fix! This attention to detail is terrific! Code looks good, but you have not signed the contributor agreement yet from all I can tell. That needs to be done first, before I can merge your branch into trunk. Please see http://www.canonical.com/contributors and follow the instructions listed there. Thanks in advance!

Revision history for this message
Mirco Müller (macslow) wrote :

Got note of the signed agreement. Approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/LauncherIcon.cpp'
2--- src/LauncherIcon.cpp 2011-04-06 17:53:41 +0000
3+++ src/LauncherIcon.cpp 2011-04-07 10:47:06 +0000
4@@ -944,8 +944,13 @@
5 {
6 if (!remote->CountVisible ())
7 return;
8-
9- gchar *text = g_strdup_printf ("%i", (int) remote->Count ());
10+
11+ gchar *text;
12+ if (remote->Count() > 9999)
13+ text = g_strdup_printf("****");
14+ else
15+ text = g_strdup_printf ("%i", (int) remote->Count ());
16+
17 SetEmblemText (text);
18 g_free (text);
19 }