diff options
| -rw-r--r-- | HISTORY | 4 | ||||
| -rw-r--r-- | config.h | 6 | ||||
| -rw-r--r-- | menu.c | 13 | ||||
| -rw-r--r-- | recording.c | 11 | ||||
| -rw-r--r-- | recording.h | 3 | 
5 files changed, 23 insertions, 14 deletions
| @@ -7585,10 +7585,12 @@ Video Disk Recorder Revision History  - Fixed formatting and removed some superfluous break statements in vdr.c's command    line option switch. -2013-02-10: Version 1.7.38 +2013-02-11: Version 1.7.38  - Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk).  - Updated the Estonian OSD texts (thanks to Arthur Konovalov).  - Updated the Romanian OSD texts (thanks to Lucian Muresan).  - Updated the French OSD texts (thanks to Marc Perrudin).  - Updated the Macedonian OSD texts (thanks to Dimitar Petrovski). +- Fixed moving editing marks, so that they don't get overwritten with old values +  through an update of the marks file. @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: config.h 2.65 2013/02/09 15:09:22 kls Exp $ + * $Id: config.h 2.66 2013/02/11 11:27:34 kls Exp $   */  #ifndef __CONFIG_H @@ -27,8 +27,8 @@  // The plugin API's version number: -#define APIVERSION  "1.7.37" -#define APIVERSNUM   10737  // Version * 10000 + Major * 100 + Minor +#define APIVERSION  "1.7.38" +#define APIVERSNUM   10738  // Version * 10000 + Major * 100 + Minor  // When loading plugins, VDR searches them by their APIVERSION, which  // may be smaller than VDRVERSION in case there have been no changes to @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: menu.c 2.76 2013/02/02 14:00:39 kls Exp $ + * $Id: menu.c 2.77 2013/02/11 11:08:54 kls Exp $   */  #include "menu.h" @@ -4763,9 +4763,8 @@ void cReplayControl::MarkToggle(void)  {    int Current, Total;    if (GetIndex(Current, Total, true)) { -     cMark *m = marks.Get(Current);       lastCurrent = -1; // triggers redisplay -     if (m) +     if (cMark *m = marks.Get(Current))          marks.Del(m);       else {          marks.Add(Current); @@ -4784,8 +4783,7 @@ void cReplayControl::MarkJump(bool Forward)    int Current, Total;    if (GetIndex(Current, Total)) {       if (marks.Count()) { -        cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current); -        if (m) { +        if (cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current)) {             Goto(m->Position(), true);             displayFrames = true;             return; @@ -4801,8 +4799,7 @@ void cReplayControl::MarkMove(bool Forward)  {    int Current, Total;    if (GetIndex(Current, Total)) { -     cMark *m = marks.Get(Current); -     if (m) { +     if (cMark *m = marks.Get(Current)) {          displayFrames = true;          int p = SkipFrames(Forward ? 1 : -1);          cMark *m2; @@ -4878,7 +4875,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)  {    if (!Active())       return osEnd; -  if (Key == kNone) +  if (Key == kNone && !marksModified)       marks.Update();    if (visible) {       if (timeoutShow && time(NULL) > timeoutShow) { diff --git a/recording.c b/recording.c index 57248a07..0849fe12 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: recording.c 2.86 2013/02/08 09:02:07 kls Exp $ + * $Id: recording.c 2.87 2013/02/11 11:18:22 kls Exp $   */  #include "recording.h" @@ -1506,6 +1506,15 @@ bool cMarks::Update(void)    return false;  } +bool cMarks::Save(void) +{ +  if (cConfig<cMark>::Save()) { +     lastFileTime = LastModifiedTime(fileName); +     return true; +     } +  return false; +} +  void cMarks::Align(void)  {    cIndexFile IndexFile(recordingFileName, false, isPesRecording); diff --git a/recording.h b/recording.h index 037f2046..584a55f4 100644 --- a/recording.h +++ b/recording.h @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: recording.h 2.42 2013/02/07 13:42:17 kls Exp $ + * $Id: recording.h 2.43 2013/02/11 11:18:13 kls Exp $   */  #ifndef __RECORDING_H @@ -234,6 +234,7 @@ private:  public:    bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false);    bool Update(void); +  bool Save(void);    void Align(void);    void Sort(void);    void Add(int Position); | 
