aboutsummaryrefslogtreecommitdiff
path: root/tests/test-menus.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-09 21:08:47 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-03-09 21:08:47 -0500
commit3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 (patch)
treeab1f4ba4e7635b3ea2cb600cc8de9b3e52a6c9d1 /tests/test-menus.cpp
parent375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3 (diff)
downloadayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.gz
ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.bz2
ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.zip
decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu).
Diffstat (limited to 'tests/test-menus.cpp')
-rw-r--r--tests/test-menus.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp
index 73d6036..61d1295 100644
--- a/tests/test-menus.cpp
+++ b/tests/test-menus.cpp
@@ -255,7 +255,7 @@ private:
const std::vector<Appointment>& appointments)
{
// try adding a few appointments and see if the menu updates itself
- m_state->planner->upcoming.set(appointments);
+ m_state->calendar_upcoming->appointments().set(appointments);
wait_msec(); // wait a moment for the menu to update
//auto submenu = g_menu_model_get_item_link(menu_model, 0, G_MENU_LINK_SUBMENU);
@@ -285,7 +285,7 @@ private:
// there should be an "add event" button even if there aren't any appointments
std::vector<Appointment> appointments;
m_state->settings->show_events.set(true);
- m_state->planner->upcoming.set(appointments);
+ m_state->calendar_upcoming->appointments().set(appointments);
wait_msec();
section = g_menu_model_get_item_link(submenu, Menu::Appointments, G_MENU_LINK_SECTION);
EXPECT_EQ(1, g_menu_model_get_n_items(section));
@@ -299,7 +299,7 @@ private:
// try adding a few appointments and see if the menu updates itself
appointments = build_some_appointments();
- m_state->planner->upcoming.set(appointments);
+ m_state->calendar_upcoming->appointments().set(appointments);
wait_msec(); // wait a moment for the menu to update
section = g_menu_model_get_item_link(submenu, Menu::Appointments, G_MENU_LINK_SECTION);
EXPECT_EQ(3, g_menu_model_get_n_items(section));
@@ -316,7 +316,7 @@ private:
// clear all the appointments
std::vector<Appointment> appointments;
- m_state->planner->upcoming.set(appointments);
+ m_state->calendar_upcoming->appointments().set(appointments);
wait_msec(); // wait a moment for the menu to update
// check that there's a "clock app" menuitem even when there are no appointments
@@ -332,7 +332,7 @@ private:
// add some appointments and test them
appointments = build_some_appointments();
- m_state->planner->upcoming.set(appointments);
+ m_state->calendar_upcoming->appointments().set(appointments);
wait_msec(); // wait a moment for the menu to update
section = g_menu_model_get_item_link(submenu, Menu::Appointments, G_MENU_LINK_SECTION);
EXPECT_EQ(3, g_menu_model_get_n_items(section));