[vdr] [PATCH] epgsearch: make optional the short text in schedules
Darren Salt
linux at youmustbejoking.demon.co.uk
Fri Dec 9 00:41:17 CET 2005
This patch makes the display of short text in schedules optional. I find it
too noisy with that text.
--
| Darren Salt | d youmustbejoking,demon,co,uk | nr. Ashington,
| Debian, | s zap,tartarus,org | Northumberland
| RISC OS | @ | Toon Army
| <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys)
If I want your opinion, I'll beat it from you.
-------------- next part --------------
diff -urNad vdr-plugin-epgsearch-0.9.8c~/epgsearch.c vdr-plugin-epgsearch-0.9.8c/epgsearch.c
--- vdr-plugin-epgsearch-0.9.8c~/epgsearch.c 2005-11-30 19:21:42.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/epgsearch.c 2005-12-08 23:45:25.656650414 +0000
@@ -355,6 +355,7 @@
if (!strcasecmp(Name, "ToggleGreenYellow")) EPGSearchConfig.toggleGreenYellow = atoi(Value);
if (!strcasecmp(Name, "ShortChannelNames")) EPGSearchConfig.useShortChNames = atoi(Value);
+ if (!strcasecmp(Name, "ShowShortText")) EPGSearchConfig.showShortText = atoi(Value);
if (!strcasecmp(Name, "DefPriority")) EPGSearchConfig.DefPriority = atoi(Value);
if (!strcasecmp(Name, "DefLifetime")) EPGSearchConfig.DefLifetime = atoi(Value);
diff -urNad vdr-plugin-epgsearch-0.9.8c~/epgsearchcfg.c vdr-plugin-epgsearch-0.9.8c/epgsearchcfg.c
--- vdr-plugin-epgsearch-0.9.8c~/epgsearchcfg.c 2005-12-08 23:44:27.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/epgsearchcfg.c 2005-12-08 23:44:28.648624520 +0000
@@ -26,6 +26,7 @@
timeShiftValue = 30;
toggleGreenYellow = 1;
useShortChNames = 1;
+ showShortText = 1;
StartMenu = 0;
DefPriority = Setup.DefaultPriority;
DefLifetime = Setup.DefaultLifetime;
diff -urNad vdr-plugin-epgsearch-0.9.8c~/epgsearchcfg.h vdr-plugin-epgsearch-0.9.8c/epgsearchcfg.h
--- vdr-plugin-epgsearch-0.9.8c~/epgsearchcfg.h 2005-12-08 23:44:27.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/epgsearchcfg.h 2005-12-08 23:44:28.648624520 +0000
@@ -65,6 +65,7 @@
int timeShiftValue;
int toggleGreenYellow;
int useShortChNames;
+ int showShortText;
int StartMenu;
int DefPriority;
int DefLifetime;
@@ -83,4 +84,9 @@
extern cEPGSearchConfig EPGSearchConfig;
+#define SHORTTEXT(EVENT) \
+ (EPGSearchConfig.showShortText && !isempty((EVENT)->ShortText()))?" ~ ":"", \
+ (EPGSearchConfig.showShortText && !isempty((EVENT)->ShortText()))?(EVENT)->ShortText():""
+
+
#endif // __EPGSEARCHCFG_H
diff -urNad vdr-plugin-epgsearch-0.9.8c~/epgsearchsetup.c vdr-plugin-epgsearch-0.9.8c/epgsearchsetup.c
--- vdr-plugin-epgsearch-0.9.8c~/epgsearchsetup.c 2005-12-08 23:44:27.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/epgsearchsetup.c 2005-12-08 23:44:28.652624241 +0000
@@ -58,7 +58,7 @@
#if VDRVERSNUM && VDRVERSNUM >= 10315
Add(new cMenuEditBoolItem( tr("Use short channel names"), &data.useShortChNames, tr("no"), tr("yes")));
#endif
-
+ Add(new cMenuEditBoolItem( tr("Show episode text in schedules"), &data.showShortText, tr("no"), tr("yes")));
Add(new cMenuEditIntItem(tr("Time interval for FRew/FFwd [min]"), &data.timeShiftValue, 1, 9999));
Add(new cMenuEditBoolItem( tr("Toggle Green/Yellow"), &data.toggleGreenYellow, tr("no"), tr("yes")));
Add(new cMenuEditBoolItem( tr("Ignore PayTV channels"), &data.ignorePayTV, tr("no"), tr("yes")));
@@ -165,6 +165,7 @@
SetupStore("ToggleGreenYellow", EPGSearchConfig.toggleGreenYellow);
SetupStore("ShortChannelNames", EPGSearchConfig.useShortChNames);
+ SetupStore("ShowShortText", EPGSearchConfig.showShortText);
SetupStore("DefPriority", EPGSearchConfig.DefPriority);
SetupStore("DefLifetime", EPGSearchConfig.DefLifetime);
diff -urNad vdr-plugin-epgsearch-0.9.8c~/i18n.c vdr-plugin-epgsearch-0.9.8c/i18n.c
--- vdr-plugin-epgsearch-0.9.8c~/i18n.c 2005-12-08 23:44:28.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/i18n.c 2005-12-08 23:44:28.652624241 +0000
@@ -3089,5 +3089,28 @@
#endif
#endif
},
+ { "Show episode text in schedules",
+ "",
+ "",// TODO
+ "",// Italiano
+ "",// TODO
+ "",// TODO
+ "",
+ "",// TODO
+ "",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+#if VDRVERSNUM && VDRVERSNUM >= 10313
+ "", // Eesti
+#if VDRVERSNUM >= 10316
+ "", // Dansk
+#endif
+#endif
+ },
{ NULL }
};
diff -urNad vdr-plugin-epgsearch-0.9.8c~/menu_main.c vdr-plugin-epgsearch-0.9.8c/menu_main.c
--- vdr-plugin-epgsearch-0.9.8c~/menu_main.c 2005-12-08 23:44:28.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/menu_main.c 2005-12-08 23:44:28.652624241 +0000
@@ -29,7 +29,7 @@
char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' ';
char r = event->IsRunning() ? '*' : ' ';
asprintf(&buffer, "%.*s\t%s\t%c%c%c\t%s%s%s", 6, GETDATESTRING(event), GETTIMESTRING(event), t, v, r, event->Title(),
- !isempty(event->ShortText())?" ~ ":"", !isempty(event->ShortText())?event->ShortText():"");
+ SHORTTEXT (event));
SetText(buffer, false);
}
diff -urNad vdr-plugin-epgsearch-0.9.8c~/menu_searchresults.c vdr-plugin-epgsearch-0.9.8c/menu_searchresults.c
--- vdr-plugin-epgsearch-0.9.8c~/menu_searchresults.c 2005-12-08 23:44:28.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/menu_searchresults.c 2005-12-08 23:44:28.652624241 +0000
@@ -42,7 +42,7 @@
if(eventInfo->ShortText())
{
if (!bEpisodeOnly)
- asprintf(&buffer, "%.*s\t%.*s\t%.*s\t%c%c%c\t%s%s%s", 12, CHANNELNAME(channel), 6, GETDATESTRING(eventInfo), 5, GETTIMESTRING(eventInfo), t, v, r, bEpisodeOnly?NULL:eventInfo->Title(), !isempty(eventInfo->ShortText())?" ~ ":"", !isempty(eventInfo->ShortText())?eventInfo->ShortText():"");
+ asprintf(&buffer, "%.*s\t%.*s\t%.*s\t%c%c%c\t%s%s%s", 12, CHANNELNAME(channel), 6, GETDATESTRING(eventInfo), 5, GETTIMESTRING(eventInfo), t, v, r, bEpisodeOnly?NULL:eventInfo->Title(), SHORTTEXT (eventInfo));
else
asprintf(&buffer, "%.*s\t%.*s\t%.*s\t%c%c%c\t%s", 12, CHANNELNAME(channel), 6, GETDATESTRING(eventInfo), 5, GETTIMESTRING(eventInfo), t, v, r, eventInfo->ShortText());
}
diff -urNad vdr-plugin-epgsearch-0.9.8c~/menu_whatson.c vdr-plugin-epgsearch-0.9.8c/menu_whatson.c
--- vdr-plugin-epgsearch-0.9.8c~/menu_whatson.c 2005-12-08 23:44:28.000000000 +0000
+++ vdr-plugin-epgsearch-0.9.8c/menu_whatson.c 2005-12-08 23:44:28.652624241 +0000
@@ -83,16 +83,14 @@
(iProgress==1?'[':128), szProgress, (iProgress==1?']':129),
t, v, r,
event->Title(),
- !isempty(event->ShortText())?" ~ ":"",
- !isempty(event->ShortText())?event->ShortText():"");
+ SHORTTEXT (event));
else
asprintf(&buffer, "%.*s\t%s\t%c%s%c\t %c%c%c \t%s%s%s", 12,
CHANNELNAME(channel), GETTIMESTRING(event),
(iProgress==1?'[':128), szProgress, (iProgress==1?']':129),
t, v, r,
event->Title(),
- !isempty(event->ShortText())?" ~ ":"",
- !isempty(event->ShortText())?event->ShortText():"");
+ SHORTTEXT (event));
}
else
if (EPGSearchConfig.showChannelNr)
@@ -100,14 +98,12 @@
CHANNELNAME(channel), GETTIMESTRING(event),
t, v, r,
event->Title(),
- !isempty(event->ShortText())?" ~ ":"",
- !isempty(event->ShortText())?event->ShortText():"");
+ SHORTTEXT (event));
else
asprintf(&buffer, "%.*s\t%s\t %c%c%c \t%s%s%s", 12,
CHANNELNAME(channel), GETTIMESTRING(event),
t, v, r, event->Title(),
- !isempty(event->ShortText())?" ~ ":"",
- !isempty(event->ShortText())?event->ShortText():"");
+ SHORTTEXT (event));
SetText(buffer, false);
}
More information about the vdr
mailing list