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

List:       kde-core-devel
Subject:    [PATCH] KDirOperator: associate action collection with parent rather
From:       Anders Lund <anders () alweb ! dk>
Date:       2008-03-23 20:02:58
Message-ID: 200803232102.58261.anders () alweb ! dk
[Download RAW message or body]

Here is another patch for KDirOperator. If setting the shortcutContext to 
Qt::WidgetWithChildrenShortcut should make sense, the actioncollection 
shouldn't be associated with the toplevel window.

This patch means that the shortctus from kdiroperator does not conflict with 
the host app (such as kate), and the widgetn needs to be focused to be 
navigated.

With this patch, I do not need to manipulate the shortcuts in kdiroperator 
from kates file browser.

Thank your to Albert Astals Cid for pointing it out.

-- 
Anders

www: http://www.alweb.dk
jabber: anderslund@jabber.dk

["kdiroperator-associateonlyparent.patch" (text/x-diff)]

Index: kdiroperator.cpp
===================================================================
--- kdiroperator.cpp	(revision 789171)
+++ kdiroperator.cpp	(working copy)
@@ -1653,7 +1653,7 @@ void KDirOperator::setupActions()
     // an interface to add a custom action collection.
 
 #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
-    d->actionCollection->addAssociatedWidget(topLevelWidget());
+    d->actionCollection->addAssociatedWidget(parentWidget());
     foreach (QAction* action, d->actionCollection->actions())
       action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
 #endif


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

Configure | About | News | Add a list | Sponsored by KoreLogic