From kde-core-devel Wed Jul 24 06:32:50 2002 From: Hadacek Nicolas Date: Wed, 24 Jul 2002 06:32:50 +0000 To: kde-core-devel Subject: Re: KKeyChooser/KKeyDialog question X-MARC-Message: https://marc.info/?l=kde-core-devel&m=102749292932574 Le Vendredi 19 Juillet 2002 18:15, David Faure a écrit : > On Friday 19 July 2002 08:11, Hadacek Nicolas wrote: > > Le Vendredi 28 Juin 2002 19:00, Anders Lund a écrit : > Hmm, the idea is good, but coming up with a good API isn't easy. > Reason: action collections are autocreated, usually. > So developers would have to remember doing actionCollection()->setTitle( > i18n("Editor Component") ). > > Ah, but here's another idea: we already know the 'parent' of the action > collection ("Kate", "KHTML Part" etc.). It's the KInstance. And I see that > the KActionCollection ctors know take a KInstance. > > Can you try if actionCollection->instance()->aboutData()->programName() > returns the right thing in most cases ? (test all those pointers ;) well I've done some quick tests in konqueror : - html view: ok, there are "khtml" and "konqueror" - file view : not ok, there are "konqueror" and "shortcuts" (the default) - txt view : not ok but not my fault :), there is only "konqueror" and the txt editor shortcuts are in "Configure editor..." (not a very standard place imho) I will commit the patch anyway tonight. It's better than nothing imho. cu, Nicolas