Re: Smart empty submenus



On Mon, Sep 29, 2003 at 01:51:03AM +0200, Matthias Clasen wrote:
> It occurred to me that submenus pose similar problems to separators in
> connection with merging: you don't know in advance whether they will end
> up with visible children after merging. For those submenus which end up
> empty, there are two reasonable behaviours:
> 
> a) make them disappear by hiding the menu item they're attached to
> b) add an insensitive "Empty" item.
> 
> Here is a patch which implements this by reusing the "is_important"
> property of the associated action. If the action is not marked as
> important, the menu will be hidden when empty. The patch currently
> involves some inter-module communication via object data, I'll rework
> that it there is interest in this feature. The text used for the "Empty"
> item is currently hardwired to "Empty". Should this be settable
> per-menu?

Good thought.  That will definitely come in handy when we layout
some sort of common menu scheme.

Dunno if the empty text requires configurabilty.  Doesn't seem like
it would hurt, but I also couldn't see a situation where it was
absolutely required.  I'd vote to add it if it was not too
difficult.

Thanks



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