Bug 130118

Summary: ok-button in action-selector is not assigned to return-key
Product: [Unmaintained] kio Reporter: Fabian Köster <f.koester>
Component: mediaAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: wishlist CC: wstephenson
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Fabian Köster 2006-07-01 20:06:21 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages

When I insert some media like discs or usb-sticks and the kde-daemon comes up with some choises for actions to do, I would like to select the method with the arrow-keys and just press the enter key for the selected method, but I have to do these things with the mouse. For me as a keyboard-freak this is not optimal and I do not see any aspect why this should not be implemented.
Comment 1 Will Stephenson 2006-10-07 01:11:20 UTC
Confirmed.  The bug happens because the list of actions gets focus and for some reason does not propagate the return key press.  If I set the dialog's main widget to a QLabel, the problem still occurs.  However, krfb's confirm incoming vnc connection dialog uses similar code but does not have this problem.  Investigating further...
Comment 2 Will Stephenson 2006-10-07 01:34:19 UTC
SVN commit 593174 by wstephens:

Explicitly give focus back to the Ok button, otherwise the list view of
actions swallows the Return keypress (unnecessarily as it has no tree to
expand).

Now don't complain that you have to tab onto the listview...

BUG: 130118


 M  +3 -0      notificationdialog.cpp  


--- branches/KDE/3.5/kdebase/kioslave/media/medianotifier/notificationdialog.cpp #593173:593174
@@ -26,6 +26,7 @@
 #include <klistbox.h>
 #include <qlabel.h>
 #include <qcheckbox.h>
+#include <qpushbutton.h>
 
 #include "actionlistboxitem.h"
 #include "notificationdialogview.h"
@@ -70,6 +71,8 @@
 	         this, SLOT( delayedDestruct() ) );
 
 	m_actionWatcher->startScan();
+	QPushButton * btn = actionButton( Ok );
+	btn->setFocus();
 }
 
 NotificationDialog::~NotificationDialog()