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
=== modified file 'src/menu.cpp'
--- src/menu.cpp 2016-05-14 02:07:10 +0000
+++ src/menu.cpp 2016-06-16 17:24:42 +0000
@@ -309,7 +309,7 @@
309 GMenuModel* create_calendar_section(Profile profile)309 GMenuModel* create_calendar_section(Profile profile)
310 {310 {
311 const bool show_calendar = m_state->settings->show_calendar.get() &&311 const bool show_calendar = m_state->settings->show_calendar.get() &&
312 ((profile == Desktop) || (profile == DesktopGreeter));312 ((profile == Desktop) || (profile == DesktopGreeter) || (profile == Phone));
313 auto menu = g_menu_new();313 auto menu = g_menu_new();
314314
315 const char * action_name;315 const char * action_name;
@@ -451,7 +451,7 @@
451 {451 {
452 GMenu* menu = g_menu_new();452 GMenu* menu = g_menu_new();
453453
454 if (profile == Desktop)454 if (profile == Desktop || profile == Phone)
455 {455 {
456 const auto now = m_state->clock->localtime();456 const auto now = m_state->clock->localtime();
457457
458458
=== modified file 'tests/test-menus.cpp'
--- tests/test-menus.cpp 2016-03-22 22:29:04 +0000
+++ tests/test-menus.cpp 2016-06-16 17:24:42 +0000
@@ -102,7 +102,7 @@
102 else102 else
103 expected_action = nullptr;103 expected_action = nullptr;
104104
105 const auto calendar_expected = ((profile == Menu::Desktop) || (profile == Menu::DesktopGreeter))105 const auto calendar_expected = ((profile == Menu::Desktop) || (profile == Menu::DesktopGreeter) || (profile == Menu::Phone))
106 && (m_state->settings->show_calendar.get());106 && (m_state->settings->show_calendar.get());
107107
108 // get the calendar section108 // get the calendar section
@@ -420,7 +420,7 @@
420420
421 void InspectLocations(GMenuModel* menu_model, Menu::Profile profile)421 void InspectLocations(GMenuModel* menu_model, Menu::Profile profile)
422 {422 {
423 const bool locations_expected = profile == Menu::Desktop;423 const bool locations_expected = (profile == Menu::Desktop) || (profile == Menu::Phone);
424424
425 // when there aren't any locations, confirm the menu is empty425 // when there aren't any locations, confirm the menu is empty
426 const std::vector<Location> empty;426 const std::vector<Location> empty;

Subscribers

People subscribed via source and target branches