Merge lp:~charlesk/indicator-datetime/lp-1387231-honor-x-canonical-disabled-tag into lp:indicator-datetime/rtm-14.09

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 389
Merged at revision: 387
Proposed branch: lp:~charlesk/indicator-datetime/lp-1387231-honor-x-canonical-disabled-tag
Merge into: lp:indicator-datetime/rtm-14.09
Diff against target: 373 lines (+65/-40)
14 files modified
debian/changelog (+7/-0)
include/datetime/appointment.h (+4/-1)
src/actions-live.cpp (+1/-1)
src/appointment.cpp (+3/-3)
src/engine-eds.cpp (+19/-3)
src/menu.cpp (+4/-4)
src/snap.cpp (+0/-6)
tests/manual (+15/-10)
tests/manual-test-snap.cpp (+1/-1)
tests/test-actions.cpp (+2/-2)
tests/test-alarm-queue.cpp (+2/-2)
tests/test-live-actions.cpp (+2/-2)
tests/test-menus.cpp (+4/-4)
tests/test-snap.cpp (+1/-1)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-1387231-honor-x-canonical-disabled-tag
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+244251@code.launchpad.net

Commit message

Add support for x-canonical-alarm and x-canonical-disabled tags in VTODO categories so that disabled alarms will not be displayed.

Description of the change

Same MP as proposed for Vivid @ https://code.launchpad.net/~charlesk/indicator-datetime/lp-1387231-honor-x-canonical-disabled-tag/+merge/243938

Description of the Change
=========================

This culls the fix for bug #1387231 from my development branch so that it's easier to review and to backport in isolation.

This piece adds support for noticing the x-canonical-alarm and x-canonical-disabled tags in VTODO's categories so that the indicator will know to not show disabled alarms.

Checklist
=========

> Are there any related MPs required for this MP to build/function as expected? Please list.

No

> Is your branch in sync with latest trunk? (e.g. bzr pull lp:trunk -> no changes)

Yes

> Did the code build without warnings?

Yes

> Did the tests run successfully?

Yes

> Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

> If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

> What device (or emulator) has your component test plan been executed successfully on?

Krillin running ubuntu-touch/ubuntu-rtm/14.09-proposed image 173

> What manual tests are relevant for this MP?

indicator-datetime/disabled-alarms

> Did you include a link to the MR Review Checklist Template to make your reviewer's life easier?

