After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760846 - Scheduled panel show headers wrongly
Scheduled panel show headers wrongly
Status: RESOLVED FIXED
Product: gnome-todo
Classification: Other
Component: User Interface
3.19.x
Other Linux
: Normal major
: ---
Assigned To: GNOME To Do maintainer(s)
GNOME To Do maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-19 15:28 UTC by Georges Basile Stavracas Neto
Modified: 2016-02-12 01:03 UTC
See Also:
GNOME target: ---
GNOME version: 3.19/3.20


Attachments
panel-scheduled: Change task list order (2.49 KB, patch)
2016-02-11 23:44 UTC, Isaque Galdino
none Details | Review
panel-scheduled: Change task list order (2.50 KB, patch)
2016-02-12 00:56 UTC, Isaque Galdino
committed Details | Review

Description Georges Basile Stavracas Neto 2016-01-19 15:28:30 UTC
Some headers in the Scheduled panel are wrong. For example, 2016 shows before Yesterday, and Yesterday shows before the next events.
Comment 1 Georges Basile Stavracas Neto 2016-02-09 19:38:21 UTC
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.
Comment 2 Isaque Galdino 2016-02-11 23:44:58 UTC
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.
Comment 3 Georges Basile Stavracas Neto 2016-02-12 00:13:27 UTC
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
Comment 4 Isaque Galdino 2016-02-12 00:56:19 UTC
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.
Comment 5 Georges Basile Stavracas Neto 2016-02-12 01:02:39 UTC
Great patch, thanks for the fix.

Attachment 320926 [details] pushed as feb4a35 - panel-scheduled: Change task list order