← Back to team overview

elementary-dev-community team mailing list archive

Re: [Granite] AppMenu modification

 

To go back to the original issue, if I'm understanding it, is that people
would like to have the option of using an appmenu without any pre-loaded
icons. This is the way it used to be with the original AppMenu class that
someone wrote ages ago. When I created the AppMenu class currently in
Granite, I also forced those pre-loaded menuitems that are being discussed.
The idea was basically threefold:

1. Force consistency with the appmenu interface across granite apps.
2. Make it easier for end-developers to add in appmenus (previously your app
would have to explicitly add the appmenus, which would usually result in 10
or so lines of copypasta.
3. I didn't anticipate anyone needing to use the appmenu for anything but..
an appmenu.

I think this comes down to a HIG question. Should appmenus be allowed to be
used for non-appmenu purposes (i.e Xapantu's use in Euclide)? Should
developers be allowed to override the appmenu items?

If the answer is yes to those questions, I think what might make sense is
another constructor for appmenu/some way of creating a "blank" appmenu. That
way we can keep the API simple for people to use an work with, but
allow flexibility where needed.

Avi

On Sat, Jul 30, 2011 at 4:57 PM, Daniel Fore <daniel.p.fore@xxxxxxxxx>wrote:

> I dunno I think Christian has the right idea here. If it's different enough
> to warrant it's own About, then it should probably be it's own binary,
> separate package, etc.
>
> Best Regards,
> Daniel Foré
>
> www.elementaryos.org
>
> On Jul 30, 2011, at 1:42 PM, xapantu <xapantu@xxxxxxxxx> wrote:
>
> > Hum, it was a good idea to send a mail here before merging apparently...
> >
> > The problem is the principle, I don't like having pre-configurated
> menuitems, with a global variable (which is a GraniteApplication that no one
> uses AFAIK). The bazaar explorer was just an example. We can also take an
> office suite with different application but the same binary, or something
> like that.
> >
> > The problem is that technically, we can't have an AppMenu with different
> About items in the same binary for example. So, it seems that it is clearly
> a limitation, that we could easily avoided if there was a way to configure
> the items. And the global variable is a bad thing, I think everyone will
> agree that ;)
> >
> > I will make a patch tomorrow to show what I mean, because I think I am
> not very clear ^^
> >
> > On 07/30/2011 08:13 PM, Daniel Fore wrote:
> >> Hmm, I think the Appmenu should only really be used on the app's main
> >> window really. It's supposed to contain only actions which apply to
> >> the app globally. So everything it could contain would be duplicated
> >> across windows, wouldn't it?
> >>
> >> Best Regards,
> >>
> >> Daniel Foré
> >>
> >> http://www.elementaryos.org
> >>
> >>
> >>
> >>
> >> On Sat, Jul 30, 2011 at 10:25 AM, xapantu<xapantu@xxxxxxxxx>  wrote:
> >>> Hi,
> >>>
> >>> So, currently, there are some hardcoded menuitem in it, which come from
> a
> >>> global application variable, that only maya uses AFAIK. I want to use
> an
> >>> AppMenu for a bazaar explorer, that I will embed in Euclide.
> >>>
> >>> But I don't want to re-add an "About" and "Report a problem" items,
> since
> >>> they are already in the main AppMenu. So, I would like to remove that
> from
> >>> the AppMenu, or at least to add an option which disable them by
> default.
> >>>
> >>> The code is here: lp:~xapantu/granite/appmenu
> >>>
> >>> Opinions?
> >>>
> >>> If everything is ok, I will merge it...
> >>>
> >>> --
> >>> Mailing list: https://launchpad.net/~elementary-dev-community
> >>> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> >>> Unsubscribe : https://launchpad.net/~elementary-dev-community
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >
> >
> > --
> > Mailing list: https://launchpad.net/~elementary-dev-community
> > Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~elementary-dev-community
> > More help   : https://help.launchpad.net/ListHelp
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>

References