Merge lp:~ted/indicator-application/lp944236 into lp:indicator-application/0.5

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 223
Merge reported by: Charles Kerr
Merged at revision: not available
Proposed branch: lp:~ted/indicator-application/lp944236
Merge into: lp:indicator-application/0.5
Diff against target: 28 lines (+10/-1)
1 file modified
src/application-service-appstore.c (+10/-1)
To merge this branch: bzr merge lp:~ted/indicator-application/lp944236
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+95691@code.launchpad.net

Description of the change

Fix a switch statement that was a bit ugly, now beautiful!

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Gorgeous!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/application-service-appstore.c'
2--- src/application-service-appstore.c 2012-03-02 05:16:38 +0000
3+++ src/application-service-appstore.c 2012-03-02 23:06:19 +0000
4@@ -284,14 +284,23 @@
5 switch (direction) {
6 case INDICATOR_OBJECT_SCROLL_UP:
7 delta = -delta;
8+ orientation = "vertical";
9+ break;
10 case INDICATOR_OBJECT_SCROLL_DOWN:
11+ /* delta unchanged */
12 orientation = "vertical";
13 break;
14-
15 case INDICATOR_OBJECT_SCROLL_LEFT:
16 delta = -delta;
17+ orientation = "horizontal";
18+ break;
19 case INDICATOR_OBJECT_SCROLL_RIGHT:
20+ /* delta unchanged */
21 orientation = "horizontal";
22+ break;
23+ default:
24+ g_assert_not_reached();
25+ break;
26 }
27
28 app = find_application_by_menu(service, dbusaddress, dbusmenuobject);

Subscribers

People subscribed via source and target branches