← Back to team overview

elementaryart team mailing list archive

[Bug 837813] Re: granite.appmenu should work the same as gtk.menu

 

We could add an attribute, but I don't see the point, when you add a
menubar, if you want File->Open, you'll have to create a menu with
"Open" in it. Here, it is the same thing, we have AppMenu->Open ;)

I'm sorry, we can't have all possible constructor in granite, we have to
make choices, else, it is too hard to maintain (yeah, maybe it seems
simplier, but it is really hard to build a library with 5-10
contributors...).

And, finally, you can easily to that by sublclassing appmenu, example:

public class CustomApp : AppMenu
{
public Gtk.Menu menu;
public CustomApp()
{
   menu = new Gtk.Menu();
   base(menu);
}
public void append(Gtk.MenuItem bar)
{
  menu.append(bar);
}
}
(untested code)

** Changed in: granite
       Status: New => Invalid

-- 
You received this bug notification because you are a member of
elementary desktop team, which is the registrant for Granite.
https://bugs.launchpad.net/bugs/837813

Title:
  granite.appmenu should work the same as gtk.menu

Status in Granite Framework:
  Invalid

Bug description:
  I think it's not a good idea to use a menu as argument in the
  constructor of appmenu, it should work exactly as gtk.menu I think,
  you know, a constructor without arguments and an append() function.

To manage notifications about this bug go to:
https://bugs.launchpad.net/granite/+bug/837813/+subscriptions


References