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

List:       kde-devel
Subject:    [PATCH] kcontrol: focus of search text field
From:       Robin Stocker <robin () nibor ! org>
Date:       2006-02-28 22:53:14
Message-ID: 4404D45A.9090909 () nibor ! org
[Download RAW message or body]

Hello,

The attached patch applies to kdebase/kcontrol/kcontrol/toplevel.cpp in 
the 3.5 branch.

It fixes two small things in the Control Center search part. The 
improvements are:

- Set the initial focus on the search text field instead of the "clear 
search" button, which saves one keypress/click on the first search :)
- Change the "clear search" button to behave like the one in Konqueror, 
that is to not only clear the text field but also pass the focus to it

The patch was tested on my system.

Regards,
   Robin Stocker

["focus.patch" (text/plain)]

Index: kcontrol/kcontrol/toplevel.cpp
===================================================================
--- kcontrol/kcontrol/toplevel.cpp	(revision 514632)
+++ kcontrol/kcontrol/toplevel.cpp	(working copy)
@@ -108,8 +108,10 @@
   searchLayout->addWidget( label );
   
   KLineEdit *searchEdit = new KLineEdit( mSearchFrame );
+  searchEdit->setFocus();
   clearButton->setFixedHeight( searchEdit->height() );
   connect( clearButton, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) );
+  connect( clearButton, SIGNAL( clicked() ), searchEdit, SLOT( setFocus() ) );
   label->setBuddy( searchEdit );
   searchLayout->addWidget( searchEdit );
   connect( searchEdit, SIGNAL( textChanged( const QString & ) ),


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