Merge lp:~marcobiscaro2112/unity/fixes-742985 into lp:unity

Proposed by Marco Biscaro
Status: Rejected
Rejected by: Didier Roche-Tolomelli
Proposed branch: lp:~marcobiscaro2112/unity/fixes-742985
Merge into: lp:unity
Diff against target: 18 lines (+3/-2)
1 file modified
src/Launcher.cpp (+3/-2)
To merge this branch: bzr merge lp:~marcobiscaro2112/unity/fixes-742985
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Disapprove
Review via email: mp+55164@code.launchpad.net

Description of the change

Check the value of the shortcut before attempting to draw his character.

To post a comment you must log in.
Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

The problem is already fixed on trunk, but merging with this branch can prevent other similar problems in future (see https://bugs.launchpad.net/askubuntu-lens/+bug/742985/comments/4).

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Marco, I'm afraid this is invalid for now.

Indeed, shortcut is a gint, so it can be > 32 (like for a, f and t…) but the fix I was discussing is still in my branch (it's at the other hand). And for that, we need to check that the shortcut != 0 as 0 is the initial value :)

Hope that the explanations helps! Thanks however for your strong merge and participation commitment for unity. There is still a lot of bitesize around (if you need any pointer, to not hesitate to join irc!) :)

review: Disapprove
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Setting the state to reject as my previous comment to clean the list and you proposed another branch making that :)

BTW, do you know that there is a "resubmit proposal" button that can automatically superseed this proposal?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Launcher.cpp'
--- src/Launcher.cpp 2011-03-24 14:37:16 +0000
+++ src/Launcher.cpp 2011-03-28 14:41:17 +0000
@@ -2345,11 +2345,12 @@
2345 {2345 {
2346 guint64 shortcut = arg.icon->GetShortcut ();2346 guint64 shortcut = arg.icon->GetShortcut ();
23472347
2348 /* deal with dynamic labels for places, which can be set via the locale */2348 /* invalid values must be ignored */
2349 if (shortcut != 0)2349 if (shortcut > 32)
2350 {2350 {
2351 if (!g_ascii_isdigit ((gchar) shortcut))2351 if (!g_ascii_isdigit ((gchar) shortcut))
2352 {2352 {
2353 /* deal with dynamic labels for places, which can be set via the locale */
2353 RenderIcon (GfxContext,2354 RenderIcon (GfxContext,
2354 arg,2355 arg,
2355 arg.icon->GetSuperkeyLabel ()->GetDeviceTexture (),2356 arg.icon->GetSuperkeyLabel ()->GetDeviceTexture (),