Re: Smart empty submenus
- From: Owen Taylor <otaylor redhat com>
- To: Matthias Clasen <maclas gmx de>
- Cc: gtk-devel-list gnome org
- Subject: Re: Smart empty submenus
- Date: Tue, 30 Sep 2003 17:26:48 -0400
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.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]