KKeyChooser/KKeyDialog question

David Faure david at mandrakesoft.com
Fri Jul 19 17:15:47 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 19 July 2002 08:11, Hadacek Nicolas wrote:
> Le Vendredi 28 Juin 2002 19:00, Anders Lund a écrit :
> 
> > KKeyChooser uses a tree listview to indicate that the actions to configure
> > origins from different sources.
> >
> > However, in applications all the parent items has the text "Shortcuts"
> > whicyh is not very informative...
> >
> > In Kate, there are many sources: the main app, the editor component,
> > various plugins.
> >
> > The question: Is there an easy way get the names of all those sources
> > displayed in the key chooser, for exmple "Kate", "Editor Component",
> > "Insert File Plugin" etc?
> 
> > Maybe defining a KKeyChooser::insert( KActionCollection *, const QString &)
> > would be nice?
> >
> > Or adding a property "title" to KActionCollection and then use that one?
> 
> Ok here is a patch to implement the first option (very simple indeed). Since 
> Ellis is not there, I need some other people advice...

Looks good to me, but see below.

> the second option can also be done easily and can be used elsewhere (?).
> opinions ?

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 ;)


David - on holidays from 20/07 to 24/07.

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2-beta2 is out! http://dot.kde.org/1025176121/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ODsz72KcVAmwbhARAqvbAJ4k4pMXdSQQMYsWfSIk6CpDXAvSjgCfbUga
5TKsHSfK4lwqtg6W8tYDOZ8=
=+6fQ
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list