Bug 135752

Summary: filter keyboard shortcut does not work unless filter is included in the "apply filter" menu
Product: [Unmaintained] kmail Reporter: BORGULYA Gábor <bugs2>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.9.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description BORGULYA Gábor 2006-10-16 14:34:08 UTC
Version:           1.9.1 (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

Filter keyboard shortcut does not work unless the filter is included in the "apply filter" menu.
Expected behavior: when a keyboard shortcut is assigned to a filter, the shortcut should activate the filter disregarding any other settings.
If the present behaviour is intentional, the shourtcut option in the filter setup dialog window should be disabled if the include in the menu checkbox is off.
Comment 1 Andreas Gungl 2006-10-17 06:52:44 UTC
The present behavior is intentional. I'll change the code to disable the shortcut option.
Comment 2 Andreas Gungl 2006-10-17 07:11:31 UTC
SVN commit 596291 by gungl:

Disable the shortcut definition if the filter is not going to be added to the menu.
BUGS: 135752


 M  +2 -0      kmfilterdlg.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmfilterdlg.cpp #596290:596291
@@ -226,6 +226,7 @@
       gl->addMultiCellWidget( keyButtonLabel, 7, 7, 2, 2 );
       mKeyButton = new KKeyButton( adv_w, "FilterShortcutSelector" );
       gl->addMultiCellWidget( mKeyButton, 7, 7, 3, 3 );
+      mKeyButton->setEnabled( false );
       mConfigureToolbar = new QCheckBox( i18n("Additionally add this filter to the toolbar"), adv_w );
       gl->addMultiCellWidget( mConfigureToolbar, 8, 8, 0, 3 );
       mConfigureToolbar->setEnabled( false );
@@ -497,6 +498,7 @@
 {
   if ( mFilter ) {
     mFilter->setConfigureShortcut( aChecked );
+    mKeyButton->setEnabled( aChecked );
     mConfigureToolbar->setEnabled( aChecked );
     mFilterActionIconButton->setEnabled( aChecked );
     mFilterActionLabel->setEnabled( aChecked );
Comment 3 BORGULYA Gábor 2006-11-20 22:36:48 UTC
Thank you for implementing the improved function! -- BG