Merge lp:~lukas-kde/indicator-datetime/reenable-calendar-component-phone-profile into lp:indicator-datetime

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Charles Kerr
Approved revision: 451
Merged at revision: 452
Proposed branch: lp:~lukas-kde/indicator-datetime/reenable-calendar-component-phone-profile
Merge into: lp:indicator-datetime
Diff against target: 43 lines (+4/-4)
2 files modified
src/menu.cpp (+2/-2)
tests/test-menus.cpp (+2/-2)
To merge this branch: bzr merge lp:~lukas-kde/indicator-datetime/reenable-calendar-component-phone-profile
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+297659@code.launchpad.net

Commit message

Re-introduce the calendar component for the phone profile.

Description of the change

Re-introduce the calendar component for the phone profile.

Now that the lockup/freeze has been fixed by https://code.launchpad.net/~nick-dedekind/ubuntu-settings-components/calendar-freeze/+merge/296297

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

LGTM. Lukáš, feel free to land this / silo along with u-s-s at will

review: Approve

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 2016-05-14 02:07:10 +0000
3+++ src/menu.cpp 2016-06-16 17:24:42 +0000
4@@ -309,7 +309,7 @@
5 GMenuModel* create_calendar_section(Profile profile)
6 {
7 const bool show_calendar = m_state->settings->show_calendar.get() &&
8- ((profile == Desktop) || (profile == DesktopGreeter));
9+ ((profile == Desktop) || (profile == DesktopGreeter) || (profile == Phone));
10 auto menu = g_menu_new();
11
12 const char * action_name;
13@@ -451,7 +451,7 @@
14 {
15 GMenu* menu = g_menu_new();
16
17- if (profile == Desktop)
18+ if (profile == Desktop || profile == Phone)
19 {
20 const auto now = m_state->clock->localtime();
21
22
23=== modified file 'tests/test-menus.cpp'
24--- tests/test-menus.cpp 2016-03-22 22:29:04 +0000
25+++ tests/test-menus.cpp 2016-06-16 17:24:42 +0000
26@@ -102,7 +102,7 @@
27 else
28 expected_action = nullptr;
29
30- const auto calendar_expected = ((profile == Menu::Desktop) || (profile == Menu::DesktopGreeter))
31+ const auto calendar_expected = ((profile == Menu::Desktop) || (profile == Menu::DesktopGreeter) || (profile == Menu::Phone))
32 && (m_state->settings->show_calendar.get());
33
34 // get the calendar section
35@@ -420,7 +420,7 @@
36
37 void InspectLocations(GMenuModel* menu_model, Menu::Profile profile)
38 {
39- const bool locations_expected = profile == Menu::Desktop;
40+ const bool locations_expected = (profile == Menu::Desktop) || (profile == Menu::Phone);
41
42 // when there aren't any locations, confirm the menu is empty
43 const std::vector<Location> empty;

Subscribers

People subscribed via source and target branches