diff -Nru indicator-datetime-13.10.0+14.04.20140225/debian/changelog indicator-datetime-13.10.0+14.04.20140227/debian/changelog --- indicator-datetime-13.10.0+14.04.20140225/debian/changelog 2014-02-27 12:00:16.000000000 +0000 +++ indicator-datetime-13.10.0+14.04.20140227/debian/changelog 2014-02-27 12:00:16.000000000 +0000 @@ -1,3 +1,16 @@ +indicator-datetime (13.10.0+14.04.20140227-0ubuntu1) trusty; urgency=low + + [ Charles Kerr ] + * Don't log E_CLIENT_ERROR_NOT_SUPPORTED errors returned by + e_cal_client_get_attachment_uris() -- we can silently interpret that + as 'no attachments' (LP: #1285212) + * DateTime::format(), don't pass NULL to a std::string's assignment + operator (LP: #1285243) + * In EdsPlanner's get_appointments(), sort 'em before returning them + to the caller. (LP: #1285249) + + -- Ubuntu daily release Thu, 27 Feb 2014 10:59:26 +0000 + indicator-datetime (13.10.0+14.04.20140225-0ubuntu1) trusty; urgency=low [ Charles Kerr ] diff -Nru indicator-datetime-13.10.0+14.04.20140225/src/date-time.cpp indicator-datetime-13.10.0+14.04.20140227/src/date-time.cpp --- indicator-datetime-13.10.0+14.04.20140225/src/date-time.cpp 2014-02-25 16:57:55.000000000 +0000 +++ indicator-datetime-13.10.0+14.04.20140227/src/date-time.cpp 2014-02-27 10:59:07.000000000 +0000 @@ -85,9 +85,15 @@ std::string DateTime::format(const std::string& fmt) const { - const auto str = g_date_time_format(get(), fmt.c_str()); - std::string ret = str; - g_free(str); + std::string ret; + + gchar* str = g_date_time_format(get(), fmt.c_str()); + if (str) + { + ret = str; + g_free(str); + } + return ret; } diff -Nru indicator-datetime-13.10.0+14.04.20140225/src/planner-eds.cpp indicator-datetime-13.10.0+14.04.20140227/src/planner-eds.cpp --- indicator-datetime-13.10.0+14.04.20140225/src/planner-eds.cpp 2014-02-25 16:58:33.000000000 +0000 +++ indicator-datetime-13.10.0+14.04.20140227/src/planner-eds.cpp 2014-02-27 10:59:17.000000000 +0000 @@ -26,6 +26,7 @@ #include #include +#include // std::sort() #include #include @@ -407,11 +408,17 @@ *** walk through the sources to build the appointment list **/ - std::shared_ptr main_task(new Task(this, func), [](Task* task){ + auto task_deleter = [](Task* task){ + // give the caller the (sorted) finished product + auto& a = task->appointments; + std::sort(a.begin(), a.end(), [](const Appointment& a, const Appointment& b){return a.begin < b.begin;}); + task->func(a); + // we're done; delete the task g_debug("time to delete task %p", (void*)task); - task->func(task->appointments); delete task; - }); + }; + + std::shared_ptr main_task(new Task(this, func), task_deleter); for (auto& kv : m_clients) { @@ -516,8 +523,11 @@ e_cal_client_get_attachment_uris_finish(E_CAL_CLIENT(client), res, &uris, &error); if (error != nullptr) { - if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED) && + !g_error_matches(error, E_CLIENT_ERROR, E_CLIENT_ERROR_NOT_SUPPORTED)) + { g_warning("Error getting appointment uris: %s", error->message); + } g_error_free(error); }