/* * See the README file for copyright information and how to reach the author. */ #include #include #include "mymenusetup.h" typedef struct { int Width; int Align; } RecListDefaultType; RecListDefaultType recListDefaultValues[MAX_COLTYPES] = { { 0,0}, { 5,0}, { 8,0}, { 5,0}, {14,0}, { 4,2}, { 7,0}, { 5,0}, { 5,0} }; #if VDRVERSNUM > 10713 cNestedItemList RecordingDirCommands; #else cCommands RecordingDirCommands; #endif mySetup::mySetup() { mysetup.HideMainMenuEntry=0; mysetup.PatchNew=1; mysetup.ReplaceOrgRecMenu=0; for(int i=0; iSetSelectable(false); Add(sItem); // build up setup menu for(int i=0; iSetSelectable(false); Add(sItem); // restore current position SetCurrent(Get(current)); } eOSState myMenuSetupColumns::ProcessKey(eKeys Key) { int iTemp_type [4], i; for (i=0; i= 0) { preclistcolumns[iChanged].Width = recListDefaultValues[preclistcolumns[iChanged].Type].Width; preclistcolumns[iChanged].Align = recListDefaultValues[preclistcolumns[iChanged].Type].Align; Set(); Display(); } if (state == osUnknown) { switch (Key) { case kOk: return osBack; default: break; } } return state; } int msprintf(char **strp, const char *fmt, ...) { va_list ap; va_start (ap, fmt); int res=vasprintf (strp, fmt, ap); va_end (ap); return res; } char* IndentMenuItem(const char* szString, int indentions) { char* szIndented = NULL; msprintf(&szIndented, "%*s", strlen(szString)+indentions*2, szString); return szIndented; }