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

Menu & autocollapsing of submenus



In an attempt to save the world from disaster, Avery Pennarun wrote:


> Early Warning: I don't use the menu package myself.

Doesn't seem to matter.
 
> Correct me if I'm wrong, but I assume that the problem is this:  if you have
> only one or two options in a submenu, the additional submenu level means
> extra clicking and dragging and it looks silly.  But if you have lots of
> options, it's good to have a submenu.  Because different people have
> different packages installed, these conditions can differ on a per-install
> basis so no "single answer" is the right one.

Although at the moment I don't think this is the core of the problem,
I do get the point you want to make.

[..]

> The solution I came up with was this:  collapse menus with only one/two
> entries into the parent automatically.  

Seems interesting. Maybe well worth the time to write support for
that too in menu.

I guess one way to do it to provide both a $section and a $real_section
variable in the /etc/menu-methods/* files, with the $section containing
the name of the section that menu thought would be best for the user,
while $real_setion would be the real name.

Then add two (optional) variables in the menu-method files like

  collapse_submenu=4
  expand_submenu=12

that will cause menu to start to collapse a menu if it has less than
4 entries, and attempt to expand a submenu if it has more than 12 entries.
The expanding would be by simply creating an extra level that has
menutitles like "A-G", "H-O", "P-" (splitting the submenu by first letter
or something).

> I think it's really important that the defaults in user interfaces be
> intelligent, because most users will simply accept them and never bother to
> change them. 

One other goal for me when I wrote menu was to allow the user
to see what s/he's got installed on his/her computer. I myself don't
really use the Debian menu's very often (I pop up xterms by pressing C-F1,
and then start up emacs by typing "emacs" -- much faster than going through
the whole menustructure). But when I do walk through the Debian menu's,
I occasionally am surprised to see an entry that wasn't there before.
And I notice a programme that I apparently installed some time
ago (maybe because something else depended on it). 

I imagine new users to use the menustructure to see what's on their
computers, and if they find a programme they like, simply learn it's
name and type it in on the keyboard.

> This approach really worked well for me in my project, and this seems to be
> the same problem.  Sadly, the company I was working for won't allow me to
> release the source code, so I guess you'll have to trust me :)
> 
> Just ask if you want any implementation advice, but I (sorry, again) don't
> have time to do it myself...

Ah. Well, I myself don't have any time to code this myself any time
soon eighter. But I if I ever get some time, I will certainly consider
using it to add your suggestions.

-- 
joost witteveen, joostje@debian.org

The upstream maintainer is allowed to do things different 
than Debian, but only if he has good reasons to do so.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: