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 544157 - Sort View / Window (sub)menu in shortcut order
Sort View / Window (sub)menu in shortcut order
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
unspecified
Other All
: Normal minor
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 333026 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-22 13:02 UTC by Paul Bolle
Modified: 2008-08-04 06:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against current trunk (1.74 KB, patch)
2008-07-22 13:07 UTC, Paul Bolle
committed Details | Review

Description Paul Bolle 2008-07-22 13:02: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.
Comment 1 Paul Bolle 2008-07-22 13:07:00 UTC
Created attachment 115003 [details] [review]
patch against current trunk

This should be the easiest fix (I didn't even try sorting alphabetically).
Comment 2 André Klapper 2008-07-22 22:42:04 UTC
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?
Comment 3 Paul Bolle 2008-07-22 23:43:58 UTC
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.
Comment 4 André Klapper 2008-07-22 23:59:22 UTC
*** Bug 333026 has been marked as a duplicate of this bug. ***
Comment 5 Srinivasa Ragavan 2008-07-27 18:28:10 UTC
Milan/Matt, can you guys review it?
Comment 6 Matthew Barnes 2008-07-28 00:05:15 UTC
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.
Comment 7 Paul Bolle 2008-07-28 08:23:10 UTC
(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.?
Comment 8 André Klapper 2008-07-28 08:45:14 UTC
because of http://live.gnome.org/Schedule
Comment 9 Paul Bolle 2008-07-28 09:57:40 UTC
(In reply to comment #8)
> because of http://live.gnome.org/Schedule

Could you perhaps clarify that remark?
Comment 10 André Klapper 2008-07-28 10:39:22 UTC
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.
Comment 11 André Klapper 2008-07-28 10:39:55 UTC
... well, not only String but also UI changes of course. Sorry for the noise.
Comment 12 Matthew Barnes 2008-07-28 11:13:14 UTC
(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.
Comment 13 Paul Bolle 2008-07-28 11:34:43 UTC
(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.
Comment 14 Suman Manjunath 2008-08-04 04:04:58 UTC
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. 
Comment 15 Suman Manjunath 2008-08-04 06:34:54 UTC
Announced. 
http://mail.gnome.org/archives/gnome-doc-list/2008-August/msg00009.html