diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-16 12:20:46 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-16 12:20:46 +0100 |
commit | 26d2fe51d139362a99d76a90de490138dea7477e (patch) | |
tree | b8296cdd1cdeca748b5d4be7fc72ddbc4093415a /menu.c | |
parent | 3432b2638c97ec1ac8afa9aa08246d221e2f89a5 (diff) | |
download | vdr-26d2fe51d139362a99d76a90de490138dea7477e.tar.gz vdr-26d2fe51d139362a99d76a90de490138dea7477e.tar.bz2 |
An ongoing editing process is now canceled if either the original or the edited version of the recording is deleted from the Recordings menu
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 2.35 2012/01/14 13:06:03 kls Exp $ + * $Id: menu.c 2.36 2012/02/16 11:57:51 kls Exp $ */ #include "menu.h" @@ -2383,9 +2383,19 @@ eOSState cMenuRecordings::Delete(void) } cRecording *recording = GetRecording(ri); if (recording) { + if (cCutter::Active(ri->FileName())) { + if (Interface->Confirm(tr("Recording is being edited - really delete?"))) { + cCutter::Stop(); + recording = Recordings.GetByName(ri->FileName()); // cCutter::Stop() might have deleted it if it was the edited version + // we continue with the code below even if recording is NULL, + // in order to have the menu updated etc. + } + else + return osContinue; + } if (cReplayControl::NowReplaying() && strcmp(cReplayControl::NowReplaying(), ri->FileName()) == 0) cControl::Shutdown(); - if (recording->Delete()) { + if (!recording || recording->Delete()) { cReplayControl::ClearLastReplayed(ri->FileName()); Recordings.DelByName(ri->FileName()); cOsdMenu::Del(Current()); |