[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kross/ui
From: Nickolai Shaforostoff <shafff () ukr ! net>
Date: 2009-02-06 0:33:52
Message-ID: 1233880432.493983.9811.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 921949 by shaforo:
use kaction adaptor to make setting shortcuts for krossactions possible.
CCMAIL:mail@dipe.org
see http://lists.kde.org/?l=kde-core-devel&m=122205784322692&w=2
M +8 -2 plugin.cpp
--- trunk/KDE/kdelibs/kross/ui/plugin.cpp #921948:921949
@@ -19,6 +19,7 @@
#include "plugin.h"
+#include <kaction.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <krun.h>
@@ -109,7 +110,7 @@
i.next();
action->addObject(i.value(), i.key());
}
-
+
// Create and append new Menu element if doesn't exist
if(menuElement.isNull()) {
menuElement = document.createElement("Menu");
@@ -142,7 +143,12 @@
menuElement.appendChild(newActionElement);
- actionCollection()->addAction(action->name(), action);
+
+ KAction* adaptor=new KAction(action->text(), action);
+ connect (adaptor,SIGNAL(triggered()),action,SLOT(trigger()));
+ adaptor->setEnabled(action->isEnabled());
+ adaptor->setIcon(action->icon());
+ actionCollection()->addAction(action->name(), adaptor);
}
foreach(const QString &collectionname, collection->collections()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic