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 781348 - The label "Done (X)" is converted to "Done (0)" when clicking back_button
The label "Done (X)" is converted to "Done (0)" when clicking back_button
Status: RESOLVED FIXED
Product: gnome-todo
Classification: Other
Component: User Interface
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GNOME To Do maintainer(s)
GNOME To Do maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-04-15 18:49 UTC by Evgeny Shulgin
Modified: 2017-04-21 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.16 KB, patch)
2017-04-15 19:06 UTC, Evgeny Shulgin
none Details | Review
Patch (1.51 KB, patch)
2017-04-20 16:15 UTC, Evgeny Shulgin
none Details | Review
Changed patch (1.49 KB, patch)
2017-04-20 16:39 UTC, Evgeny Shulgin
committed Details | Review

Description Evgeny Shulgin 2017-04-15 18:49:12 UTC
How to reproduce:

1) Choose any task list (the default one is "Personal" with blue color)
2) You should have in this list more than 0 finished tasks, then at bottom you will have the label like "Done (3)"
3) Click back_button at the bottom left corner
4) A few moments this label will look as "Done (0)", right after clicking
Comment 1 Evgeny Shulgin 2017-04-15 19:06:42 UTC
Created attachment 349893 [details] [review]
Patch
Comment 2 Georges Basile Stavracas Neto 2017-04-20 15:59:44 UTC
Review of attachment 349893 [details] [review]:

Thanks for the patch. I believe the correct solution for this issue is to make gtd_task_list_view__update_done_label() correctly generate the label instead (i.e. if view->priv->complete_tasks == 0, it prints "%s", otherwise it prints "%s (%d)")
Comment 3 Evgeny Shulgin 2017-04-20 16:15:41 UTC
Created attachment 350147 [details] [review]
Patch
Comment 4 Georges Basile Stavracas Neto 2017-04-20 16:31:37 UTC
Review of attachment 350147 [details] [review]:

Nice! Two nitpicks:

 - The commit title needs improvement. In To Do, the commit title is formatted like:

 "module-name: description of the task"

 - No need for two lines (see below)

::: src/gtd-task-list-view.c
@@ +777,3 @@
+    {
+      new_label = g_strdup_printf ("%s",
+                                   _("Done"));

Nitpick: should be one line only.
Comment 5 Evgeny Shulgin 2017-04-20 16:39:46 UTC
Created attachment 350149 [details] [review]
Changed patch
Comment 6 Georges Basile Stavracas Neto 2017-04-21 12:44:44 UTC
Review of attachment 350149 [details] [review]:

Looks good!
Comment 7 Georges Basile Stavracas Neto 2017-04-21 12:46:41 UTC
Thanks for the patch!

Attachment 350149 [details] pushed as 3fdaa02 - task-list-view: replaced "Done (0)" with "Done" in the done_label