[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KEditToolbar
From: Hamish Rodda <rodda () kde ! org>
Date: 2006-07-12 15:09:08
Message-ID: 200607130109.11532.rodda () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Wednesday 12 July 2006 11:38, Jason Harris wrote:
> Hi,
>
> I'm trying to implement editable toolbars for KStars. I've got:
>
> void KStars::slotConfigureToolbars() {
> saveMainWindowSettings( KGlobal::config(), "MainWindow" );
> KEditToolbar ket = new KEditToolbar(actionCollection());
> connect(ket,SIGNAL(newToolbarConfig()),this,SLOT(slotApplyToolbarConfig())
>);
>
> //ket.exec();
> //DEBUG
> if ( ket.exec() == QDialog::Accepted ) {
> kDebug() << "KEditToolbar dialog returned Accepted" << endl;
> }
> }
>
> void KStars::slotApplyToolbarConfig() {
> //DEBUG
> kDebug() << "Recreating GUI..." << endl;
>
> createGUI();
> applyMainWindowSettings( KGlobal::config(), "MainWindow" );
> }
>
> ...and slotConfigureToolbars() is connected to
> KStdAction::configureToolbars(). This is basically straight from the
> KEditToolbar API dox.
>
> The KEditToolbars dialog opens and behaves just fine, but on pressing Apply
> or Ok, the toolbar does not get updated to reflect the changes I made, and
> I never see my "Recreating GUI" debug message (so it's never getting to
> slotApplyToolbarConfig() ). I do get the "KEditToolbar dialog returned
> Accepted" debug message.
>
> Another weirdness is that after pressing "Apply", the "Apply" button does
> not get disabled. Looking at kedittoolbar.cpp, slotApply() both disables
> the Apply button and emits the newToolbarConfig() Signal, so it seems this
> slot is never being reached. Indeed, there's no connect() statement
> involving slotApply() in kedittoolbar.cpp.
>
> Anyone have a clue about this?
Hmm, sounds like edit toolbars might be broken. I wasn't aware that it's
broken though.
However, should LiveUI make it past the design/implementation/acceptance
stage, the whole edittoolbars class will be rewritten, so unless someone
volunteers to fix edittoolbars (which is likely to be fairly pointless) I'd
recommend waiting for now.
Cheers,
Hamish.
[Attachment #5 (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic