summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dummer <martin.dummer@gmx.net>2012-10-09 07:46:20 +0200
committerMartin Dummer <martin.dummer@gmx.net>2012-10-09 07:46:20 +0200
commitb944b0934c6a212f0a1c92597f5041eac5349f5f (patch)
tree13e50a5cd89952edc602936351be6e23e03089de
parent5235979100815d79ce8271c9e5fcb1be24d1a2c1 (diff)
downloadvdr-plugin-undelete-b944b0934c6a212f0a1c92597f5041eac5349f5f.tar.gz
vdr-plugin-undelete-b944b0934c6a212f0a1c92597f5041eac5349f5f.tar.bz2
undelete.[ch]: remove conditional code for vdr <1.5.7
-rw-r--r--undelete.c47
-rw-r--r--undelete.h24
2 files changed, 5 insertions, 66 deletions
diff --git a/undelete.c b/undelete.c
index a670453..227c6c0 100644
--- a/undelete.c
+++ b/undelete.c
@@ -65,11 +65,7 @@ char plugin_name[MaxFileName] = "Undelete";
cPlugin *plugin = NULL;
bool PurgeRecording = false;
bool SalvageRecording = false;
-#if VDRVERSNUM >= 10311
cRecordings DeletedRecordings(true);
-#else
-cRecordings DeletedRecordings;
-#endif
bool MenuIsOpen = false;
char *SVDRP_Process = NULL;
char *WorkFilename = NULL;
@@ -206,11 +202,7 @@ class cPluginUndelete : public cPlugin {
private:
// Add any member variables or functions you may need here.
void FreeKeyNames(void);
-#if VDRVERSNUM >= 10507
char* OSDLanguage;
-#else
- int OSDLanguage;
-#endif
void TestAndSetOSDLanguage(void);
bool ProcessArg(int argc, char *argv[]);
#ifdef UND_Debug
@@ -294,11 +286,7 @@ void cPluginUndelete::TestAndSetOSDLanguage(void)
FunctionHotKey[4] = tr("Display$purge all");
FunctionHotKey[5] = tr("Display$salvage all");
FunctionHotKey[6] = tr("Open");
-#if VDRVERSNUM >= 10325
FunctionHotKey[7] = tr("Info");
-#else
- FunctionHotKey[7] = tr("Summary");
-#endif
FunctionHotKey[8] = tr("Display$<--1");
FunctionHotKey[9] = tr("Display$2-->");
FunctionHotKey[10] = tr("Display$disp. keys");
@@ -715,13 +703,9 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
cRecording *recording = DeletedRecordings.Get(atoi(Option) - 1);
if (recording)
{
-#if VDRVERSNUM >= 10325
const char *summary = NULL;
if (recording->Info())
summary = recording->Info()->Description();
-#else
- const char *summary = recording->Summary();
-#endif
if (summary && *summary)
{
ReplyCode = 902;
@@ -738,11 +722,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
} else
{
// list deleted recordings
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
DeletedRecordings.Sort();
freenull(SVDRP_Process);
char *list = NULL;
@@ -780,11 +760,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
}
} else
{
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
for (cRecording *recording = DeletedRecordings.First(); recording; recording = DeletedRecordings.Next(recording))
GetVDRSize(recording->FileName(), llsize);
DeletedRecordings.Clear();
@@ -867,11 +843,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
{
if (!DeletedRecordings.Count())
{
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
DeletedRecordings.Sort();
freenull(SVDRP_Process);
if (!DeletedRecordings.Count())
@@ -895,11 +867,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
oRemoveThread.Start();
DeletedRecordings.Clear();
freenull(SVDRP_Process);
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
bool recordingsavailable = DeletedRecordings.Count();
DeletedRecordings.Clear();
if (recordingsavailable)
@@ -1014,11 +982,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
{
if (!DeletedRecordings.Count())
{
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
DeletedRecordings.Sort();
freenull(SVDRP_Process);
if (!DeletedRecordings.Count())
@@ -1040,11 +1004,7 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i
}
DeletedRecordings.Clear();
freenull(SVDRP_Process);
-#if VDRVERSNUM >= 10311
DeletedRecordings.Load();
-#else
- DeletedRecordings.Load(true);
-#endif
bool recordingsavailable = DeletedRecordings.Count();
DeletedRecordings.Clear();
if (recordingsavailable)
@@ -1083,14 +1043,7 @@ void cRemoveThread::Action(void)
bool cRemoveThread::ActiveWithCancel(void)
{
-#if VDRVERSNUM >= 10318
return Active();
-#else
- if (Active())
- return true;
- Cancel(1); // reset the var "running" to restart the thread, fixed in 1.3.18
- return false;
-#endif
}
VDRPLUGINCREATOR(cPluginUndelete); // Don't touch this!
diff --git a/undelete.h b/undelete.h
index f8a247a..a41a994 100644
--- a/undelete.h
+++ b/undelete.h
@@ -15,25 +15,11 @@
#include <vdr/plugin.h>
#define freenull(T) { if (T) { free(T); T = NULL; } }
-#if VDRVERSNUM > 10307
- #define MAXOSDTEXTWIDTH 45
- #define AKTOSDTEXTWIDTH 45
- #define ERROR(E) Skins.Message(mtError, E)
- #define INFO(I) Skins.Message(mtInfo, I)
- #define STATUS(S) Skins.Message(mtStatus, S)
-#elif VDRVERSNUM == 10307
- #error "cMenuText is in VDR 1.3.7 not in menu.h"
-#else
- #define MAXOSDTEXTWIDTH MAXOSDWIDTH
- #define AKTOSDTEXTWIDTH Setup.OSDwidth
- #define ERROR(E) Interface->Error(E)
- #define INFO(I) Interface->Info(I)
- #ifdef HAVE_ELCHI
- #define STATUS(S) { Interface->Status(S, Setup.Theme == themeVanilla ? clrBlack : (eDvbColor)fginfofont, Setup.Theme == themeVanilla ? clrCyan : clrInfoLine); Interface->Flush(); }
- #else
- #define STATUS(S) { Interface->Status(S); Interface->Flush(); }
- #endif
-#endif
+#define MAXOSDTEXTWIDTH 45
+#define AKTOSDTEXTWIDTH 45
+#define ERROR(E) Skins.Message(mtError, E)
+#define INFO(I) Skins.Message(mtInfo, I)
+#define STATUS(S) Skins.Message(mtStatus, S)
#ifdef UND_Debug
extern int cMenuRecordingSelectItem_nextID;