diff options
author | Martin Prochnow <nordlicht@martins-kabuff.de> | 2006-03-17 15:11:32 +0100 |
---|---|---|
committer | Andreas Mair <andreas@vdr-developer.org> | 2006-03-17 15:11:32 +0100 |
commit | 20683b994128131bcb22f89f00282cefdc54fc04 (patch) | |
tree | 18d3d48a8a95b072771e7a2d3fe5567e8ebdaacc /mymenurecordings.c | |
parent | a245047c8c60d3acc0af75f5ffc7479cfeacd34d (diff) | |
download | vdr-plugin-extrecmenu-20683b994128131bcb22f89f00282cefdc54fc04.tar.gz vdr-plugin-extrecmenu-20683b994128131bcb22f89f00282cefdc54fc04.tar.bz2 |
Version 0.6av0.6a
- fixed problem with open directories
Diffstat (limited to 'mymenurecordings.c')
-rw-r--r-- | mymenurecordings.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mymenurecordings.c b/mymenurecordings.c index fcc74dc..d39867c 100644 --- a/mymenurecordings.c +++ b/mymenurecordings.c @@ -31,16 +31,38 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level) // create the title of this item if(Level<level) // directory entries { +/* s=Recording->Name(); + printf("%s\n",s); + while(Level) { s=strchr(Recording->Name(),'~')+1; Level--; } + asprintf(&title,"\t\t%s",s); char *p=strchr(title,'~'); if(p) *p=0; +*/ + s=Recording->Name(); + const char *p=s; + while(*++s) + { + if(*s == '~') + { + if(Level--) + p=s+1; + else + break; + } + } + title=MALLOC(char,s-p+3); + *title='\t'; + *(title+1)='\t'; + strn0cpy(title+2,p,s-p+1); + name=strdup(title+2); } else |