Patch for KShortcutsEditor and KXMLGui

Andreas Pakulat apaku at gmx.de
Fri Oct 3 19:47:06 BST 2008


On 20.09.08 22:54:52, Michael Jansen wrote:
> I tried the following patch for KShortcutsEditor so applications using KXMLGui 
> would not have their shortcuts show in one big group. I tried to show the 
> action of a collection under the short description or name of their component. 
> 
> It didn't work out as i expected. That aboutData part isn't really up to date 
> or used at all in kde's code.
> 
> Apply the patch and have a look at kate and kdevelop 
> 
> In kdevelop you can see they do not provide about datas for their plugins. 
> they just use different component names. 
> 
> Kate is even more lazy. They just use one component for their plugins named 
> 'kate'.
> 
> Have a look at konqueror. Much better :-) .

I've fixed up kdevplatform and am going to fix kdevelop next. That is all
plugins provide a reasonable aboutData information.
 
> There are some things i don't understand. Why is the about description for 
> kate empty?

Are you talking about katepart or kate-app plugins? The former don't seem
to provide any aboutdata, so just a componentName and also a catalogName
apparently. 

kate-app plugins all use the KGenericFactory and K_EXPORT_COMPONENT_FACTORY
macro, which I think is deprecated nowadays in favor of
KPluginLoad+KPluginFactory. But I can't find any evidence of that right
now, except a deprecation of KGenericFactory and the KLibFactory class
(which are related).

>  Kate provides a short description but somehow i can't get it. It 
> always uses the program name.

I'm actually not sure how much sense it makes to use the short description
field in the tree. I think just the i18n'ed program name should be fine.
Maybe provide the description as tooltip?

BTW: In KDevelop I'm seeing the short description of "katepart", however in
kate itself I see "Katepart" instead!

> I really would like to somehow provide this but i guess it would lead to much 
> uproar because all projects would have to  be much more accurate with their 
> plugins and components/aboutData. And seeing kdevxyz in a guy isn't nive for 
> the user.

Well, kate-app-plugins are just 2 or 3 hand full, not a big deal to convert
and the same goes for kate-part-plugins (just 1 handfull). I'd be available
to do that. The question is how many other apps have plugins and don't
provide about data properly.

IMHO having "kdevxyz" is also not a big deal, its at least giving you some
hint to which plugin the shortcuts belong
 
> Is it worth it? Is it possible to provide some kind of opt in for this 
> feature? I have currently no idea of KXMLGui.

I don't have much of an idea about the shortcuts editor, but can't you use
"Shortcuts" as fall back if the i18n'ed program name is empty?

I've just tried the patch and it works fine, except that it adds all
plugins to the tree, even those that don't have any actions in their
actioncollection.

I think this is a kde3 feature that definetly needs to be brought back.

Andreas

-- 
Try the Moo Shu Pork.  It is especially good today.




More information about the kde-core-devel mailing list