https://wiki.ubuntu.com/Process/Merges/Checklists/indicator-datetime

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-10-09 13:35:54 +0000
+++ debian/changelog 2014-12-10 04:00:35 +0000
@@ -1,3 +1,10 @@
1indicator-datetime (13.10.0+15.04.20141103-0ubuntu1) vivid; urgency=low
2
3 [ Ted Gould ]
4 * Small tag typo in integration test
5
6 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 03 Nov 2014 21:04:05 +0000
7
1indicator-datetime (13.10.0+14.10.20141009-0ubuntu1) utopic; urgency=low8indicator-datetime (13.10.0+14.10.20141009-0ubuntu1) utopic; urgency=low
29
3 [ Charles Kerr ]10 [ Charles Kerr ]
411
=== modified file 'include/datetime/appointment.h'
--- include/datetime/appointment.h 2014-06-24 01:26:09 +0000
+++ include/datetime/appointment.h 2014-12-10 04:00:35 +0000
@@ -35,12 +35,15 @@
35struct Appointment35struct Appointment
36{36{
37public:37public:
38 enum Type { EVENT, UBUNTU_ALARM };
39 Type type = EVENT;
40 bool is_ubuntu_alarm() const { return type == UBUNTU_ALARM; }
41
38 std::string color; 42 std::string color;
39 std::string summary;43 std::string summary;
40 std::string url;44 std::string url;
41 std::string uid;45 std::string uid;
42 std::string audio_url;46 std::string audio_url;
43 bool has_alarms = false;
44 DateTime begin;47 DateTime begin;
45 DateTime end;48 DateTime end;
4649
4750
=== modified file 'src/actions-live.cpp'
--- src/actions-live.cpp 2014-03-25 21:28:54 +0000
+++ src/actions-live.cpp 2014-12-10 04:00:35 +0000
@@ -138,7 +138,7 @@
138{138{
139 if (!appt.url.empty())139 if (!appt.url.empty())
140 dispatch_url(appt.url);140 dispatch_url(appt.url);
141 else if (appt.has_alarms)141 else if (appt.is_ubuntu_alarm())
142 phone_open_alarm_app();142 phone_open_alarm_app();
143 else143 else
144 phone_open_calendar_app(DateTime::NowLocal());144 phone_open_calendar_app(DateTime::NowLocal());
145145
=== modified file 'src/appointment.cpp'
--- src/appointment.cpp 2014-10-07 18:45:03 +0000
+++ src/appointment.cpp 2014-12-10 04:00:35 +0000
@@ -29,12 +29,12 @@
2929
30bool Appointment::operator==(const Appointment& that) const30bool Appointment::operator==(const Appointment& that) const
31{31{
32 return (color==that.color)32 return (type==that.type)
33 && (uid==that.uid)
34 && (color==that.color)
33 && (summary==that.summary)35 && (summary==that.summary)
34 && (url==that.url)36 && (url==that.url)
35 && (audio_url==that.audio_url)37 && (audio_url==that.audio_url)
36 && (uid==that.uid)
37 && (has_alarms==that.has_alarms)
38 && (begin==that.begin)38 && (begin==that.begin)
39 && (end==that.end);39 && (end==that.end);
40}40}
4141
=== modified file 'src/engine-eds.cpp'
--- src/engine-eds.cpp 2014-09-17 16:51:51 +0000
+++ src/engine-eds.cpp 2014-12-10 04:00:35 +0000
@@ -33,6 +33,9 @@
33namespace indicator {33namespace indicator {
34namespace datetime {34namespace datetime {
3535
36static constexpr char const * TAG_ALARM {"x-canonical-alarm"};
37static constexpr char const * TAG_DISABLED {"x-canonical-disabled"};
38
36/****39/****
37*****40*****
38****/41****/
@@ -375,8 +378,6 @@
375 static_cast<Impl*>(gself)->set_dirty_soon();378 static_cast<Impl*>(gself)->set_dirty_soon();
376 }379 }
377380
378private:
379
380 typedef std::function<void(const std::vector<Appointment>&)> appointment_func;381 typedef std::function<void(const std::vector<Appointment>&)> appointment_func;
381382
382 struct Task383 struct Task
@@ -425,7 +426,22 @@
425 uid,426 uid,
426 (int)status);427 (int)status);
427428
429 // look for the in-house tags
430 bool disabled = false;
431 Appointment::Type type = Appointment::EVENT;
432 GSList * categ_list = nullptr;
433 e_cal_component_get_categories_list (component, &categ_list);
434 for (GSList * l=categ_list; l!=nullptr; l=l->next) {
435 auto tag = static_cast<const char*>(l->data);
436 if (!g_strcmp0(tag, TAG_ALARM))
437 type = Appointment::UBUNTU_ALARM;
438 if (!g_strcmp0(tag, TAG_DISABLED))
439 disabled = true;
440 }
441 e_cal_component_free_categories_list(categ_list);
442
428 if ((uid != nullptr) &&443 if ((uid != nullptr) &&
444 (!disabled) &&
429 (status != ICAL_STATUS_COMPLETED) &&445 (status != ICAL_STATUS_COMPLETED) &&
430 (status != ICAL_STATUS_CANCELLED))446 (status != ICAL_STATUS_CANCELLED))
431 {447 {
@@ -441,12 +457,12 @@
441 appointment.end = end_dt;457 appointment.end = end_dt;
442 appointment.color = subtask->color;458 appointment.color = subtask->color;
443 appointment.uid = uid;459 appointment.uid = uid;
460 appointment.type = type;
444461
445 // Look through all of this component's alarms462 // Look through all of this component's alarms
446 // for DISPLAY or AUDIO url attachments.463 // for DISPLAY or AUDIO url attachments.
447 // If we find any, use them for appointment.url and audio_sound464 // If we find any, use them for appointment.url and audio_sound
448 auto alarm_uids = e_cal_component_get_alarm_uids(component);465 auto alarm_uids = e_cal_component_get_alarm_uids(component);
449 appointment.has_alarms = alarm_uids != nullptr;
450 for(auto walk=alarm_uids; appointment.url.empty() && walk!=nullptr; walk=walk->next)466 for(auto walk=alarm_uids; appointment.url.empty() && walk!=nullptr; walk=walk->next)
451 {467 {
452 auto alarm = e_cal_component_get_alarm(component, static_cast<const char*>(walk->data));468 auto alarm = e_cal_component_get_alarm(component, static_cast<const char*>(walk->data));
453469
=== modified file 'src/menu.cpp'
--- src/menu.cpp 2014-10-03 19:22:31 +0000
+++ src/menu.cpp 2014-12-10 04:00:35 +0000
@@ -316,7 +316,7 @@
316 g_menu_item_set_attribute (menu_item, "x-canonical-time", "x", unix_time);316 g_menu_item_set_attribute (menu_item, "x-canonical-time", "x", unix_time);
317 g_menu_item_set_attribute (menu_item, "x-canonical-time-format", "s", fmt.c_str());317 g_menu_item_set_attribute (menu_item, "x-canonical-time-format", "s", fmt.c_str());
318318
319 if (appt.has_alarms)319 if (appt.is_ubuntu_alarm())
320 {320 {
321 g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "com.canonical.indicator.alarm");321 g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "com.canonical.indicator.alarm");
322 g_menu_item_set_attribute_value(menu_item, G_MENU_ATTRIBUTE_ICON, get_serialized_alarm_icon());322 g_menu_item_set_attribute_value(menu_item, G_MENU_ATTRIBUTE_ICON, get_serialized_alarm_icon());
@@ -509,16 +509,16 @@
509 GVariant* create_header_state()509 GVariant* create_header_state()
510 {510 {
511 // are there alarms?511 // are there alarms?
512 bool has_alarms = false;512 bool has_ubuntu_alarms = false;
513 for(const auto& appointment : m_upcoming)513 for(const auto& appointment : m_upcoming)
514 if((has_alarms = appointment.has_alarms))514 if((has_ubuntu_alarms = appointment.is_ubuntu_alarm()))
515 break;515 break;
516516
517 GVariantBuilder b;517 GVariantBuilder b;
518 g_variant_builder_init(&b, G_VARIANT_TYPE_VARDICT);518 g_variant_builder_init(&b, G_VARIANT_TYPE_VARDICT);
519 g_variant_builder_add(&b, "{sv}", "title", g_variant_new_string (_("Time & Date")));519 g_variant_builder_add(&b, "{sv}", "title", g_variant_new_string (_("Time & Date")));
520 g_variant_builder_add(&b, "{sv}", "visible", g_variant_new_boolean (TRUE));520 g_variant_builder_add(&b, "{sv}", "visible", g_variant_new_boolean (TRUE));
521 if (has_alarms)521 if (has_ubuntu_alarms)
522 {522 {
523 auto label = m_formatter->header.get();523 auto label = m_formatter->header.get();
524 auto a11y = g_strdup_printf(_("%s (has alarms)"), label.c_str());524 auto a11y = g_strdup_printf(_("%s (has alarms)"), label.c_str());
525525
=== modified file 'src/snap.cpp'
--- src/snap.cpp 2014-09-17 17:30:48 +0000
+++ src/snap.cpp 2014-12-10 04:00:35 +0000
@@ -63,12 +63,6 @@
63 appointment_func snooze,63 appointment_func snooze,
64 appointment_func ok)64 appointment_func ok)
65 {65 {
66 if (!appointment.has_alarms)
67 {
68 ok(appointment);
69 return;
70 }
71
72 // force the system to stay awake66 // force the system to stay awake
73 auto awake = std::make_shared<uin::Awake>(m_engine->app_name());67 auto awake = std::make_shared<uin::Awake>(m_engine->app_name());
7468
7569
=== modified file 'tests/manual'
--- tests/manual 2014-10-09 13:35:42 +0000
+++ tests/manual 2014-12-10 04:00:35 +0000
@@ -25,7 +25,7 @@
25Test-case indicator-datetime/timestamp-wakeup25Test-case indicator-datetime/timestamp-wakeup
26<dl>26<dl>
27 <dt>Unplug the phone from any USB connection and put it to sleep</dt>27 <dt>Unplug the phone from any USB connection and put it to sleep</dt>
28 <dd>Reawaken the device.</dt>28 <dt>Reawaken the device.</dt>
29 <dd>The indicator should be showing the correct time.</dd>29 <dd>The indicator should be showing the correct time.</dd>
30</dl>30</dl>
3131
@@ -33,13 +33,21 @@
33<dl>33<dl>
34 <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt>34 <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt>
35 <dt>Unplug the phone from any USB connection and put it to sleep</dt>35 <dt>Unplug the phone from any USB connection and put it to sleep</dt>
36 <dd>Confirm that the alarm sounds on time even if the phone is asleep.36 <dd>Confirm that the alarm sounds on time even if the phone is asleep. (Note: if in doubt about sleep you can see in the syslog whether the device actually suspended or whether the suspend was aborted)</dd>
37 (Note: if in doubt about sleep you can see in the syslog whether the
38 device actually suspended or whether the suspend was aborted)</dd>
39 <dd>Confirm that the screen comes on when the alarm is triggered.<dd>37 <dd>Confirm that the screen comes on when the alarm is triggered.<dd>
40 <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd>38 <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd>
41</dl>39</dl>
4240
41Test-case indicator-datetime/disabled-alarms
42<dl>
43 <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt>
44 <dd>Confirm that the alarm icon appears next to the current time in unity's indicator display</dd>
45 <dt>Disable the alarm in ubuntu-clock-app</dt>
46 <dd>When all alarms are disabled or removed, the alarm icon should disappear.</dd>
47 <dt>Re-enable the alarm in ubuntu-clock-app</dt>
48 <dd>When the alarm is enabled, the alarm icon should reappear.</dd>
49</dl>
50
43Test-case indicator-datetime/alarm-timezone51Test-case indicator-datetime/alarm-timezone
44<dl>52<dl>
45 <dt>In ubuntu-system-settings, change your timezone to a zone you're not in</dt>53 <dt>In ubuntu-system-settings, change your timezone to a zone you're not in</dt>
@@ -53,8 +61,7 @@
53<dl>61<dl>
54 <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt>62 <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt>
55 <dt>When the alarm goes off, press the 'Snooze' button</dt>63 <dt>When the alarm goes off, press the 'Snooze' button</dt>
56 <dd>The alarm should go away, then reappear N minutes later.64 <dd>The alarm should go away, then reappear N minutes later. By default the N is 5 minutes but will be configurable from ubuntu-clock-app.</dd>
57 By default the N is 5 minutes but will be configurable from ubuntu-clock-app.</dd>
58 <dt>When the snoozed alarm reappears, press the 'OK' button</dt>65 <dt>When the snoozed alarm reappears, press the 'OK' button</dt>
59 <dd>This time when the alarm is dismissed, it should not reappear.</dd>66 <dd>This time when the alarm is dismissed, it should not reappear.</dd>
60</dl>67</dl>
@@ -63,16 +70,14 @@
63<dl>70<dl>
64 <dt>Edit an alarm that's already passed. (see previous test)</dt>71 <dt>Edit an alarm that's already passed. (see previous test)</dt>
65 <dt>Unplug the phone from any USB connection and put it to sleep</dt>72 <dt>Unplug the phone from any USB connection and put it to sleep</dt>
66 <dd>Confirm that the alarm sounds on time even if the phone is asleep.73 <dd>Confirm that the alarm sounds on time even if the phone is asleep. (Note: if in doubt about sleep you can see in the syslog whether the device actually suspended or whether the suspend was aborted)</dd>
67 (Note: if in doubt about sleep you can see in the syslog whether the
68 device actually suspended or whether the suspend was aborted)</dd>
69 <dd>Confirm that the screen comes on when the alarm is triggered.<dd>74 <dd>Confirm that the screen comes on when the alarm is triggered.<dd>
70 <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd>75 <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd>
71</dl>76</dl>
7277
73Test-case indicator-datetime/tell-snap-decision-to-dismiss78Test-case indicator-datetime/tell-snap-decision-to-dismiss
74<dl>79<dl>
75 <dt>Set an alarm and wait for it to arrive.</td>80 <dt>Set an alarm and wait for it to arrive.</dt>
76 <dd>Alarm should go off at the specified time</dd>81 <dd>Alarm should go off at the specified time</dd>
77 <dt>Press the 'Dismiss' button in the alarm's snap decision popup before the sound stops.</dt>82 <dt>Press the 'Dismiss' button in the alarm's snap decision popup before the sound stops.</dt>
78 <dd>Popup should disappear</dd>83 <dd>Popup should disappear</dd>
7984
=== modified file 'tests/manual-test-snap.cpp'
--- tests/manual-test-snap.cpp 2014-09-17 16:51:51 +0000
+++ tests/manual-test-snap.cpp 2014-12-10 04:00:35 +0000
@@ -69,7 +69,7 @@
69 a.summary = "Alarm";69 a.summary = "Alarm";
70 a.url = "alarm:///hello-world";70 a.url = "alarm:///hello-world";
71 a.uid = "D4B57D50247291478ED31DED17FF0A9838DED402";71 a.uid = "D4B57D50247291478ED31DED17FF0A9838DED402";
72 a.has_alarms = true;72 a.type = Appointment::UBUNTU_ALARM;
73 auto begin = g_date_time_new_local(2014,12,25,0,0,0);73 auto begin = g_date_time_new_local(2014,12,25,0,0,0);
74 auto end = g_date_time_add_full(begin,0,0,1,0,0,-1);74 auto end = g_date_time_add_full(begin,0,0,1,0,0,-1);
75 a.begin = begin;75 a.begin = begin;
7676
=== modified file 'tests/test-actions.cpp'
--- tests/test-actions.cpp 2014-09-17 16:51:51 +0000
+++ tests/test-actions.cpp 2014-12-10 04:00:35 +0000
@@ -39,7 +39,7 @@
39 a1.summary = "Alarm";39 a1.summary = "Alarm";
40 a1.summary = "http://www.example.com/";40 a1.summary = "http://www.example.com/";
41 a1.uid = "example";41 a1.uid = "example";
42 a1.has_alarms = true;42 a1.type = Appointment::UBUNTU_ALARM;
43 a1.begin = a1.end = tomorrow;43 a1.begin = a1.end = tomorrow;
4444
45 Appointment a2; // a non-alarm appointment45 Appointment a2; // a non-alarm appointment
@@ -47,7 +47,7 @@
47 a2.summary = "Other Text";47 a2.summary = "Other Text";
48 a2.summary = "http://www.monkey.com/";48 a2.summary = "http://www.monkey.com/";
49 a2.uid = "monkey";49 a2.uid = "monkey";
50 a2.has_alarms = false;50 a1.type = Appointment::EVENT;
51 a2.begin = a2.end = tomorrow;51 a2.begin = a2.end = tomorrow;
5252
53 return std::vector<Appointment>({a1, a2});53 return std::vector<Appointment>({a1, a2});
5454
=== modified file 'tests/test-alarm-queue.cpp'
--- tests/test-alarm-queue.cpp 2014-04-25 03:34:42 +0000
+++ tests/test-alarm-queue.cpp 2014-12-10 04:00:35 +0000
@@ -80,7 +80,7 @@
80 a1.summary = "Alarm";80 a1.summary = "Alarm";
81 a1.summary = "http://www.example.com/";81 a1.summary = "http://www.example.com/";
82 a1.uid = "example";82 a1.uid = "example";
83 a1.has_alarms = true;83 a1.type = Appointment::UBUNTU_ALARM;
84 a1.begin = tomorrow_begin;84 a1.begin = tomorrow_begin;
85 a1.end = tomorrow_end;85 a1.end = tomorrow_end;
8686
@@ -92,7 +92,7 @@
92 a2.summary = "Other Text";92 a2.summary = "Other Text";
93 a2.summary = "http://www.monkey.com/";93 a2.summary = "http://www.monkey.com/";
94 a2.uid = "monkey";94 a2.uid = "monkey";
95 a2.has_alarms = false;95 a1.type = Appointment::EVENT;
96 a2.begin = ubermorgen_begin;96 a2.begin = ubermorgen_begin;
97 a2.end = ubermorgen_end;97 a2.end = ubermorgen_end;
9898
9999
=== modified file 'tests/test-live-actions.cpp'
--- tests/test-live-actions.cpp 2014-09-17 16:51:51 +0000
+++ tests/test-live-actions.cpp 2014-12-10 04:00:35 +0000
@@ -312,11 +312,11 @@
312312
313 a.uid = "some-uid";313 a.uid = "some-uid";
314 a.begin = DateTime::NowLocal();314 a.begin = DateTime::NowLocal();
315 a.has_alarms = false;315 a.type = Appointment::EVENT;
316 m_actions->phone_open_appointment(a);316 m_actions->phone_open_appointment(a);
317 EXPECT_EQ(calendar_app_url, m_live_actions->last_url);317 EXPECT_EQ(calendar_app_url, m_live_actions->last_url);
318318
319 a.has_alarms = true;319 a.type = Appointment::UBUNTU_ALARM;
320 m_actions->phone_open_appointment(a);320 m_actions->phone_open_appointment(a);
321 EXPECT_EQ(clock_app_url, m_live_actions->last_url);321 EXPECT_EQ(clock_app_url, m_live_actions->last_url);
322322
323323
=== modified file 'tests/test-menus.cpp'
--- tests/test-menus.cpp 2014-09-17 16:51:51 +0000
+++ tests/test-menus.cpp 2014-12-10 04:00:35 +0000
@@ -191,7 +191,7 @@
191 a1.summary = "Alarm";191 a1.summary = "Alarm";
192 a1.summary = "http://www.example.com/";192 a1.summary = "http://www.example.com/";
193 a1.uid = "example";193 a1.uid = "example";
194 a1.has_alarms = true;194 a1.type = Appointment::UBUNTU_ALARM;
195 a1.begin = a1.end = tomorrow;195 a1.begin = a1.end = tomorrow;
196196
197 Appointment a2; // a non-alarm appointment197 Appointment a2; // a non-alarm appointment
@@ -199,7 +199,7 @@
199 a2.summary = "Other Text";199 a2.summary = "Other Text";
200 a2.summary = "http://www.monkey.com/";200 a2.summary = "http://www.monkey.com/";
201 a2.uid = "monkey";201 a2.uid = "monkey";
202 a2.has_alarms = false;202 a1.type = Appointment::EVENT;
203 a2.begin = a2.end = tomorrow;203 a2.begin = a2.end = tomorrow;
204204
205 return std::vector<Appointment>({a1, a2});205 return std::vector<Appointment>({a1, a2});
@@ -212,7 +212,7 @@
212 // confirm it has the right x-canonical-type212 // confirm it has the right x-canonical-type
213 gchar * str = nullptr;213 gchar * str = nullptr;
214 g_menu_model_get_item_attribute(section, index, "x-canonical-type", "s", &str);214 g_menu_model_get_item_attribute(section, index, "x-canonical-type", "s", &str);
215 if (appt.has_alarms)215 if (appt.is_ubuntu_alarm())
216 EXPECT_STREQ("com.canonical.indicator.alarm", str);216 EXPECT_STREQ("com.canonical.indicator.alarm", str);
217 else217 else
218 EXPECT_STREQ("com.canonical.indicator.appointment", str);218 EXPECT_STREQ("com.canonical.indicator.appointment", str);
@@ -245,7 +245,7 @@
245 g_clear_pointer(&str, g_free);245 g_clear_pointer(&str, g_free);
246246
247 // confirm that alarms have an icon247 // confirm that alarms have an icon
248 if (appt.has_alarms)248 if (appt.is_ubuntu_alarm())
249 {249 {
250 auto v = g_menu_model_get_item_attribute_value(section,250 auto v = g_menu_model_get_item_attribute_value(section,
251 index,251 index,
252252
=== modified file 'tests/test-snap.cpp'
--- tests/test-snap.cpp 2014-09-17 16:51:51 +0000
+++ tests/test-snap.cpp 2014-12-10 04:00:35 +0000
@@ -108,7 +108,7 @@
108 appt.summary = "Alarm";108 appt.summary = "Alarm";
109 appt.url = "alarm:///hello-world";109 appt.url = "alarm:///hello-world";
110 appt.uid = "D4B57D50247291478ED31DED17FF0A9838DED402";110 appt.uid = "D4B57D50247291478ED31DED17FF0A9838DED402";
111 appt.has_alarms = true;111 appt.type = Appointment::EVENT;
112 auto begin = g_date_time_new_local(2014,12,25,0,0,0);112 auto begin = g_date_time_new_local(2014,12,25,0,0,0);
113 auto end = g_date_time_add_full(begin,0,0,1,0,0,-1);113 auto end = g_date_time_add_full(begin,0,0,1,0,0,-1);
114 appt.begin = begin;114 appt.begin = begin;

Subscribers

People subscribed via source and target branches