[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Patch: KIconDialog: Make the Enter key works!
From: Sébastien_Laoût <slaout () linux62 ! org>
Date: 2005-09-20 16:33:53
Message-ID: 200509201833.54552.slaout () linux62 ! org
[Download RAW message or body]
Nobody to comment on that?
Le Dimanche 18 Septembre 2005 16:06, Sébastien Laoût a écrit :
> Hello,
>
> The Enter key does not work when choosing an icon in the KIconDialog.
> We are obliged to put the mouse on hand and click the button Ok, or press
> Alt+O.
> That annoyed me for a long time, so I decided to look at the code and fix
> that bug.
>
> I'm sorry, I don't have KDE source libs installed and am not able to test
> if that work, but I've done similar code for another project, so it should
> be OK.
>
> In /kio/kfile/kicondialog.cpp arround line 313:
> mpCanvas = new KIconCanvas(main);
>
> connect(mpCanvas,SIGNAL(executed(QIconViewItem*)),SLOT(slotAcceptIcons()));
> +connect(mpCanvas,SIGNAL(returnPressed(QIconViewItem*)),SLOT(slotAcceptIcon
>s())); mpCanvas->setMinimumSize(400, 125);
>
> In /kio/kfile/kicondialog.cpp arround line 346:
> void KIconDialog::slotAcceptIcons()
> {
> d->custom=QString::null;
> + actionButton(KDialogBase::Ok)->animateClick();
> slotOk();
> }
>
> It connect the signal QDialog::returnPressed().
> And it generate an animated click on the Ok button (like any Enter keypress
> on any normal dialog).
> The animated click will also be played when clicking an icon.
> If that's not good, then slotAcceptIcons() need to be duplicated to only
> animate when returnPressed() is emitted, and not executed().
>
> Can anyone commit this change?
>
> Thanks,
> Sébastien Laoût.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic