GNOME Bugzilla – Bug 760846
Scheduled panel show headers wrongly
Last modified: 2016-02-12 01:03:29 UTC
Some headers in the Scheduled panel are wrong. For example, 2016 shows before Yesterday, and Yesterday shows before the next events.
The correct order is: 1. Overdue tasks 2. Yesterday 3. Today 4. Tomorrow 5. Future tasks For future tasks that are within 1 week, the weekday name should be used. For example, <Today - Tomorrow - Wednesday - Thursday - ... - Next month - Future>. Done tasks should appear grouped according to their corresponding date. For example, if there's a completed task for today and I explicitly show it, it should be grouped in the "Today" section.
Created attachment 320922 [details] [review] panel-scheduled: Change task list order All panels use the same task list order as task list view. For scheduled panel it was requested to change the order of the items and sort them only by due date, in descending order. In order to keep things a little bit more organized, it was also sorted by title. A new API was created in task list view to support it and this patch uses that API to implement the new sort function.
Review of attachment 320922 [details] [review]: Only nitpicks, as usual. ::: plugins/eds/gtd-panel-scheduled.c @@ +195,3 @@ + GDateTime *dt1; + GDateTime *dt2; + gint retval; Nitpick: use just 1 space to separate the variable name from the type (this alignment you used here only applies to function arguments, take a look at GNU coding style guideline - https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en) @@ +216,3 @@ + g_date_time_unref (dt1); + if (dt2) + g_date_time_unref (dt2); Use g_clear_pointer (&dt, g_date_time_unref) to avoid these if's
Created attachment 320926 [details] [review] panel-scheduled: Change task list order All panels use the same task list order as task list view. For scheduled panel it was requested to change the order of the items and sort them only by due date, in descending order. In order to keep things a little bit more organized, it was also sorted by title. A new API was created in task list view to support it and this patch uses that API to implement the new sort function.
Great patch, thanks for the fix. Attachment 320926 [details] pushed as feb4a35 - panel-scheduled: Change task list order