Bug 247497

Summary: Akonadi KCM: Search field in 'Add Resource' dialog should be focussed by default
Product: [Frameworks and Libraries] Akonadi Reporter: Elias Probst <mail>
Component: generalAssignee: Volker Krause <vkrause>
Status: RESOLVED FIXED    
Severity: normal CC: kdepim-bugs
Priority: NOR    
Version: 1.4.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Elias Probst 2010-08-12 12:06:13 UTC
Version:           1.4.0 (using KDE 4.5.0) 
OS:                Linux

When adding a resource in the Akonadi KCM, the search field to filter the list of available resource types isn't focussed by default.

The usability would be improved here by setting the focus by default to the search field.

Reproducible: Always
Comment 1 Elias Probst 2010-08-12 17:40:02 UTC
Volker Krause suggested the following patches:

kdelibs:
diff -ruN kdelibs-4.5.0.orig/kdeui/itemviews/kfilterproxysearchline.cpp kdelibs-4.5.0/kdeui/itemviews/kfilterproxysearchline.cpp
--- kdelibs-4.5.0.orig/kdeui/itemviews/kfilterproxysearchline.cpp       2009-09-23 21:24:05.000000000 +0200
+++ kdelibs-4.5.0/kdeui/itemviews/kfilterproxysearchline.cpp    2010-08-12 16:19:10.013000036 +0200
@@ -71,6 +71,7 @@
     d->searchLine = new KLineEdit( this );
     d->searchLine->setClearButtonShown( true );
     d->searchLine->setClickMessage(i18n("Search"));
+    setFocusProxy( d->searchLine );
 
     QHBoxLayout* layout = new QHBoxLayout( this );
     layout->setMargin( 0 );


kdepimlibs:
diff -ruN kdepimlibs-4.5.0.orig/akonadi/agenttypedialog.cpp kdepimlibs-4.5.0/akonadi/agenttypedialog.cpp
--- kdepimlibs-4.5.0.orig/akonadi/agenttypedialog.cpp   2009-11-13 11:57:00.000000000 +0100
+++ kdepimlibs-4.5.0/akonadi/agenttypedialog.cpp        2010-08-12 15:19:38.304000036 +0200
@@ -49,6 +49,7 @@
   KFilterProxySearchLine* searchLine = new KFilterProxySearchLine( mainWidget() );
   layout->addWidget( searchLine );
   searchLine->setProxy( d->Widget->agentFilterProxyModel() );
+  searchLine->setFocus();
 
   layout->addWidget( d->Widget );


The behaviour didn't change so far, does anyone have further ideas?
Comment 2 Christophe Marin 2011-02-21 23:38:27 UTC
Seems this was fixed in September (commit 9572a417)

Elias, retry please.