diff options
author | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-30 19:27:34 +0000 |
---|---|---|
committer | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-30 19:27:34 +0000 |
commit | 103c8fcf6249e180676c923d4e0ea6714709f829 (patch) | |
tree | ff724bef91911910f716d040496835a955bf28bc /src/SubMenuItemSetup.cpp | |
parent | 5c11a7ca61041493f79270e16d53f3590269241e (diff) | |
download | vdr-plugin-menuorg-103c8fcf6249e180676c923d4e0ea6714709f829.tar.gz vdr-plugin-menuorg-103c8fcf6249e180676c923d4e0ea6714709f829.tar.bz2 |
Fixed SubMenuItemSetup
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@6177 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/SubMenuItemSetup.cpp')
-rw-r--r-- | src/SubMenuItemSetup.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SubMenuItemSetup.cpp b/src/SubMenuItemSetup.cpp index 804d262..571e6d4 100644 --- a/src/SubMenuItemSetup.cpp +++ b/src/SubMenuItemSetup.cpp @@ -22,24 +22,24 @@ #include "SubMenuItemSetup.h" +const char AllowedChars[] = "$ abcdefghijklmnopqrstuvwxyz0123456789-.#~\\^$[]|()*+?{}/:%"; + cSubMenuItemSetup::cSubMenuItemSetup(SubMenuNode* node) -:cOsdMenu(tr("Edit Sub Menu Item")) +:cOsdMenu(tr("Edit Sub Menu Item"), 8) { - asprintf(&_newName, "%s", node->Text().c_str()); -// _newName=node->Text(); + strn0cpy(_newName, node->Text().c_str(), sizeof(_newName)); CreateMenuItems(); } cSubMenuItemSetup::~cSubMenuItemSetup() { // TODO: write back the changes - free(_newName); } void cSubMenuItemSetup::CreateMenuItems() { // Add textItem for name attribute - Add(new cMenuEditStrItem(tr("name"), _newName, 64, NULL)); + Add(new cMenuEditStrItem(tr("name"), _newName, sizeof(_newName), tr(AllowedChars))); } eOSState cSubMenuItemSetup::ProcessKey(eKeys Key) |