[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: xmlgui, DefineGroup vs. MergeLocal
From:       David Faure <faure () kde ! org>
Date:       2009-10-15 8:49:13
Message-ID: 200910151049.14333.faure () kde ! org
[Download RAW message or body]

On Tuesday 13 October 2009, Andreas Pakulat wrote:
> > > Why only there? Looking at the ui.rc of KDevelop almost all
> > > DefineGroups which use an append have the same name for the group as
> > > the name of the append location.
> > >
> > > Now, having to create the same standard groups in all hosts ui.rc
> > > files, is that what you propose, Andreas? Or should this be rather be
> > > done as kind of default by the XMLGUI code?
> >
> > Hmm. I see the benefit, this is a way to actually make (some of the)
> > ui_standards.rc merging available to parts (and other guiclients), since
> > it defines merging groups that happen to be exactly where the MergeLocals
> > in ui_standards.rc are ;-)
> > Clever; this way we don't really break existing parts, since they have to
> > use group="...." explicitely.
> >
> > Doing this automatically is an option; I think it's as simple as adding
> > <DefineGroup>s in ui_standards.rc, under each MergeLocal. Want to try
> > that?
> 
> I'll try that over the weekend. Just to make sure I'm testing the right
> thing: I'll add a <DefineGroup name="new_group" append="new_merge"/> to
> ui_standards.rc 

Well if you add it to ui_standards.rc itself, you don't need the append 
attribute. This was only a way to add groups "from the outside". But if you're 
inside, it's simpler, just put the group where you want it ;)

> and then use that group for an action in kpart and see
> wether it shows up in Konqueror along the "New" actions, right?

Yes.

> > > Not directly related, but idea popped up:
> > > And what about using a naming scheme like with the icons,
> > > group.subgroup.subsubgroup...? An action would fall into the first
> > > group namespace the XMLGUI host offers. But perhaps this is KDE5 stuff,
> > > as any separator char might be already in use.
> >
> > I assume the use case would be "giving the host the ability to choose the
> > granularity it wants for the groups, either a few big groups, or a lot of
> > small ones"? Not sure if we need more magic in xmlgui though... :)
> > More seriously the real question is how many apps would want to use this.
> 
> I don't think it would be used that much, currently ui_standards.rc defines
> enough merge points (IMHO) and if the above works as expected there'll be
> about the same amount of groups. Hence there should be some group a kpart
> can choose to add its actions or the action is really so extra-special that
> should appear at the end of the menu. At least I'm pretty sure that
> KDevelop doesn't have a need for that.

OK, cool.

-- 
David Faure, faure@kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic