[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kaxul
From: Laurent Montel <montel () kde ! org>
Date: 2003-06-03 20:53:20
[Download RAW message or body]
CVS commit by mlaurent:
Implement disable menu item.
M +12 -8 kaxul.cpp 1.41
M +11 -5 kaxul.h 1.13
--- kdenonbeta/kaxul/kaxul.cpp #1.40:1.41
@@ -994,4 +994,8 @@ QString val;
act->menuText = val;
act->text = m.attribute("label");
+
+ if (m.attribute("disabled") == "true") {
+ act->isEnabled=false;
+ }
out.appendChild(a);
ac.append(act);
--- kdenonbeta/kaxul/kaxul.h #1.12:1.13
@@ -102,6 +102,7 @@ private:
class Action {
public:
- Action() : isGroup(false) {}
+ Action() : isGroup(false), isEnabled(true) {}
bool isGroup;
+ bool isEnabled;
QPtrList<Action> group;
@@ -149,4 +150,9 @@ private:
p = createProperty("accel", accel, "string", doc);
n.appendChild(p);
+ if( !isEnabled ) {
+ p = createProperty("enabled", "false", "bool", doc);
+ n.appendChild(p );
+
+ }
if (!menuText.isEmpty()) {
p = createProperty("menuText", menuText, "string", doc);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic