summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-09-17 18:10:37 +0200
committerJochen Dolze <vdr@dolze.de>2010-09-17 18:10:37 +0200
commite6bf84c9573061699b226ee3b815e1eef7a77df2 (patch)
tree0aee42799697da381117644d20680d9d17006d2c
parent57df9917d4626d93323c7b0d2368fbf5d4748627 (diff)
downloadvdr-plugin-markad-e6bf84c9573061699b226ee3b815e1eef7a77df2.tar.gz
vdr-plugin-markad-e6bf84c9573061699b226ee3b815e1eef7a77df2.tar.bz2
Added patches from Anonym and italian translation from Diego Pierotto
-rw-r--r--Makefile4
-rw-r--r--command/Makefile10
-rw-r--r--command/markad-standalone.cpp1
-rw-r--r--plugin/markad.cpp10
-rw-r--r--plugin/markad.h6
-rw-r--r--plugin/po/de_DE.po11
-rw-r--r--plugin/po/it_IT.po55
-rw-r--r--plugin/setup.cpp5
-rw-r--r--plugin/setup.h2
-rw-r--r--plugin/status.h2
10 files changed, 64 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 1689906..8ee7951 100644
--- a/Makefile
+++ b/Makefile
@@ -13,10 +13,10 @@ ARCHIVE = markad-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
all:
- for i in $(DIRS); do make -C $$i; done
+ for i in $(DIRS); do $(MAKE) -C $$i; done
install:
- for i in $(DIRS); do make -C $$i install; done
+ for i in $(DIRS); do $(MAKE) -C $$i install; done
dist:
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/command/Makefile b/command/Makefile
index 77f4f3e..2229eb3 100644
--- a/command/Makefile
+++ b/command/Makefile
@@ -11,18 +11,19 @@ VERSION = $(shell grep 'static const char \*VERSION *=' ../version.h | awk '{ pr
CXX ?= g++
CXXFLAGS ?= -g -rdynamic -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses
PKG-CONFIG ?= pkg-config
+STRIP ?= strip
### Includes and Defines (add further entries here):
-PKG-LIBS += libavcodec
-PKG-INCLUDES += libavcodec
+PKG-LIBS += libavcodec libavutil
+PKG-INCLUDES += libavcodec libavutil
DEFINES += -D_GNU_SOURCE
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
DEFINES += -D__STDC_CONSTANT_MACROS
INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES))
-LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS))
+LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS)) -pthread
INCLUDES += -I..
@@ -79,8 +80,9 @@ markad: $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
install: markad $(I18Nmsgs)
+ @mkdir -p $(DESTDIR)/usr/bin
@cp --remove-destination markad $(DESTDIR)/usr/bin/markad
- @strip $(DESTDIR)/usr/bin/markad
+ @$(STRIP) $(DESTDIR)/usr/bin/markad
@mkdir -p $(DESTDIR)/var/lib/markad
@cp logos/* $(DESTDIR)/var/lib/markad
@echo markad installed
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index 51e0696..924f0c0 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -14,6 +14,7 @@
#include <signal.h>
#include <ctype.h>
#include <netdb.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
diff --git a/plugin/markad.cpp b/plugin/markad.cpp
index fad83a7..8444a69 100644
--- a/plugin/markad.cpp
+++ b/plugin/markad.cpp
@@ -31,6 +31,7 @@ cPluginMarkAd::cPluginMarkAd(void)
setup.BackupMarks=false;
setup.Verbose=false;
setup.NoMargins=false;
+ setup.HideMainMenuEntry=false;
}
cPluginMarkAd::~cPluginMarkAd()
@@ -177,10 +178,19 @@ bool cPluginMarkAd::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name,"GenIndex")) setup.GenIndex=atoi(Value);
else if (!strcasecmp(Name,"Verbose")) setup.Verbose=atoi(Value);
else if (!strcasecmp(Name,"IgnoreMargins")) setup.NoMargins=atoi(Value);
+ else if (!strcasecmp(Name,"HideMainMenuEntry")) setup.HideMainMenuEntry=atoi(Value)?true:false;
else return false;
return true;
}
+const char *cPluginMarkAd::MainMenuEntry(void)
+{
+ if (setup.HideMainMenuEntry)
+ return NULL;
+ else
+ return tr("markad status");
+}
+
bool cPluginMarkAd::Service(const char *UNUSED(Id), void *UNUSED(Data))
{
// Handle custom service requests from other plugins
diff --git a/plugin/markad.h b/plugin/markad.h
index 997fb39..241c18d 100644
--- a/plugin/markad.h
+++ b/plugin/markad.h
@@ -15,7 +15,6 @@
extern const char *VERSION;
static const char *DESCRIPTION = trNOOP("Mark advertisements");
-static const char *MAINMENUENTRY = trNOOP("markad status");
class cPluginMarkAd : public cPlugin
{
@@ -47,10 +46,7 @@ public:
virtual void MainThreadHook(void);
virtual cString Active(void);
virtual time_t WakeupTime(void);
- virtual const char *MainMenuEntry(void)
- {
- return tr(MAINMENUENTRY);
- }
+ virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
diff --git a/plugin/po/de_DE.po b/plugin/po/de_DE.po
index ca20a0f..5515cc4 100644
--- a/plugin/po/de_DE.po
+++ b/plugin/po/de_DE.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-04-26 13:57+0200\n"
+"POT-Creation-Date: 2010-09-17 18:00+0200\n"
"PO-Revision-Date: 2009-08-27 14:18+0200\n"
"Last-Translator: Jochen Dolze <vdr@dolze.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -15,6 +15,9 @@ msgstr ""
msgid "markad still running"
msgstr "markad läuft noch"
+msgid "markad status"
+msgstr "markad Status"
+
msgid "running"
msgstr "aktiv"
@@ -33,9 +36,6 @@ msgstr "angehalten"
msgid "unknown"
msgstr "unbekannt"
-msgid "markad status"
-msgstr "markad Status"
-
msgid "Recording\t Status"
msgstr "Aufnahme\t Status"
@@ -78,5 +78,8 @@ msgstr "alte Marken sichern"
msgid "verbose logging"
msgstr "ausführliches Logging"
+msgid "Hide Mainmenu entry"
+msgstr "Hauptmenüeintrag verstecken"
+
msgid "Mark advertisements"
msgstr "Markiere Werbung"
diff --git a/plugin/po/it_IT.po b/plugin/po/it_IT.po
index 84ee7c0..c7fe1da 100644
--- a/plugin/po/it_IT.po
+++ b/plugin/po/it_IT.po
@@ -4,8 +4,8 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-04-26 13:57+0200\n"
-"PO-Revision-Date: 2009-11-14 18:06+0100\n"
+"POT-Creation-Date: 2010-09-17 18:09+0200\n"
+"PO-Revision-Date: 2010-08-09 20:05+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
"MIME-Version: 1.0\n"
@@ -16,70 +16,73 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
msgid "markad still running"
-msgstr ""
+msgstr "Marcatore ancora in esecuzione"
+
+msgid "markad status"
+msgstr "Stato marcatori"
msgid "running"
-msgstr ""
+msgstr "in esecuzione"
msgid "sleeping"
-msgstr ""
+msgstr "sospeso"
msgid "inactive"
-msgstr ""
+msgstr "non attivo"
msgid "zombie"
-msgstr ""
+msgstr "terminato"
msgid "stopped"
-msgstr ""
+msgstr "fermo"
msgid "unknown"
-msgstr ""
-
-msgid "markad status"
-msgstr ""
+msgstr "sconosciuto"
msgid "Recording\t Status"
-msgstr ""
+msgstr "Registrazioni\t Stato"
msgid "no running markad found"
-msgstr ""
+msgstr "Nessun marcatore in esec. trovato"
msgid "Pause"
-msgstr ""
+msgstr "Pausa"
msgid "Continue"
-msgstr ""
+msgstr "Continua"
msgid "after"
-msgstr ""
+msgstr "dopo"
msgid "during"
-msgstr ""
+msgstr "durante"
msgid "execution"
-msgstr ""
+msgstr "Esecuzione"
msgid " during another recording"
-msgstr ""
+msgstr " durante un'altra registrazione"
msgid " while replaying"
-msgstr ""
+msgstr " durante la riproduzione"
msgid "repair index, if broken"
-msgstr ""
+msgstr "Ripara indice, se errato"
msgid "ignore timer margins"
-msgstr ""
+msgstr "Ignora margini timer"
msgid "OSD message"
-msgstr ""
+msgstr "Messaggio OSD"
msgid "backup marks"
-msgstr ""
+msgstr "Salva marcatori"
msgid "verbose logging"
+msgstr "Log dettagliato"
+
+msgid "Hide Mainmenu entry"
msgstr ""
msgid "Mark advertisements"
-msgstr "Segna i marcatori della pubblicità"
+msgstr "Segna i marcatori della pubblicitá"
diff --git a/plugin/setup.cpp b/plugin/setup.cpp
index 5a23414..86d7cd1 100644
--- a/plugin/setup.cpp
+++ b/plugin/setup.cpp
@@ -19,6 +19,7 @@ cSetupMarkAd::cSetupMarkAd(struct setup *Setup)
verbose=setup->Verbose;
genindex=setup->GenIndex;
nomargins=setup->NoMargins;
+hidemainmenuentry=setup->HideMainMenuEntry;
processTexts[0]=tr("after");
processTexts[1]=tr("during");
@@ -43,6 +44,8 @@ void cSetupMarkAd::write(void)
Add(new cMenuEditBoolItem(tr("OSD message"),&osdmsg));
Add(new cMenuEditBoolItem(tr("backup marks"),&backupmarks));
Add(new cMenuEditBoolItem(tr("verbose logging"),&verbose));
+ Add(new cMenuEditBoolItem(tr("Hide Mainmenu entry"),&hidemainmenuentry));
+
Display();
}
@@ -79,6 +82,7 @@ void cSetupMarkAd::Store(void)
SetupStore("GenIndex",genindex);
SetupStore("OSDMessage",osdmsg);
SetupStore("Verbose",verbose);
+ SetupStore("HideMainMenuEntry",hidemainmenuentry);
setup->ProcessDuring=(bool) processduring;
setup->whileRecording=(bool) whilerecording;
@@ -88,4 +92,5 @@ void cSetupMarkAd::Store(void)
setup->BackupMarks=(bool) backupmarks;
setup->Verbose=(bool) verbose;
setup->NoMargins=(bool) nomargins;
+ setup->HideMainMenuEntry=(bool) hidemainmenuentry;
}
diff --git a/plugin/setup.h b/plugin/setup.h
index 0e217f7..ab156af 100644
--- a/plugin/setup.h
+++ b/plugin/setup.h
@@ -19,6 +19,7 @@ struct setup
bool Verbose;
bool GenIndex;
bool NoMargins;
+ bool HideMainMenuEntry;
};
class cSetupMarkAd : public cMenuSetupPage
@@ -34,6 +35,7 @@ private:
int verbose;
int genindex;
int nomargins;
+ int hidemainmenuentry;
void write(void);
protected:
virtual void Store(void);
diff --git a/plugin/status.h b/plugin/status.h
index 75f39ff..e9cad87 100644
--- a/plugin/status.h
+++ b/plugin/status.h
@@ -10,7 +10,7 @@
#include <vdr/status.h>
#include "setup.h"
-#if __GNUC__ > 3
+#if __GNUC__ > 3
#define UNUSED(v) UNUSED_ ## v __attribute__((unused))
#else
#define UNUSED(x) x