Re: Smart empty submenus

On Sun, 2003-09-28 at 19:51, 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?

Is reusing is_important for this really a good idea? I don't see why
it's the same thing at all; reusing it because it is otherwise unused
for menu items with submenus seems a bit dubious.


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