Merge lp:~charlesk/indicator-datetime/lp-1296585-fix-settings-menuitem-label into lp:indicator-datetime/14.04

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 330
Merged at revision: 332
Proposed branch: lp:~charlesk/indicator-datetime/lp-1296585-fix-settings-menuitem-label
Merge into: lp:indicator-datetime/14.04
Prerequisite: lp:~charlesk/indicator-datetime/lp-1295799-date-menuitem-should-open-calendar
Diff against target: 27 lines (+8/-6)
1 file modified
src/menu.cpp (+8/-6)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-1296585-fix-settings-menuitem-label
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+212468@code.launchpad.net

Commit message

Change the desktop menu's settings menuitem's label to match the spec.

Description of the change

Change the desktop menu's settings menuitem's label to match the spec.

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

> Ensure the project compiles and the test suite executes without error

Yep

> Ensure that non-obvious code has comments explaining it

This is a trivial MP

> If the change works on specific profiles, please include those in the merge description.

Affects: Desktop

Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/menu.cpp'
2--- src/menu.cpp 2014-03-24 15:51:00 +0000
3+++ src/menu.cpp 2014-03-24 15:51:00 +0000
4@@ -388,15 +388,17 @@
5 GMenuModel* create_settings_section(Profile profile)
6 {
7 auto menu = g_menu_new();
8+ const char * action_name;
9
10 if (profile == Desktop)
11- {
12- g_menu_append (menu, _("Date & Time Settings…"), "indicator.desktop.open-settings-app");
13- }
14+ action_name = "indicator.desktop.open-settings-app";
15 else if (profile == Phone)
16- {
17- g_menu_append (menu, _("Time & Date settings…"), "indicator.phone.open-settings-app");
18- }
19+ action_name = "indicator.phone.open-settings-app";
20+ else
21+ action_name = nullptr;
22+
23+ if (action_name != nullptr)
24+ g_menu_append (menu, _("Time & Date settings…"), action_name);
25
26 return G_MENU_MODEL (menu);
27 }

Subscribers

People subscribed via source and target branches