From kde-core-devel Fri Aug 07 13:56:53 2009 From: Raphael Kubo da Costa Date: Fri, 07 Aug 2009 13:56:53 +0000 To: kde-core-devel Subject: Re: xmlgui, DefineGroup vs. MergeLocal Message-Id: <68c3445d0908070656y11e5bcfcu81df0dbf9ea0d363 () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=124965347313241 2009/8/7 Andreas Pakulat : > Hi, > > I need some input from the xmlgui experts (if there are any :). > > I've had a discussion with the maintainer of okteta about KDevelop's use > of xmlgui's groups. Basically, KDevelop defines its File and other menus > by creating various groups in it (like save_merge, new_merge etc.) and > then using these groups in its plugins to properly order the menus. > > The problem is that apparently the groups are not used by any other > xmlgui-using app/kpart except kate (which probably does so only because > we're integrating it all the time). All other apps/kparts are using the > append-attribute for which appends to one of the MergeLocal > define things from ui_standards.xml in kdeui. > > Unfortunately it seems that xmlgui is incapable of merging the two > (we're using append on the DefineGroup but thats not supported as far as > I can see), which means all kpart actions of kparts that KDevelop embeds > end up at the end of the menu. > > However the xsd file explicitly says that should not > be used by kparts, but instead group should be used for merging kparts. > > Now I'm a bit confused as to wether the .xsd is just the theory and in > practice everythings the other way around, or wether there's a bug in > xmlgui somewhere or wether I should start and change all xmlgui files in > apps/kparts to use groups? I'm not sure I understood what your problem is. Some time ago I also had some problems with menu items being shown at the end in Ark as well. I think the .xsd (as well as the .dtd in the same directory) are correct: using in a plugin or part isn't supposed to work; instead, you use DefineGroup in your mainwindow's rc file with the append attribute set to where you want to put it according to ui_standards.rc and then use in your plugin/part rc. I recently added some information about this in [1] after I got Ark working, everyone's very welcome to correct and add any information, as the article still lacks some points. In the KDevelop thread, someone mentions Konqueror working without using groups; my guess is that since konqueror.rc (which is loaded by a mainwindow) uses noMerge="1", the default ui_standards.rc entries won't be loaded at all. Other actions not defined there are merged because of the tag. [1] http://techbase.kde.org/Development/Architecture/KDE4/XMLGUI_Technology#MergeLocal_.2F_Merge