summaryrefslogtreecommitdiff
path: root/mymenurenamerecording.c
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2006-04-17 17:00:18 +0200
committerAndreas Mair <andreas@vdr-developer.org>2006-04-17 17:00:18 +0200
commit3c04e4ce347dff915def3a79f348f2f46e60564d (patch)
tree51defa818f251ce9d70472ad202b85165c6837fc /mymenurenamerecording.c
parent82bfd4c15949019ede37b2b04be79659c5c65dbe (diff)
downloadvdr-plugin-extrecmenu-0.9a.tar.gz
vdr-plugin-extrecmenu-0.9a.tar.bz2
Version 0.9av0.9a
- fixed #ifdef's for JumpPlay-patch in myreplaycontrol.c; thanks to Thomas Günther for reporting - include fixed 'dvdarchive.sh', umount wasn't possible; thanks to Mase from vdr-portal.de for reporting - added support for CmdSubMenu-patch, it should now be possible to use sub menus if you patched your VDR with BigPatch or CmdSubMenu-patch
Diffstat (limited to 'mymenurenamerecording.c')
-rw-r--r--mymenurenamerecording.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/mymenurenamerecording.c b/mymenurenamerecording.c
deleted file mode 100644
index 5259f3d..0000000
--- a/mymenurenamerecording.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#include <vdr/videodir.h>
-#include <vdr/menu.h>
-#include <vdr/remote.h>
-#include "mymenurecordings.h"
-#include "tools.h"
-
-myMenuRenameRecording::myMenuRenameRecording(cRecording *Recording,myMenuRecordings *MenuRecordings):cOsdMenu(tr("Rename recording"),12)
-{
- recording=Recording;
- menurecordings=MenuRecordings;
-
- char *p=strrchr(recording->Name(),'~');
- if(p)
- {
- strn0cpy(name,++p,sizeof(name));
- strn0cpy(path,recording->Name(),sizeof(path));
-
- p=strrchr(path,'~');
- if(p)
- *p=0;
- }
- else
- {
- strn0cpy(name,recording->Name(),sizeof(name));
- strn0cpy(path,"",sizeof(path));
- }
- Add(new cMenuEditStrItem(tr("Name"),name,sizeof(name),tr(FileNameChars)));
- cRemote::Put(kRight);
-}
-
-eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
-{
- eOSState state=cOsdMenu::ProcessKey(Key);
- if(state==osContinue)
- {
- if(Key==kOk)
- {
- char *buffer;
- char *newfilename;
-
- if(strlen(path))
- asprintf(&buffer,"%s~%s",path,name);
- else
- asprintf(&buffer,"%s",name);
-
- asprintf(&newfilename,"%s/%s/%s",VideoDirectory,ExchangeChars(buffer,true),strrchr(recording->FileName(),'/')+1);
-
- if(MoveVideoFile(recording,newfilename))
- {
- menurecordings->Set(true);
- state=osBack;
- }
- else
- {
- Skins.Message(mtError,tr("Error while accessing recording!"));
- state=osContinue;
- }
- free(buffer);
- free(newfilename);
- }
- if(Key==kBack)
- return osBack;
- }
- return state;
-}