Re: Menu groups vs. use of separators



On 6/14/07, Alex Jones <alex weej com> wrote:
On Thu, 2007-06-14 at 08:15 +0200, Sven Neumann wrote:
> Hi,
>
> On Thu, 2007-06-14 at 03:26 +0100, Alex Jones wrote:
>
> > I've been looking at how Rhythmbox allows plugins to manipulate menus
> > (via UI manager magic), and it dawned on me that there is no way to
> > separate these out visually, other than to attempt to guess whether
> > there should be a separator placed above and/or below what you're trying
> > to insert. Of course, what I really want GTK to do is to insert
> > separators *between* groups of menu items. Having this kind of ability
> > would greatly simplify much goofy logic that is currently in place in a
> > lot of applications to decide where separators should be placed.
>
> You can already do that using GtkUIManager. Your application should add
> placeholders for the groups that you described. Then add separators
> between the placeholders. Plug-ins can then register in the placeholder
> items. The smart separators will only be shown when needed.

OK, but I need to know how many groups are needed here in advance. I'm
not sure this solves the problem, because when I go to programatically
add another group to the end of the list I have to decide whether there
is a separator already at the end or not.
--

That is the bit that smart separators save you from. They hide when
they end up next to the edge of the menu or next to another separator.



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