[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: menu 2.1.15 sorts sections differently: how to sort sections?



On Sat, Jul 10, 2004 at 07:31:46PM -0700, William Ballard wrote:
> I have added a /etc/menu/menu.frequent with my frequently used commands:
> 
> ?package(local.mystuff):needs="x11" section="0Frequent" sort="001" 
> title="Name 1" command="Command 1"
> ...
> ?package(local.mystuff):needs="x11" section="0Frequent" sort="001" 
> title="Name n" command="Command n"
> 
> Because I want to sort the commands not by their title, but by the way I 
> want to sort them, I also use this patch to menu.h:
> 
> -sort=tolower(title())
> +sort=ifelse($sort,$sort,"ZZZ") ":" tolower(title())
> 
> which works fine for the commands.  But if the section name is 
> "Frequent", it will sort after "Apps" and "Databases" in the sections.  
> I *Had* been using "_Frequent" to make the section sort at the top, but 
> 2.1.15 broke that: it now sorts "_Frequent" after "Apps", as part of its 
> effort to sort French things correctly as described in the changelog.
> 
> Is there a way to explicitly specify the sorting of sections like you 
> can for commands?  IIRC you cannot.  Am I stuck using the silly section 
> name "0Frequent" to make it sort to the top?  At least _Frequent kind of 
> stood out visually.

In fact you can, you just need to add a menu entry for the section:

?package(local.section): needs="text" title="Frequent" section="/" sort="001"

This is not really documented and I don't know exactly how that works
yet, but I will investigate and document it properly.

Cheers,
Bill



Reply to: