Re: Smart empty submenus
- From: Matthias Clasen <maclas gmx de>
- To: gtk-devel-list gnome org
- Subject: Re: Smart empty submenus
- Date: Tue, 30 Sep 2003 23:01:23 +0200
Am Di, 2003-09-30 um 05.28 schrieb Jody Goldberg:
> 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.
I decided to leave it out for now. We can add a "empty_menu_label"
property on GtkAction later if we need it.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]