summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-21 21:22:41 +0000
committerlordjaxom <lordjaxom>2004-12-21 21:22:41 +0000
commitdadf9cfdfa45fe1829eae4782190fa729eaa3f53 (patch)
tree962663c1fab63dce538ff078e3b5eab02d5bb109
parent4d0853757fd7c2fe0f3f242045ad16c481915308 (diff)
downloadvdr-plugin-text2skin-dadf9cfdfa45fe1829eae4782190fa729eaa3f53.tar.gz
vdr-plugin-text2skin-dadf9cfdfa45fe1829eae4782190fa729eaa3f53.tar.bz2
- fixed update of recording marks
-rw-r--r--common.c24
-rw-r--r--display.c8
2 files changed, 24 insertions, 8 deletions
diff --git a/common.c b/common.c
index 1e319e9..d4af3a3 100644
--- a/common.c
+++ b/common.c
@@ -1,5 +1,5 @@
/*
- * $Id: common.c,v 1.2 2004/12/21 18:35:54 lordjaxom Exp $
+ * $Id: common.c,v 1.3 2004/12/21 21:22:41 lordjaxom Exp $
*/
#include "common.h"
@@ -120,7 +120,17 @@ cxType TimeType(time_t Time, const std::string &Format)
if (Time > 0) {
if (Format.length() > 0) {
strftime(result, sizeof(result), Format.c_str(), tm);
- return result;
+
+ cxType r = result;
+ /*if (Format.find("%s") != -1 || Format.find("%S") != -1
+ || Format.find("%Es") != -1 || Format.find("%ES") != -1
+ || Format.find("%Os") != -1 || Format.find("%OS") != -1)
+ r.SetUpdate(1000);
+ else if (Format.find("%M") != -1 || Format.find("%EM") != -1
+ || Format.find("%OM") != -1)
+ r.SetUpdate(1000*60);*/
+
+ return r;
} else
return Time;
}
@@ -132,6 +142,7 @@ cxType DurationType(uint Index, const std::string &Format)
static char result[1000];
if (Index > 0) {
if (Format.length() > 0) {
+ uint update = 0;
const char *ptr = Format.c_str();
char *res = result;
enum { normal, format } state = normal;
@@ -162,18 +173,22 @@ cxType DurationType(uint Index, const std::string &Format)
case 'M':
n = snprintf(res, sizeof(result) - (res - result), "%02d", m);
+ update = 1000*60;
break;
case 'm':
n = snprintf(res, sizeof(result) - (res - result), "%d", m + (h * 60));
+ update = 1000*60;
break;
case 'S':
n = snprintf(res, sizeof(result) - (res - result), "%02d", s);
+ update = 1000;
break;
case 'f':
n = snprintf(res, sizeof(result) - (res - result), "%d", f);
+ update = 1000;
break;
case '%':
@@ -187,7 +202,10 @@ cxType DurationType(uint Index, const std::string &Format)
}
++ptr;
}
- return result;
+
+ cxType r = result;
+ r.SetUpdate(update);
+ return r;
} else
return (int)Index;
}
diff --git a/display.c b/display.c
index 73183c6..0ed464c 100644
--- a/display.c
+++ b/display.c
@@ -1,5 +1,5 @@
/*
- * $Id: display.c,v 1.2 2004/12/21 18:35:54 lordjaxom Exp $
+ * $Id: display.c,v 1.3 2004/12/21 21:22:41 lordjaxom Exp $
*/
#include "render.h"
@@ -393,10 +393,8 @@ void cText2SkinDisplayReplay::SetProgress(int Current, int Total)
void cText2SkinDisplayReplay::SetMarks(const cMarks *Marks)
{
UpdateLock();
- if (mMarks != Marks) {
- mMarks = Marks;
- SetDirty();
- }
+ mMarks = Marks;
+ SetDirty();
UpdateUnlock();
}