summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbball <bball@octorok.org>2009-01-29 12:25:37 -0800
committerbball <bball@octorok.org>2009-01-29 12:25:37 -0800
commit8515014c9f326534cb299febe91b398bc48d3485 (patch)
treec6d11eeae2c392f581d8f871f28c439b564bb2da
parent7e91df967dbca3fde9697ac4f53f70d498f9e371 (diff)
downloadvdr-plugin-yaepghd-8515014c9f326534cb299febe91b398bc48d3485.tar.gz
vdr-plugin-yaepghd-8515014c9f326534cb299febe91b398bc48d3485.tar.bz2
- Incorporated new patch from Rolf, see HISTORY for changes.
-rw-r--r--HISTORY3
-rw-r--r--Makefile2
-rw-r--r--README46
-rw-r--r--po/de_DE.po19
-rw-r--r--po/fi_FI.po35
-rw-r--r--yaepghd.c98
6 files changed, 113 insertions, 90 deletions
diff --git a/HISTORY b/HISTORY
index 4a0b2de..16bf408 100644
--- a/HISTORY
+++ b/HISTORY
@@ -12,5 +12,8 @@ VDR Plugin 'yaepghd' Revision History
- Added support for MainMenuHooks patch (Rolf Ahrenberg).
- Renamed REEL_EHD to YAEPGHD_REEL_EHD and moved the setting into Makefile (Rolf Ahrenberg).
- Fixed couple of crash bugs (Rolf Ahrenberg).
+- Changed color key layout to better match the VDR standard (Rolf Ahrenberg).
+- Added Finnish translation (Rolf Ahrenberg).
+- Fixed a bug in channel listing (Rolf Ahrenberg).
TODO: Video Window doesn't scale back to normal when quiting the plugin
diff --git a/Makefile b/Makefile
index 10382a1..7fac6c9 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ INCLUDES += -I$(VDRDIR)/include -I.
LIBS = -lMagick++
-INCLUDES += $(shell pkg-config --cflags-only-I Magick++)
+INCLUDES += $(shell pkg-config --cflags-only-I Magick++ 2>/dev/null)
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
diff --git a/README b/README
index 35c3914..e1c1d9a 100644
--- a/README
+++ b/README
@@ -14,11 +14,11 @@ See the file COPYING for more information.
Description:
-Yaepghd is a compelte rewrite of the original yaepg plugin. The
+Yaepghd is a complete rewrite of the original yaepg plugin. The
original yaepg plugin was designed for FF cards and only used 4
colors due to limitations on the amount of OSD memory on FF cards.
Yaepghd requires output devices with an OSD capable of high color
-full screen grpahics (e.g. eHD or xine) and will _not_ work with FF
+full screen graphics (e.g. eHD or xine) and will _not_ work with FF
cards (unless you have the 4MB mod).
In the original yaepg the layout and sizes of all the components
@@ -41,21 +41,35 @@ compatible with the GPL. From the font's license:
font on an item or project that will be sold, please send
me an email first."
+
Keys:
+
Guide
-Up/Down - Move the cursor up/down in the grid.
-Left/Right - Move the cursor left/right in the grid.
-Chan Up/Down - Page up/down within the grid.
-Ok - Tune to the selected channel and exit the plugin.
-Green - Scroll +12 hours in the grid.
-Red - Scroll -12 hours in the grid.
-Blue - Take a screenshot.
-Yellow - Tune to the selected channel.
-Back/Exit - Exit the plugin.
-0-9 - Perform direct channel change.
+Up/Down - Move the cursor up/down in the grid.
+Left/Right - Move the cursor left/right in the grid.
+Ok - Tune to the selected channel and exit the plugin.
+Red - Take a screenshot (yaepghd.jpg).
+Green/Yellow - Page up/down within the grid.
+Blue - Switch to the selected channel.
+FastRew/FastFwd - Scroll -12/+12 hours in the grid.
+Back/Exit - Exit the plugin.
+0-9 - Perform direct channel change.
Record Dialog
-Up/Down - Move the cursor between input boxes.
-Left/Right - Modify input box values.
-Ok - Add timer.
-Back/Exit - Cancel timer.
+Up/Down - Move the cursor between input boxes.
+Left/Right - Modify input box values.
+Ok - Add timer.
+Back/Exit - Cancel timer.
+
+
+Installation:
+
+cd /put/your/path/here/VDR/PLUGINS/src
+tar -xzf /put/your/path/here/vdr-yaepghd-X.Y.Z.tgz
+ln -s yaepghd-X.Y.Z yaepghd
+cd /put/your/path/here/VDR
+patch -p1 < PLUGINS/src/yaepghd/patches/vdr-X.Y.Z-yaepghd.patch
+cp -R PLUGINS/src/yaepghd/yaepghd /path/to/vdrconf/plugins/
+make
+make plugins
+./vdr -P yaepghd
diff --git a/po/de_DE.po b/po/de_DE.po
index 029baf1..251c10e 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Yaepghd 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2009-01-28 20:31+0200\n"
+"POT-Creation-Date: 2009-01-29 21:00+0200\n"
"PO-Revision-Date: 2009-01-28 10:51+0200\n"
"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -17,23 +17,20 @@ msgstr ""
msgid "No Info"
msgstr "Keine Daten verfügbar."
-msgid "-12 Hours"
-msgstr ""
-
-msgid "+12 Hours"
+msgid "Screenshot"
msgstr ""
-msgid "Switch"
+msgid "Page up"
msgstr ""
-msgid "Screenshot"
+msgid "Page down"
msgstr ""
msgid "Once"
msgstr "Sobald"
-msgid "Every"
-msgstr "Jeden"
+msgid "Every day"
+msgstr "Jeden Tag"
msgid "Mon-Fri"
msgstr "Mo-Fr"
@@ -65,10 +62,10 @@ msgstr ""
msgid "Manual"
msgstr ""
-msgid "Manual in EPG"
+msgid "Semi-automatic"
msgstr ""
-msgid "Automatic in EPG"
+msgid "Automatic"
msgstr ""
msgid "Hide mainmenu entry"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 6ed9ff1..3cf7e9f 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Yaepghd 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2009-01-28 20:31+0200\n"
+"POT-Creation-Date: 2009-01-29 21:00+0200\n"
"PO-Revision-Date: 2009-01-28 10:51+0200\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -18,29 +18,26 @@ msgstr ""
msgid "No Info"
msgstr "Ei tietoja"
-msgid "-12 Hours"
-msgstr "-12h"
-
-msgid "+12 Hours"
-msgstr "+12h"
+msgid "Screenshot"
+msgstr "Ota kuva"
-msgid "Switch"
-msgstr "Vaihda"
+msgid "Page up"
+msgstr "Sivu ylös"
-msgid "Screenshot"
-msgstr "Kuvakaappaus"
+msgid "Page down"
+msgstr "Sivu alas"
msgid "Once"
msgstr "kerran"
-msgid "Every"
-msgstr "aina"
+msgid "Every day"
+msgstr "joka päivä"
msgid "Mon-Fri"
-msgstr "Ma-pe"
+msgstr "ma-pe"
msgid "Sun-Sat"
-msgstr "Su-la"
+msgstr "ma-su"
msgid "Start"
msgstr "Aloitus"
@@ -49,7 +46,7 @@ msgid "Stop"
msgstr "Lopetus"
msgid "Frequency"
-msgstr "Taajuus"
+msgstr "Toistuva"
msgid "24h"
msgstr "24h"
@@ -66,11 +63,11 @@ msgstr "laskeva"
msgid "Manual"
msgstr "manuaalinen"
-msgid "Manual in EPG"
-msgstr "manuaalinen; EPG"
+msgid "Semi-automatic"
+msgstr "puoliautomaattinen"
-msgid "Automatic in EPG"
-msgstr "automaattinen; EPG"
+msgid "Automatic"
+msgstr "automaattinen"
msgid "Hide mainmenu entry"
msgstr "Piilota valinta päävalikosta"
diff --git a/yaepghd.c b/yaepghd.c
index c0e2f96..ff4d998 100644
--- a/yaepghd.c
+++ b/yaepghd.c
@@ -125,8 +125,8 @@
/* Manner in which channel is changed while in YAEPG */
enum eChanneChangeType {
CHANNEL_CHANGE_MANUAL,
- CHANNEL_CHANGE_MANUAL_INEPG,
- CHANNEL_CHANGE_AUTO_INEPG,
+ CHANNEL_CHANGE_SEMIAUTOMATIC,
+ CHANNEL_CHANGE_AUTOMATIC,
CHANNEL_CHANGE_COUNT
};
@@ -1821,10 +1821,10 @@ public:
};
const char *cYaepgHelpBar::helpStrs[4] = {
- trNOOP("-12 Hours"),
- trNOOP("+12 Hours"),
- trNOOP("Switch"),
- trNOOP("Screenshot")
+ trNOOP("Screenshot"),
+ trNOOP("Page up"),
+ trNOOP("Page down"),
+ trVDR("Button$Switch")
};
const tColor cYaepgHelpBar::dotColors[4] = {
@@ -2022,7 +2022,7 @@ public:
const char *cYaepgRecDlg::freqStra[4] = {
trNOOP("Once"),
- trNOOP("Every"),
+ trNOOP("Every day"),
trNOOP("Mon-Fri"),
trNOOP("Sun-Sat"),
};
@@ -2478,7 +2478,7 @@ private:
std::vector< cChannel * > chanVec;
const cEvent *event;
- uint64_t lastInput;
+ cTimeMs lastInput;
int directChan;
bool needsRedraw;
@@ -2514,7 +2514,7 @@ cYaepghd::cYaepghd(void) :
startTime((time_t)0),
mainBmp(NULL),
event(NULL),
- lastInput((uint64_t)0),
+ lastInput(),
directChan(0),
needsRedraw(false),
gridEvents(NULL),
@@ -2623,10 +2623,6 @@ cYaepghd::ProcessKey(eKeys key)
case kBack:
state = osEnd;
break;
- case kBlue:
- cDevice::PrimaryDevice()->GrabImageFile("img.jpg", true, 256, -1, -1);
- state = osContinue;
- break;
case kLeft:
MoveCursor(DIR_LEFT);
needsRedraw = true;
@@ -2640,7 +2636,7 @@ cYaepghd::ProcessKey(eKeys key)
case kUp:
MoveCursor(DIR_UP);
needsRedraw = true;
- if (iChannelChange == CHANNEL_CHANGE_AUTO_INEPG) {
+ if (iChannelChange == CHANNEL_CHANGE_AUTOMATIC) {
SwitchToCurrentChannel();
}
state = osContinue;
@@ -2648,39 +2644,49 @@ cYaepghd::ProcessKey(eKeys key)
case kDown:
MoveCursor(DIR_DOWN);
needsRedraw = true;
- if (iChannelChange == CHANNEL_CHANGE_AUTO_INEPG) {
+ if (iChannelChange == CHANNEL_CHANGE_AUTOMATIC) {
SwitchToCurrentChannel();
}
state = osContinue;
break;
case kOk:
SwitchToCurrentChannel(true);
- if (iChannelChange == CHANNEL_CHANGE_MANUAL_INEPG)
+ if (iChannelChange == CHANNEL_CHANGE_SEMIAUTOMATIC)
state = osContinue;
else
state = osEnd;
break;
case kRed:
- case kChanUp:
- UpdateChans((iChannelOrder == CHANNEL_ORDER_UP ? 1 : -1) * GRID_NUM_CHANS * 1);
- needsRedraw = true;
+ cDevice::PrimaryDevice()->GrabImageFile("yaepghd.jpg", true, 256, -1, -1);
state = osContinue;
break;
case kGreen:
- SwitchToCurrentChannel();
+ UpdateChans((iChannelOrder == CHANNEL_ORDER_UP ? 1 : -1) * GRID_NUM_CHANS);
+ needsRedraw = true;
state = osContinue;
break;
case kYellow:
- case kChanDn:
- UpdateChans((iChannelOrder == CHANNEL_ORDER_UP ? 1 : -1) * GRID_NUM_CHANS * -1);
+ UpdateChans((iChannelOrder == CHANNEL_ORDER_UP ? -1 : 1) * GRID_NUM_CHANS);
needsRedraw = true;
state = osContinue;
break;
+ case kBlue:
+ SwitchToCurrentChannel();
+ state = osContinue;
+ break;
+ case kFastFwd:
+ state = osContinue;
+ // +12 hours
+ break;
+ case kFastRew:
+ state = osContinue;
+ // -12 hours
+ break;
case k0 ... k9:
if (directChan || (key != k0)) {
directChan = ((directChan * 10) + ((key & ~k_Repeat) - k0)) % 100000;
gridDate->UpdateChan(directChan);
- lastInput = cTimeMs::Now();
+ lastInput.Set(1000);
needsRedraw = true;
}
default:
@@ -2689,7 +2695,7 @@ cYaepghd::ProcessKey(eKeys key)
}
/* Channel input timeout */
- if (directChan && (cTimeMs::Now() - lastInput) > 1000) {
+ if (directChan && lastInput.TimedOut()) {
YAEPG_INFO("Direct input timed out, channel %d", directChan);
/* Look for a channel close to what the user entered */
@@ -2744,12 +2750,20 @@ cYaepghd::UpdateChans(cChannel *c)
for (int i = 1; i < GRID_NUM_CHANS; i++) {
if (iChannelOrder == CHANNEL_ORDER_UP) {
while ((c = (cChannel *)c->Prev()) && (c->GroupSep()));
- if (c == NULL)
- c = Channels.First();
+ if (c == NULL) {
+ c = Channels.Last();
+ while (c && c->GroupSep()) {
+ c = (cChannel *)c->Prev();
+ }
+ }
} else {
while ((c = (cChannel *)c->Next()) && (c->GroupSep()));
- if (c == NULL)
- c = Channels.Last();
+ if (c == NULL) {
+ c = Channels.First();
+ while (c && (c->GroupSep())) {
+ c = (cChannel *)c->Next();
+ }
+ }
}
chanVec[i] = c;
}
@@ -2773,20 +2787,22 @@ cYaepghd::UpdateChans(int change)
if (change > 0) {
for (int i = 0; i < change; i++) {
- while ((c = (cChannel *)c->Next()) && (c->GroupSep())) {
- ;
- }
+ while ((c = (cChannel *)c->Next()) && (c->GroupSep()));
if (c == NULL) {
c = Channels.First();
+ while (c && c->GroupSep()) {
+ c = (cChannel *)c->Next();
+ }
}
}
} else if (change < 0) {
for (int i = 0; i > change; i--) {
- while ((c = (cChannel *)c->Prev()) && (c->GroupSep())) {
- ;
- }
+ while ((c = (cChannel *)c->Prev()) && (c->GroupSep()));
if (c == NULL) {
c = Channels.Last();
+ while (c && c->GroupSep()) {
+ c = (cChannel *)c->Prev();
+ }
}
}
}
@@ -2977,13 +2993,13 @@ cMenuSetupYaepg::cMenuSetupYaepg(void)
CH_ORDER_FORMATS[CHANNEL_ORDER_UP] = tr("Up");
CH_ORDER_FORMATS[CHANNEL_ORDER_DOWN] = tr("Down");
- CH_CHANGE_MODES[CHANNEL_CHANGE_MANUAL] = tr("Manual");
- CH_CHANGE_MODES[CHANNEL_CHANGE_MANUAL_INEPG] = tr("Manual in EPG");
- CH_CHANGE_MODES[CHANNEL_CHANGE_AUTO_INEPG] = tr("Automatic in EPG");
+ CH_CHANGE_MODES[CHANNEL_CHANGE_MANUAL] = tr("Manual");
+ CH_CHANGE_MODES[CHANNEL_CHANGE_SEMIAUTOMATIC] = tr("Semi-automatic");
+ CH_CHANGE_MODES[CHANNEL_CHANGE_AUTOMATIC] = tr("Automatic");
cYaepgTheme::Themes(&themes, &numThemes);
iNewThemeIndex = 0;
- if (sThemeName) {
+ if (*sThemeName) {
for (int i = 0; i < numThemes; i++) {
if (strcmp(sThemeName, themes[i]) == 0) {
iNewThemeIndex = i;
@@ -3022,9 +3038,6 @@ static const char *DESCRIPTION = trNOOP("Yet another EPG in HD");
static const char *MAINMENUENTRY = trNOOP("YaepgHD");
class cPluginYaepghd : public cPlugin {
-private:
- cYaepghd *yaepg;
-
public:
cPluginYaepghd(void);
virtual ~cPluginYaepghd();
@@ -3131,8 +3144,7 @@ cPluginYaepghd::WakeupTime(void)
cOsdObject *
cPluginYaepghd::MainMenuAction(void)
{
- yaepg = new cYaepghd;
- return yaepg;
+ return new cYaepghd;
}
cMenuSetupPage *