Bug 70459

Summary: KParts::MainWindow::createGUI() fails to activate KActions in KActionMenus
Product: [Frameworks and Libraries] kdelibs Reporter: Ian <ian>
Component: generalAssignee: Simon Hausmann <hausmann>
Status: RESOLVED FIXED    
Severity: normal CC: amitshah, kloecker
Priority: NOR    
Version: 3.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: this patch makes a few modifications to kpartstest to demonstrate the bug
this patch makes a few modifications to kpartstest to demonstrate the bug (second try)

Description Ian 2003-12-15 02:04:59 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    RedHat RPMs

The following keyboard commands do not work in Kmail when Kmail is opened with Kontact.  When Kmail 1.5.94  is opened on its own, they seem to work fine:

F (Forward)
Shift-F (Forward Inline)
E - Redirect
Comment 1 Ian 2003-12-15 02:06:57 UTC
Hmmm.. after closing Kontact and restarting it, now they appear to work. Not sure if I should mark as resolved or not.  I'll keep an eye on this, and see if it happens again.
Comment 2 Ian 2003-12-18 02:00:18 UTC
Marking as resolved.  Have had no further problems.
Comment 3 David Cornish 2004-01-30 16:22:18 UTC
I can reproduce this bug still in KDE 3.2 RC-1, RedHat RPMs.  It would seem that only occurs after a different component is selected in Kontact (eg. To Do or Contacts) and then Mail is selected again.  Then F and shift-F stop working.  However, until you select another component, on the first instance of using the Kmail KPart, it works fine, which is why it appeared to work for Ian after restarting Kontact.  This bug therefore need to be re-opened for fixing.
Comment 4 Ingo Klöcker 2004-01-30 17:59:16 UTC
I can confirm this problem.
Comment 5 Ingo Klöcker 2004-01-31 14:51:55 UTC
I'll attach a patch for the kpartstest which demonstrates the bug.
Comment 6 Ingo Klöcker 2004-01-31 14:55:46 UTC
Created attachment 4452 [details]
this patch makes a few modifications to kpartstest to demonstrate the bug

To test run kpartstest. Make sure that part 2 hasn't been activated (a few
times it was activated although that shouldn't have happened according to the
code). Press 'a' and 'f'. You'll see that both shortcuts work. Now activate
part 2 and then reactivate part 1. Try again 'a' and 'f'. You'll notice that
'a' does work again, but that 'f' doesn't work anymore.
Comment 7 Ingo Klöcker 2004-01-31 15:00:14 UTC
Created attachment 4453 [details]
this patch makes a few modifications to kpartstest to demonstrate the bug (second try)

Apparently the file name input field in bugzilla expects a full path although
using a relative path (relative to $HOME) works nicely with autocompletion.
Comment 8 Martin Köbele 2004-01-31 15:03:19 UTC
I experience the bug, too.
Comment 9 Ingo Klöcker 2004-01-31 15:08:47 UTC
I forgot to mention that the problem seems to be related to the not working KAction being in a KActionMenu.
Comment 10 Ingo Klöcker 2004-02-15 19:03:05 UTC
For KMail we do now workaround this problem by explicitely adding the Forward actions to a "Forward" submenu of the Message menu (in the XMLUI file) instead of using the Forward KActionMenu for the Message menu. So in KDE 3.2.1 Forward will still work in the Mail component after switching to other components in Kontact.

Since the general problem remains I don't close this bug report.
Comment 11 Martin Köbele 2004-03-02 21:57:52 UTC
thanks for the workaround. it works :)
Comment 12 Till Adam 2004-07-20 19:17:07 UTC
*** Bug 74052 has been marked as a duplicate of this bug. ***
Comment 13 David Faure 2009-08-21 02:20:29 UTC
SVN commit 1013868 by dfaure:

Ported the old testcase from bug 70459 to kde4; seems to work fine, the bug is fixed.
(was "shortcuts of actions inside a KActionMenu stop working after activating another part and back")
Ingo: if the workaround from comment 10 is still there in kmail, it can be removed :)
BUG: 70459


 M  +1 -0      kpartstest_part1.rc  
 A             kpartstest_part2.rc  
 M  +30 -3     parts.cpp  
 M  +4 -0      parts.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1013868