From 20683b994128131bcb22f89f00282cefdc54fc04 Mon Sep 17 00:00:00 2001 From: Martin Prochnow Date: Fri, 17 Mar 2006 15:11:32 +0100 Subject: Version 0.6a - fixed problem with open directories --- HISTORY | 3 +++ extrecmenu.h | 2 +- mymenumoverecording.c | 17 +++++++++++++++++ mymenurecordings.c | 22 ++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 8862d7c..128ef6b 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,9 @@ VDR Plugin 'extrecmenu' Revision History ---------------------------------------- +2006-03-17: Version 0.6a +- fixed problem with open directories + 2006-03-16: Version 0.6 - after the replay of a recording ended, the menu jumps now to the last replayed recording diff --git a/extrecmenu.h b/extrecmenu.h index eb0a438..f78b7b9 100644 --- a/extrecmenu.h +++ b/extrecmenu.h @@ -1,6 +1,6 @@ #include -static const char *VERSION = "0.6"; +static const char *VERSION = "0.6a"; static const char *DESCRIPTION = "Extended recordings menu"; static const char *MAINMENUENTRY = "ExtRecMenu"; diff --git a/mymenumoverecording.c b/mymenumoverecording.c index 317c3f2..5f41b61 100644 --- a/mymenumoverecording.c +++ b/mymenumoverecording.c @@ -64,6 +64,7 @@ myMenuMoveRecordingItem::myMenuMoveRecordingItem(cRecording *Recording,int Level if(LevelName(); while(Level) { @@ -75,6 +76,22 @@ myMenuMoveRecordingItem::myMenuMoveRecordingItem(cRecording *Recording,int Level if(p) *p=0; SetText(title); +*/ + s=Recording->Name(); + const char *p=s; + while(*++s) + { + if(*s == '~') + { + if(Level--) + p=s+1; + else + break; + } + } + title=MALLOC(char,s-p+1); + strn0cpy(title,p,s-p+1); + SetText(title); } else SetText(""); 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(LevelName(); + 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 -- cgit v1.2.3