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

List:       kde-edu-devel
Subject:    Re: [Kde-edu-devel] kde-edu status
From:       Chris Howells <chrish () gmx ! co ! uk>
Date:       2001-12-19 17:02:29
[Download RAW message or body]

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

On Wednesday 19 December 2001 4:42 pm, Jason Harris wrote:
> yet.  I am pretty sure the problem is that KStars uses the KAction::plug()

I see.

> mechanism to add buttons to the toolbar, which as far as I can tell, no
> other apps use anymore (does someone know another one?).

Best way to see is grepping through the source code ;)

grep -ir "plug(" *

Some of this useful hits:

kdebase/kdesktop/krootwm.cc:        
m_actionCollection->action("sort_nc")->plug( pArrangeMenu );
kdebase/kdesktop/krootwm.cc:        
m_actionCollection->action("sort_nci")->plug( pArrangeMenu );
kdebase/kdesktop/krootwm.cc:        
m_actionCollection->action("sort_size")->plug( pArrangeMenu );
kdebase/kdesktop/krootwm.cc:        
m_actionCollection->action("sort_type")->plug( pArrangeMenu );
kdebase/kdesktop/krootwm.cc:        
m_actionCollection->action("sort_directoriesfirst")->plug( pArrangeMenu );

etc.

>  I would just
> switch to XMLGUI, but I don't know how to add a custom widget to a toolbar
> using XMLGUI (Kstars uses a spinbox in the toolbar).

OK.

> If I don't get an
> answer from kdelibs soon, I guess I'll use insertButton()/insertWidget()
> instead of plug() to populate my toolbar.  KVocTrain uses insertButton(),
> so I know that will work.

Is there any reason why they don't use plug() any more? Is it depreciated? 
What benefits does insertButton() or insertWidget() offer?

> Unless someone can point me to XMLGUI docs that cover non-button widgets in
> the toolbar...

Have a look at say the KMessedWords source code, and how we use setPopup() on 
btnHelp even though btnHelp is defined at through an XMLGUI.

I haven't really looked much at the KStars sources yet, but that might give 
you an idea how to acomplish it.....

- -- 
Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org
Web: http://chrishowells.co.uk, PGP key: http://chrishowells.co.uk/pgp.txt
KDE: http://www.koffice.org, http://edu.kde.org, http://usability.kde.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8IMglF8Iu1zN5WiwRAolMAJ0WHd99G3JANz899y7zNEnizL/3KACbBxqi
SiApaSfvign/JWOkekIiAe0=
=7Gwc
-----END PGP SIGNATURE-----

_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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