summaryrefslogtreecommitdiff
path: root/src/CommandItemSetup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommandItemSetup.cpp')
-rw-r--r--src/CommandItemSetup.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/CommandItemSetup.cpp b/src/CommandItemSetup.cpp
index ed35660..125e7b2 100644
--- a/src/CommandItemSetup.cpp
+++ b/src/CommandItemSetup.cpp
@@ -25,9 +25,11 @@
cCommandItemSetup::cCommandItemSetup(CommandMenuNode* node)
:cOsdMenu(tr("Edit Command Menu Item"))
{
- _newName = node->Text();
- _newCommand = node->Command();
- _newConfirm = node->ShouldConfirm();
+ asprintf(&_newName, "%s", node->Text().c_str());
+ asprintf(&_newCommand, "%s", node->Command().c_str());
+// _newName = node->Text();
+// _newCommand = node->Command();
+ _newConfirm = (int) node->ShouldConfirm();
CreateMenuItems();
}
@@ -36,7 +38,6 @@ cCommandItemSetup::~cCommandItemSetup()
// TODO: write back the changes
free(_newName);
free(_newCommand);
- free(_newConfirm);
}
void cCommandItemSetup::CreateMenuItems()
@@ -48,7 +49,7 @@ void cCommandItemSetup::CreateMenuItems()
Add(new cMenuEditStrItem(tr("command"), _newCommand, 200, NULL));
// Add boolItem for confirm attribute
- Add(new cMenuEditBoolItem(tr("confirm"), _newConfirm));
+ Add(new cMenuEditBoolItem(tr("confirm"), &_newConfirm));
}
eOSState cCommandItemSetup::ProcessKey(eKeys Key)