[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kaxul
From: George Staikos <staikos () kde ! org>
Date: 2003-06-06 2:47:39
[Download RAW message or body]
CVS commit by staikos:
after a long fight trying to figure out why I was losing events for actions,
I discover that I was never creating them to being with, only storing the
event<->signal mapping. D'oh.
this patch adds basic menu action event support
M +8 -1 kaxul.cpp 1.47
--- kdenonbeta/kaxul/kaxul.cpp #1.46:1.47
@@ -650,4 +650,5 @@ int KaXul::parseNodes(const QDomElement&
qDebug("found an entry");
QDomElement item = \
_out.createElement("item"); + \
parseEvents(ie);
\
item.appendChild(createProperty("text", ie.attribute("label"), \
"string"));
ne.appendChild(item);
@@ -969,4 +970,5 @@ bool haveTb = false, haveMb = false;
qDebug("found a toolbar");
QDomElement tb = _out.createElement("toolbar");
+ parseEvents(e);
tb.appendChild(createProperty("name", e.attribute("id"), \
"cstring"));
tb.appendChild(createProperty("label", e.attribute("id"), \
"string")); @@ -1018,4 +1020,5 @@ QString val;
val.insert(val.find(e.attribute("accesskey")[ 0 ], \
0, false), '&'); i.setAttribute("text", val);
+ parseEvents(e);
rc = parseMenu(e, i, _actionCollection);
out.appendChild(i);
@@ -1054,4 +1057,6 @@ QString val;
Action *act = new Action;
+ parseEvents(m);
+ addEventHandler(m, "oncommand", \
"activated()"); act->name = m.attribute("id");
a.setAttribute("name", act->name);
@@ -1064,5 +1069,5 @@ QString val;
if (m.attribute("disabled") == "true") {
- act->isEnabled=false;
+ act->isEnabled = false;
}
out.appendChild(a);
@@ -1082,4 +1087,5 @@ QString val;
a = _out.createElement("action");
a.setAttribute("name", act->name);
+ parseEvents(m);
out.appendChild(a);
ac.append(act);
@@ -1134,4 +1140,5 @@ QString val;
// FIXME: parse <menupopup>/<menuitem>
}
+ parseEvents(e);
out.appendChild(a);
ac.append(act);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic