KDialogBase patch - make the first widget initially focused

Lubos Lunak l.lunak at suse.cz
Wed Jan 29 11:58:49 GMT 2003

On Monday 27 of January 2003 21:22, Mirko Boehm wrote:
> <quote who="Lubos Lunak">
> >  I figured KDialogBase is even explicitly forcing focus on the button
> > for some
> > strange reason (strange, because Enter or at least Ctrl+Enter activates
> > that  button anyway). This patch both disables this explicit giving of
> > the focus to  the button, and also reorders all buttons in the dialog to
> > be at the end of  the tab order. Does somebody know why KDialogBase was
> > written this way, or is  it ok to commit the patch?
> Well, Espen Sand knows, he is the one who changed KDialogBase to its
> current state. He also introduced the weird KJanusWidget, which in my
> opinion is a violation of the C++ approach (it displays the different
> kinds of dialogs, but this should be done in a couple of derived widgets).
> But I think the respective dialog developer will have to decide which
> widget should have focus first.

 But forcing it by default on the buttons is wrong IMHO. If I write a dialog 
based on QDialog, the first widget will have focus, if this dialog is changed 
to use KDialogBase, suddenly it will be the first button having the focus.

 Another try: The KDialogBase patch is almost the same, and there's additional 
patch for KActiveLabel, as that one IMHO shouldn't actually get focus, as 
it's a label after all, even though based on QTextBrowser.

 Is it ok to commit it?

Lubos Lunak
KDE developer
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdialogbase.cpp.patch
Type: text/x-diff
Size: 1192 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030129/a5a0faec/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kactivelabel.cpp.patch
Type: text/x-diff
Size: 501 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030129/a5a0faec/attachment-0001.patch>

More information about the kde-core-devel mailing list