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 781231 - Let the calendar list be sorted everywhere the same manner
Let the calendar list be sorted everywhere the same manner
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: User Interface
unspecified
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-12 18:10 UTC by Mohammed Sadiq
Modified: 2017-04-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (3.24 KB, patch)
2017-04-19 17:57 UTC, Evgeny Shulgin
none Details | Review
Patch #1 (1.50 KB, patch)
2017-04-20 16:44 UTC, Evgeny Shulgin
committed Details | Review
Patch #2 (1.22 KB, patch)
2017-04-20 16:59 UTC, Evgeny Shulgin
committed Details | Review
Patch #3 (1.07 KB, patch)
2017-04-20 17:01 UTC, Evgeny Shulgin
committed Details | Review

Description Mohammed Sadiq 2017-04-12 18:10:55 UTC
The calendar list seems to be sorted a bit differently in quick add popover calendar selection.


How to reproduce:
1. Add several new calendars, with the names "Test", "testing", "Testing again" "test only" (case sensitive)
2. See how calendars are sorted in quick add popover and calendar list (near the menu)

Result:
The sorting of calendars in quick add popover and calendar list in menu seems to based on different heuristics.

Thanks
Comment 1 Evgeny Shulgin 2017-04-13 15:20:19 UTC
Assuming that you have added calendars with the names 1, 2, 3, 4 one by one. Then "Manage your calendars" button will give you (1, 2, 3, 4), "Menu button"->"Add event" will give (2, 4, 3, 1), and "Right mouse button on the day"->"Calendar list" will give you (1, 3, 4, 2). I guess you would like to have the initial order (1, 2, 3, 4) in all the cases?
Comment 2 Georges Basile Stavracas Neto 2017-04-17 18:54:23 UTC
Yes. Everything should be sorted alphabetically.
Comment 3 Evgeny Shulgin 2017-04-19 17:57:10 UTC
Created attachment 350087 [details] [review]
Patch

Details in the commit message
Comment 4 Georges Basile Stavracas Neto 2017-04-19 18:33:51 UTC
Review of attachment 350087 [details] [review]:

Nice patch! I'd like to request the following changes:

 - Please, split this patch in one per file (one for edit dialog, one for window and one for source dialog)
 - The commit message needs some improvement. Please follow what is described in the Newcomers guideline (https://wiki.gnome.org/Newcomers/SubmitPatch)

Also:

::: src/gcal-edit-dialog.c
@@ +102,3 @@
+static gint        sources_menu_sort_func                 (gconstpointer      a,
+                                                           gconstpointer      b);
+

Don't need to add the prototype here.
Comment 5 Evgeny Shulgin 2017-04-20 16:44:19 UTC
Created attachment 350151 [details] [review]
Patch #1

(the first part)
Comment 6 Evgeny Shulgin 2017-04-20 16:59:18 UTC
Created attachment 350152 [details] [review]
Patch #2
Comment 7 Evgeny Shulgin 2017-04-20 17:01:54 UTC
Created attachment 350153 [details] [review]
Patch #3
Comment 8 Georges Basile Stavracas Neto 2017-04-24 12:55:12 UTC
Review of attachment 350151 [details] [review]:

LGTM
Comment 9 Georges Basile Stavracas Neto 2017-04-24 12:56:32 UTC
Review of attachment 350152 [details] [review]:

LGTM
Comment 10 Georges Basile Stavracas Neto 2017-04-24 12:56:49 UTC
Review of attachment 350153 [details] [review]:

LGTM
Comment 11 Georges Basile Stavracas Neto 2017-04-24 12:59:47 UTC
Thanks for the patches!

Attachment 350151 [details] pushed as d76bf34 - edit-dialog: sort the list of calendars in alphabetical order
Attachment 350152 [details] pushed as 6728ddd - source-dialog: use case-insensitive sorting in the calendar list
Attachment 350153 [details] pushed as 7798f38 - window: use case-insensitive sorting in the calendar list