GNOME Bugzilla – Bug 544157
Sort View / Window (sub)menu in shortcut order
Last modified: 2008-08-04 06:34:54 UTC
The View / Window (sub)menu shows the Mail item first, then the Contacts item and lastly the Calendars, Tasks and Memos items sorted alphabetically (taking locale in account). In a number of locales this will show up as: Mail Ctrl+1 Contacts Ctrl+2 Calendars Ctrl+3 Memos Ctrl+5 Tasks Ctrl+4 So this submenu is (in those locales) sorted neither alphabetically nor in shortcut order. This easist fix is to sort this (sub)menu in shortcut order (in all locales): Mail Ctrl+1 Contacts Ctrl+2 Calendars Ctrl+3 Tasks Ctrl+4 Memos Ctrl+5 That is also the order used in the Quick Reference Card (with minor spelling differences). Other information: I'll try to attach a trivial fix shortly.
Created attachment 115003 [details] [review] patch against current trunk This should be the easiest fix (I didn't even try sorting alphabetically).
I don't know if the patch is correct, it seems to depend on the locale translation. So is this a duplicate of bug 333026?
0) The patch should be correct. You can test it yourself. First run "env LANG=xx_XX evolution" (with a number of locales). Then edit /usr/lib/bonobo/servers/GNOME_Evolution_Calendar.server, in the same way as this patch does. You should see this: $grep sort_order /usr/lib/bonobo/servers/GNOME_Evolution_Calendar.server <oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/> <oaf_attribute name="evolution:button_sort_order" type="string" value="-7"/> <oaf_attribute name="evolution:button_sort_order" type="string" value="-6"/> Finally, run "env LANG=xx_XX evolution" again (with those same locales, maybe after restarting the bonobo server, i.e. log out and in your GNOME session). 1) By the way, the central code is component_info_compare_func() in shell/e-component-registry.c: static int component_info_compare_func (EComponentInfo *a, EComponentInfo *b) { if (a->sort_order != b->sort_order) return a->sort_order - b->sort_order; return strcmp (a->button_label, b->button_label); } Mail has sort_order "-10", Contacts has sort order "-9" (both set in some other .server file). Calendars, Memos and Tasks presently all have sort_order "-8". Net effect: Mail and Contacts at the top, the other three sorted on their "button_label", which is locale dependent. My patch fixes that last bit, by ensuring a sort on "sort_order" for all five items. 2) Yes, this is a duplicate of bug #333026. This bug now has a patch and the above explanation, so we could just close that bugreport as a duplicate. If not, we should edit my proposed changelog entry.
*** Bug 333026 has been marked as a duplicate of this bug. ***
Milan/Matt, can you guys review it?
Looks okay to me, as long as the current button order has no significance. I assume not. One can imagine several heuristics for ordering Mail, Contacts, and Calendars as they are, but they're all a wash when it comes to Tasks and Memos. Note that I'm rewriting this whole mechanism in my "kill-bonobo" branch. I'll make the equivalent changes to the branch. Paul, please commit. And remember to announce the UI change to gnome-doc-list.
(In reply to comment #6) > Paul, please commit. No commit rights. > And remember to announce the UI change to gnome-doc-list. Is this really a (important enough) UI change? It just shuffles (up to three) items in a sub-menu (but not in all locales)? Anyway, I'm not familiar with the procedure of announcing changes to that list. Would you have a pointer to some further background, instructions, etc.?
because of http://live.gnome.org/Schedule
(In reply to comment #8) > because of http://live.gnome.org/Schedule Could you perhaps clarify that remark?
We are in String change announcement period for GNOME 2.23 now, so changes have to be announced. Also see http://live.gnome.org/TwoPointTwentythree for the long version.
... well, not only String but also UI changes of course. Sorry for the noise.
(In reply to comment #7) > Is this really a (important enough) UI change? It just shuffles (up to three) > items in a sub-menu (but not in all locales)? It also changes the switcher button order on the sidebar, which is a very visible change and will affect quite a few screenshots in the user documentation.
(In reply to comment #12) > It also changes the switcher button order on the sidebar, which is a very > visible change and will affect quite a few screenshots in the user > documentation. Thanks, didn't realize that.
Patch committed to SVN trunk as r35900 http://svn.gnome.org/viewvc/evolution?view=revision&revision=35900 Please close the bug after announcing String/UI change to gnome-doc-list and gnome-i18n.
Announced. http://mail.gnome.org/archives/gnome-doc-list/2008-August/msg00009.html