summaryrefslogtreecommitdiff
path: root/myreplaycontrol.c
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2007-10-08 20:36:03 +0200
committerAndreas Mair <andreas@vdr-developer.org>2007-10-08 20:36:03 +0200
commit57e0533f20b14e208e41e56f80fd15b3d18f90f1 (patch)
tree2e75d86377b4fbc29c9fd76fabd2a5e291a9f204 /myreplaycontrol.c
parent8adfaaf81b104b8e981026da593e40f9d780c251 (diff)
downloadvdr-plugin-extrecmenu-57e0533f20b14e208e41e56f80fd15b3d18f90f1.tar.gz
vdr-plugin-extrecmenu-57e0533f20b14e208e41e56f80fd15b3d18f90f1.tar.bz2
Version 1.0v1.0
- it is now possible to cancel a moving-between-filesystems-process - applied changes for MainMenuHooksPatch - added MainMenuHooksPatch to contrib/-dir; removed old one, which is now obsolete - free disk space is shown for the filesystem of the current directory (can be switched of in plugin's setup menu) - added support for hidding PIN-protected recordings in co-work with PIN-Plugin - added queue for moving recordings between filesystems - added cutter queue - added #ifdef's to switch of font patching for vdr >= 1.5.3 - added setup option to switch of font patching
Diffstat (limited to 'myreplaycontrol.c')
-rw-r--r--myreplaycontrol.c58
1 files changed, 46 insertions, 12 deletions
diff --git a/myreplaycontrol.c b/myreplaycontrol.c
index 5305746..d929272 100644
--- a/myreplaycontrol.c
+++ b/myreplaycontrol.c
@@ -2,16 +2,21 @@
* See the README file for copyright information and how to reach the author.
*/
+#include <string>
#include <vdr/interface.h>
#include <vdr/status.h>
#include <vdr/menu.h>
+#include <vdr/cutter.h>
#include "myreplaycontrol.h"
#include "mymenusetup.h"
+#include "tools.h"
using namespace std;
-char *myReplayControl::Cut=NULL;
-char *myReplayControl::Cutted=NULL;
+myReplayControl::myReplayControl()
+{
+ timesearchactive=false;
+}
myReplayControl::~myReplayControl()
{
@@ -21,18 +26,47 @@ myReplayControl::~myReplayControl()
eOSState myReplayControl::ProcessKey(eKeys Key)
{
- if(Key==kBack)
- return osEnd;
-
- if(Key==kEditCut)
+ if(Key!=kNone)
{
- free(Cut);
- Cut=strdup(LastReplayed());
+ if(Key==kBack)
+ return osEnd;
+
+ if(timesearchactive)
+ {
+ if(Key<k0 && Key>k9)
+ timesearchactive=false;
+ }
+ else
+ {
+ if(Key==kEditCut)
+ {
+ const char *filename=NowReplaying();
- cRecording recording(LastReplayed());
- free(Cutted);
- Cutted=strdup(recording.PrefixFileName('%'));
+ if(filename)
+ {
+ if(MoveCutterThread->IsCutting(filename))
+ Skins.Message(mtError,tr("Recording already in cutter queue!"));
+ else
+ {
+ cMarks marks;
+ marks.Load(filename);
+
+ if(!marks.Count())
+ Skins.Message(mtError,tr("No editing marks defined!"));
+ else
+ {
+ MoveCutterThread->AddToCutterQueue(filename);
+ Skins.Message(mtInfo,tr("Added recording to cutter queue"));
+ }
+ }
+ }
+ return osContinue;
+ }
+
+ if(Key==kRed)
+ timesearchactive=true;
+ }
}
-
+
return cReplayControl::ProcessKey(Key);
}