diff options
| author | Jürgen Schmitz <vdr@dolze.de> | 2004-11-23 20:15:00 +0100 |
|---|---|---|
| committer | Jürgen Schmitz <vdr@dolze.de> | 2004-11-23 20:15:00 +0100 |
| commit | 83720d70112490b379cdc230bfb4e4f6a2fe6bff (patch) | |
| tree | 1fb401c4ee7e7da6a19453a2ad06ddf81b134414 | |
| parent | 4a5845aee69c23fa52f660be1caff00c96d9fc38 (diff) | |
| download | vdr-plugin-tvonscreen-83720d70112490b379cdc230bfb4e4f6a2fe6bff.tar.gz vdr-plugin-tvonscreen-83720d70112490b379cdc230bfb4e4f6a2fe6bff.tar.bz2 | |
Version 0.7.0
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | README | 48 | ||||
| -rw-r--r-- | config.c | 30 | ||||
| -rw-r--r-- | config.h | 4 | ||||
| -rw-r--r-- | i18n.c | 566 | ||||
| -rwxr-xr-x | i18n.h | 3 | ||||
| -rw-r--r-- | magazine.c | 212 | ||||
| -rw-r--r-- | magazine.h | 59 | ||||
| -rw-r--r-- | search.c | 223 | ||||
| -rw-r--r-- | search.h | 80 | ||||
| -rw-r--r-- | timer.c | 30 | ||||
| -rw-r--r-- | timer.h | 64 | ||||
| -rw-r--r-- | tvonscreen.c | 4 |
13 files changed, 1263 insertions, 64 deletions
@@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.4 2004/07/07 10:37:23 schmitzj Exp $ +# $Id: Makefile,v 1.6 2004/11/23 14:21:24 schmitzj Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -46,7 +46,7 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE ### The object files (add further files here): -OBJS = $(PLUGIN).o i18n.o magazine.o anyfont.o config.o gfxtools.o +OBJS = $(PLUGIN).o i18n.o magazine.o anyfont.o config.o gfxtools.o timer.o search.o ### Implicit rules: @@ -13,14 +13,18 @@ Description: This plugins shows the EPG data in the typical way a TV magazine does. The channels are shown from left to right, 3 on one screen. -You can scroll though the channels and the time and create a timer. +You can scroll though the channels and the time, create timers, +show details, search for events and add vdradmin auto timers. Command line options: -l <path to logos> optional path for the XPM channel logos, if not given, <configDir>/logos is used -TV-Onscreen has two different modes: +-v <vdradminfile> path and filename to vdradmin at file + (called vdradmind.at) + +TV-OnScreen has two different modes: - the show mode which only shows the EPG and allows scrolling in "big" steps @@ -53,20 +57,45 @@ Cursor left/right move to the schedule in the channel left/right Rec creates a timer from the current schedule (opens the timer screen) Ok shows details of the current schedule - (which allows switching the channel or create a timer) + (which allows creating a timer, auto timer or search) + + +The details view (after pressing Ok): + +This shows the details of a seleteced schedule as you might know it from +vdr. However, the color function keys have other meanings: + +Back returns to the show mode screen +Red goes to the timer screen +Record goes to the timer screen +Green search for the current schedule title, opens the search screen +Yellow adds this schedule title to vdradmin's auto timer + +The search screen (after pressing green): +This screen shows a list of any occurence of the previously selected schedule on +the channel. +Back returns to the show mode screen +Blue returns to the show mode screen +Red goes to the timer screen +Record goes to the timer screen +Green shows the details of the hilighted schedule +Yellow searches again but this time in all channels Requirements: -On 1.2.6 ElchiAIO patches (or similar) with additional colors must be +On vdr 1.2.6 ElchiAIO patches (or similar) with additional colors must be installed. +Optional: Timeline plugin. + + Important notes: -On 1.2.6 the channel logos should be displayed in black/white! This setup option +On vdr 1.2.6 the channel logos should be displayed in black/white! This setup option will be set every time vdr starts. Press key "1" to open the help page. @@ -75,3 +104,12 @@ Press key "1" to open the help page. TODO: Wait for no bug reports and go to version 1.0. + + +Thanks + +to Rolf Ahrenberg for 1.3.x fixes, finnish translations and tests, +to Dominique Simon for testing on 1.3.x, +to Guide Fiala reporting a OSD problem (not yet fixed in TVos), +to Larc Volkhardt for first 1.3 patch, +to Michael Plagge for the logo idea and his patch for TVos 0.5 @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: config.c,v 1.8 2004/07/08 17:06:45 schmitzj Exp $ + * $Id: config.c,v 1.11 2005/01/02 12:19:32 schmitzj Exp $ * */ @@ -46,13 +46,17 @@ tvonscreenConfig::tvonscreenConfig(void) usertime2=1800; usertime3=2015; thenshownextday=true; + showsearchinitiator=true; - logos=NULL; + logos=NULL; + vdradminfile=NULL; } tvonscreenConfig::~tvonscreenConfig() { if (logos) free(logos); + if (vdradminfile) + free(vdradminfile); } bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) @@ -67,6 +71,7 @@ bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) else if (strcmp(Name,"usertime2")==0) usertime2 = atoi(Value); else if (strcmp(Name,"usertime3")==0) usertime3 = atoi(Value); else if (strcmp(Name,"thenshownextday")==0) thenshownextday = atoi(Value); + else if (strcmp(Name,"showsearchinitiator")==0) showsearchinitiator = atoi(Value); else return false; @@ -78,19 +83,20 @@ bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) const char *tvonscreenConfig::CommandLineHelp(void) { // Return a string that describes all known command line options. - return " -l PathToLogos\n --logos=PathToLogos\n"; + return " -l PathToLogos\n --logos=PathToLogos\n -v vdradmind.at\n --vdradminfile=vdradmind.at\n"; } bool tvonscreenConfig::ProcessArgs(int argc, char *argv[]) { static struct option long_options[] = { { "logos", required_argument, NULL, 'l' }, + { "vdradminfile",required_argument, NULL, 'v' }, { NULL } }; bool retval=true; int c; - while ((c = getopt_long(argc, argv, "l:", long_options, NULL)) != -1) + while ((c = getopt_long(argc, argv, "l:v:", long_options, NULL)) != -1) { switch (c) { @@ -103,6 +109,15 @@ bool tvonscreenConfig::ProcessArgs(int argc, char *argv[]) logos = strdup(optarg); retval=true; break; + case 'v': + if (vdradminfile) + { + free(vdradminfile); + vdradminfile=NULL; + } + vdradminfile = strdup(optarg); + retval=true; + break; default: break; } @@ -141,6 +156,10 @@ tvonscreenConfigPage::tvonscreenConfigPage(void) : cMenuSetupPage() Add(new cMenuEditBoolItem(tr("jump to next day point if ago"), &m_NewConfig.thenshownextday)); + Add(new cMenuEditBoolItem(tr("Show search item itself"), + &m_NewConfig.showsearchinitiator)); + + } tvonscreenConfigPage::~tvonscreenConfigPage() @@ -151,7 +170,7 @@ void tvonscreenConfigPage::Store(void) { SetupStore("showLogos", m_NewConfig.showLogos); SetupStore("XLfonts", m_NewConfig.XLfonts); - SetupStore("noInfoLine", m_NewConfig.XLfonts); + SetupStore("noInfoLine", m_NewConfig.noInfoLine); SetupStore("showChannels", m_NewConfig.showChannels); SetupStore("bwlogos", m_NewConfig.bwlogos); SetupStore("colorworkaround", m_NewConfig.colorworkaround); @@ -159,6 +178,7 @@ void tvonscreenConfigPage::Store(void) SetupStore("usertime2", m_NewConfig.usertime2); SetupStore("usertime3", m_NewConfig.usertime3); SetupStore("thenshownextday", m_NewConfig.thenshownextday); + SetupStore("showsearchinitiator", m_NewConfig.showsearchinitiator); tvonscreenCfg = m_NewConfig; } @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: config.h,v 1.5 2004/07/08 10:46:44 schmitzj Exp $ + * $Id: config.h,v 1.7 2004/11/23 14:21:24 schmitzj Exp $ * */ @@ -34,8 +34,10 @@ public: int usertime2; int usertime3; int thenshownextday; + int showsearchinitiator; char *logos; + char *vdradminfile; }; extern tvonscreenConfig tvonscreenCfg; @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: i18n.c,v 1.11 2004/07/27 20:51:51 schmitzj Exp $ + * $Id: i18n.c,v 1.15 2004/11/30 20:08:24 schmitzj Exp $ * */ @@ -30,6 +30,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -53,6 +59,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -76,6 +88,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -99,6 +117,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -122,9 +146,46 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Timer conflict!", // English + "Timer Konflikt!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + " ", // suomi (empty space) + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, + +// Prefs { "show channel logos", // English "zeige Kanal-Logos", // Deutsch "", // Slovenski @@ -145,6 +206,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -168,6 +235,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -191,6 +264,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -214,6 +293,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -237,6 +322,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -260,6 +351,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -283,6 +380,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -306,6 +409,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -329,6 +438,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -352,6 +467,41 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Show search item itself", // English + "Zeige auch Suchbegriff", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä hakuehto", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -377,6 +527,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -400,6 +556,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -423,6 +585,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -446,6 +614,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -469,6 +643,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -492,6 +672,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -515,6 +701,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -538,6 +730,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -561,6 +759,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -584,6 +788,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -607,6 +817,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -630,6 +846,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -653,6 +875,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -676,6 +904,12 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -699,6 +933,336 @@ const tI18nPhrase tvoPhrases[] = { "" // ÀãááÚØÙ (Russian) #if VDRVERSNUM >= 10307 "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, +// End Help + +// Details + { "Record", // English + "Aufnehmen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Tallenna", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Search", // English + "Suchen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsi", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "AutoTimer", // English + "AutoTimer", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "AutoTimer", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Added AutoTimer to vdradmin.", // English + "AutoTimer in vdradmin aufgenommen.", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "AutoTimer lisätty VDRAdminiin.", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Startoption 'vdradminfile' not set!", // English + "Startoption 'vdradminfile' nicht gesetzt!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Käynnistysoptio 'vdradminfile' puuttuu!", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + +// Search + { "Search for", // English + "Suche nach", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsitään termiä", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Searching...", // English + "Suchen...", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsitään...", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Nothing found!", // English + "Nichts gefunden!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // suomi + "Ei löydetty!", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Back", // English + "Zurück", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Takaisin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Details", // English + "Details", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Lisätiedot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "in all", // English + "in allen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsi kaikki", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif #endif #endif }, @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: i18n.h,v 1.1 2004/03/03 00:22:47 schmitzj Exp $ + * $Id: i18n.h,v 1.2 2004/11/23 21:42:55 schmitzj Exp $ * */ @@ -11,6 +11,7 @@ #define _I18N__H #include <vdr/i18n.h> +#include <vdr/config.h> // for VDRVERSNUM define only extern const tI18nPhrase tvoPhrases[]; @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: magazine.c,v 1.26 2004/07/27 20:51:51 schmitzj Exp $ + * $Id: magazine.c,v 1.33 2005/01/02 12:19:32 schmitzj Exp $ * */ @@ -76,7 +76,11 @@ magazine::magazine(class cPlugin *p) f4=NULL; me=NULL; met=NULL; + mes=NULL; + timeline_tested=false; + timeline_found_conflict=false; + // Create and sort entries for menu items // -------------------------------------- @@ -148,6 +152,11 @@ magazine::~magazine(void) delete met; met=NULL; } + if (mes) + { + delete mes; + mes=NULL; + } delete [] fullHours_tmp3; delete [] fullHours_tmp2; @@ -201,7 +210,11 @@ void magazine::printLogo(const cSchedule *s,int p) #else channel = Channels.GetByChannelID(s->GetChannelID(), true); #endif +#if VDRVERSNUM >= 10315 + txt=channel->ShortName(true); +#else txt=channel->Name(); +#endif // logo: 64x48px const char *ConfigDirectory=cPlugin::ConfigDirectory("../logos"); @@ -296,7 +309,11 @@ void magazine::printHead(const cSchedule *s,int p) { col=clrCyan; } +#if VDRVERSNUM >= 10315 + txt=channel->ShortName(true); +#else txt=channel->Name(); +#endif if (!tvonscreenCfg.XLfonts || f3->LargeWidth(txt)>=184-wmin) #if VDRVERSNUM >= 10307 @@ -555,6 +572,36 @@ void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) f2->Text(f1->Width("00:0"),j*f1->Height(),184-f1->Width("00:0"),evnum-j,txt,col,clrBackground,sched); #endif } + if (!EDIT_curEvent) + { + if (!timeline_tested) + { + timeline_tested=true; + cPlugin *p = cPluginManager::GetPlugin("timeline"); + if (p) + { + char *args[]={"timeline_command_interface","conflicts"}; + timeline_found_conflict=p->ProcessArgs(1,args); + } + } + if (timeline_found_conflict) + { +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-6,Areas[area].x1+184,Areas[area].y2+1,clrWhite); + osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-4,Areas[area].x1+184,Areas[area].y2+1,clrYellow); +#else + osd->Fill(0,384-f2->Height()-6,184,384,clrWhite,sched); + osd->Fill(0,384-f2->Height()-4,184,384,clrYellow,sched); +#endif + const char *txt=tr("Timer conflict!"); + int x=(184-f2->Width(txt))/2; +#if VDRVERSNUM >= 10307 + f2->Text(x+Areas[area].x1,Areas[area].y2-f2->Height()-4,txt,clrBackground,clrYellow); +#else + f2->Text(x,384-f2->Height()-4,txt,clrBackground,clrYellow,sched); +#endif + } + } } void magazine::showScheds() { @@ -995,6 +1042,7 @@ void magazine::showHelp() "arrows\n\tmove selected schedule", "record\n\tcreate timer", "ok\n\tshow details", + "|\n(c) 2004 Jürgen Schmitz\n\thttp://www.js-home.org/vdr", NULL }; #if VDRVERSNUM >= 10307 @@ -1032,7 +1080,10 @@ void magazine::showHelp() int y=i*usef->Height(); if (helptext[j]==NULL) break; - txt=tr(helptext[j]); + if (helptext[j][0]=='|') + txt=helptext[j]+1; + else + txt=tr(helptext[j]); if (i+usef->TextHeight(width,txt)>=lines) break; @@ -1063,6 +1114,33 @@ void magazine::showHelp() osd->Flush(); } +#if VDRVERSNUM >= 10300 +void magazine::autoTimer(const class cEvent *cev) +#else +void magazine::autoTimer(const class cEventInfo *cev) +#endif +{ + FILE *f; + if ((f=fopen(tvonscreenCfg.vdradminfile,"a"))) + { + const char *title; + int chan; + +#if VDRVERSNUM >= 10300 + title=cev->Title(); + cChannel *cc=Channels.GetByChannelID(cev->ChannelID()); + chan=cc->Number(); +#else + title=cev->GetTitle(); + cChannel *cc=Channels.GetByChannelID(cev->GetChannelID()); + chan=cc->Number(); +#endif + + fprintf(f,"1:%s:1:::1:40:7:%d:\n",title,chan); + fclose(f); + } +} + #include "fontosd/fontosd-arial18.c" #include "fontosd/fontosd-verdana16.c" #include "fontosd/fontosd-tahoma16.c" @@ -1082,6 +1160,11 @@ void magazine::Show(void) delete met; met=NULL; } + if (mes) + { + delete mes; + mes=NULL; + } #if VDRVERSNUM >= 10307 osd = cOsdProvider::NewOsd(((Setup.OSDWidth - 612) / 2) + Setup.OSDLeft, ((Setup.OSDHeight - 436) / 2) + Setup.OSDTop); @@ -1144,13 +1227,13 @@ void magazine::Show(void) #endif #if VDRVERSNUM >= 10300 - ev1=new (cEvent*)[evnum]; - ev2=new (cEvent*)[evnum]; - ev3=new (cEvent*)[evnum]; + ev1=new cEvent*[evnum]; + ev2=new cEvent*[evnum]; + ev3=new cEvent*[evnum]; #else - ev1=new (cEventInfo*)[evnum]; - ev2=new (cEventInfo*)[evnum]; - ev3=new (cEventInfo*)[evnum]; + ev1=new cEventInfo*[evnum]; + ev2=new cEventInfo*[evnum]; + ev3=new cEventInfo*[evnum]; #endif fullHours=new int[evnum]; fullHours_tmp1=new int[evnum]; @@ -1212,7 +1295,7 @@ eOSState magazine::ProcessKey(eKeys Key) if (!osd) Show(); } - else if (state == osUnknown) + else if (state == osUnknown || state == osContinue) { switch (Key & ~k_Repeat) { @@ -1223,7 +1306,7 @@ eOSState magazine::ProcessKey(eKeys Key) if (!osd) Show(); break; - case kBlue: // Umschalten + case kBlue: // Umschalten - obsolete! { #if VDRVERSNUM >= 10300 cEvent **ev=ev4ch(EDIT_curChannel); @@ -1240,6 +1323,44 @@ eOSState magazine::ProcessKey(eKeys Key) } } break; + case kGreen: // Suchen + { +// mzlog(10," Search"); + delete me; + me=NULL; +#if VDRVERSNUM >= 10300 + cEvent **ev=ev4ch(EDIT_curChannel); +#else + cEventInfo **ev=ev4ch(EDIT_curChannel); +#endif + mes=new cSearchMenu(ev[EDIT_curEVI]); + state=osContinue; + } + break; + case kYellow: // add AutoTimer + { +// mzlog(10," AutoTimer"); + if (tvonscreenCfg.vdradminfile) + { + me->helpLine(false); + state=osContinue; + +#if VDRVERSNUM >= 10300 + cEvent **ev=ev4ch(EDIT_curChannel); +#else + cEventInfo **ev=ev4ch(EDIT_curChannel); +#endif + autoTimer(ev[EDIT_curEVI]); + me->printMsg(tr("Added AutoTimer to vdradmin.")); + } + else + { + me->printMsg(tr("Startoption 'vdradminfile' not set!")); + me->helpLine(false); + state=osContinue; + } + } + break; case kRed: case kRecord: // new { @@ -1290,6 +1411,75 @@ eOSState magazine::ProcessKey(eKeys Key) } } } + else if (mes) + { + state=mes->ProcessKey(Key); + if (state==osBack) + { + state=osContinue; + delete mes; + mes=NULL; + if (!osd) + Show(); + } + else if (state == osUnknown) + { + switch (Key & ~k_Repeat) + { + case kOk: + case kGreen: + { +#if VDRVERSNUM >= 10300 + const cEvent *ev=mes->currentSelected(); +#else + const cEventInfo *ev=mes->currentSelected(); +#endif + if (ev) + { + delete mes; + mes=NULL; + me=new tvOcMenuEvent(ev); + me->Display(); + } + } + state=osContinue; + break; + case kYellow: + mes->searchIn(schedArray,schedArrayNum); + state=osContinue; + break; + case kBack: + case kBlue: + delete mes; + mes=NULL; + if (!osd) + Show(); + break; + case kRed: +#if VDRVERSNUM >= 10300 + const cEvent *ev=mes->currentSelected(); +#else + const cEventInfo *ev=mes->currentSelected(); +#endif + if (ev) + { + delete mes; + mes=NULL; + cTimer *timer = new cTimer(ev); + cTimer *t = Timers.GetTimer(timer); + if (t) + { + delete timer; + timer = t; + } + met=new cMenuEditTimer(timer, !t); + met->Display(); + } + state=osContinue; + break; + } + } + } else { state = cOsdObject::ProcessKey(Key); @@ -1438,7 +1628,7 @@ eOSState magazine::ProcessKey(eKeys Key) #else cEventInfo **ev=ev4ch(EDIT_curChannel); #endif - me=new cMenuEvent(ev[EDIT_curEVI], true); + me=new tvOcMenuEvent(ev[EDIT_curEVI]); me->Display(); curmode=SHOW; EDIT_curEvent=0; @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: magazine.h,v 1.12 2004/07/08 10:46:44 schmitzj Exp $ + * $Id: magazine.h,v 1.15 2004/11/30 19:31:48 schmitzj Exp $ * */ @@ -14,6 +14,8 @@ #include <time.h> #include "gfxtools.h" #include "config.h" +#include "timer.h" +#include "search.h" void mzlog(int level, const char *fmt, ...); #define TL_YSTART 48 @@ -50,8 +52,9 @@ class magazine : public cOsdObject cOsdBase *osd; #endif - class cMenuEvent *me; + class tvOcMenuEvent *me; class cMenuEditTimer *met; + class cSearchMenu *mes; anyFont *f1,*f2,*f3,*f4; @@ -94,13 +97,20 @@ class magazine : public cOsdObject int EDIT_curChannel; int EDIT_curEVI; + bool timeline_tested; + bool timeline_found_conflict; + #if VDRVERSNUM >= 10300 - const class cEvent *getNext(const cSchedule *s,const cEvent *e); - const class cEvent *getPrev(const cSchedule *s,const cEvent *e); +public: + static const class cEvent *getNext(const cSchedule *s,const cEvent *e); + static const class cEvent *getPrev(const cSchedule *s,const cEvent *e); +private: cEvent **ev4ch(int); #else - const class cEventInfo *getNext(const cSchedule *s,const cEventInfo *e); - const class cEventInfo *getPrev(const cSchedule *s,const cEventInfo *e); +public: + static const class cEventInfo *getNext(const cSchedule *s,const cEventInfo *e); + static const class cEventInfo *getPrev(const cSchedule *s,const cEventInfo *e); +private: cEventInfo **ev4ch(int); #endif void searchcEvt(); @@ -128,41 +138,18 @@ class magazine : public cOsdObject void gotoUsertime(int u); void showHelp(void); -public: - magazine(class cPlugin *); - virtual ~magazine(); - virtual void Show(void); - virtual eOSState ProcessKey(eKeys Key); -}; -class cMenuEvent : public cOsdMenu { -private: #if VDRVERSNUM >= 10300 - const class cEvent *eventInfo; + void autoTimer(const class cEvent *EventInfo); #else - const class cEventInfo *eventInfo; + void autoTimer(const class cEventInfo *EventInfo); #endif + public: -#if VDRVERSNUM >= 10300 - cMenuEvent(const class cEvent *EventInfo, bool CanSwitch = false); -#else - cMenuEvent(const class cEventInfo *EventInfo, bool CanSwitch = false); -#endif - cMenuEvent(bool Now); - virtual eOSState ProcessKey(eKeys Key); + magazine(class cPlugin *); + virtual ~magazine(); + virtual void Show(void); + virtual eOSState ProcessKey(eKeys Key); }; -class cMenuEditTimer : public cOsdMenu { -private: - cTimer *timer; - cTimer data; - int channel; - bool addIfConfirmed; - class cMenuEditDateItem *firstday; - void SetFirstDayItem(void); -public: - cMenuEditTimer(cTimer *Timer, bool New = false); - virtual ~cMenuEditTimer(); - virtual eOSState ProcessKey(eKeys Key); - }; #endif diff --git a/search.c b/search.c new file mode 100644 index 0000000..92e75a1 --- /dev/null +++ b/search.c @@ -0,0 +1,223 @@ +/* + * search.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: search.c,v 1.3 2004/11/23 22:13:37 schmitzj Exp $ + * + */ + +#include "search.h" +#include "magazine.h" + +#if VDRVERSNUM >= 10300 +EventItem::EventItem(const class cEvent *ev) +#else +EventItem::EventItem(const class cEventInfo *ev) +#endif +{ + char buf[200]; + const char *txt,*time1,*time2,*date,*chan; + cChannel *channel; + + myev=ev; +#if VDRVERSNUM >= 10300 + channel = Channels.GetByChannelID(ev->ChannelID(), true); +#else + channel = Channels.GetByChannelID(ev->GetChannelID(), true); +#endif + time1=ev->GetTimeString(); + time2=ev->GetEndTimeString(); +#if VDRVERSNUM >= 10308 + date=ev->GetDateString(); +#else + date=ev->GetDate(); +#endif +#if VDRVERSNUM >= 10315 + chan=channel->ShortName(true); +#else + chan=channel->Name(); +#endif +#if VDRVERSNUM >= 10300 + txt=ev->Title(); +#else + txt=ev->GetTitle(); +#endif + + snprintf(buf,sizeof(buf)-1,"%.6s %s - %s %s/%s",date,time1,time2,chan,txt); + SetText(buf); +} + +// ----------------------------------------------------------------------------- + +cSearchMenu:: +#if VDRVERSNUM >= 10300 + cSearchMenu(const class cEvent *ev) +#else + cSearchMenu(const class cEventInfo *ev) +#endif + : cOsdMenu(tr("Search")) +{ + myev=ev; + + const char *title; +#if VDRVERSNUM >= 10300 + title=ev->Title(); +#else + title=ev->GetTitle(); +#endif + + char txt[200]; + snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); + SetTitle(txt); + + SetStatus(tr("Searching...")); + Display(); +#if VDRVERSNUM >= 10307 + Skins.Message(mtInfo, tr("Searching...")); +#else + Interface->Status(tr("Searching...")); + Interface->Flush(); +#endif +#if VDRVERSNUM >= 10300 + const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); +#else + const cSchedules* Schedules = cSIProcessor::Schedules(_mutexLock); +#endif + + const cSchedule *s; +#if VDRVERSNUM >= 10300 + s=Schedules->GetSchedule(ev->ChannelID()); +#else + s=Schedules->GetSchedule(ev->GetChannelID()); +#endif + + int cc=search(s,ev); + + snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); + SetTitle(txt); + if (cc>0) + { + SetStatus(""); + SetHelp(tr("Record"), tr("Details"), tr("in all"), tr("Back")); + } + else + { + SetStatus(tr("Nothing found!")); + SetHelp(NULL, NULL, tr("in all"), tr("Back")); + } + Display(); +} +#if VDRVERSNUM >= 10300 + const cEvent *cev=NULL; +#else + const cEventInfo *cev=NULL; +#endif + +int cSearchMenu:: +#if VDRVERSNUM >= 10300 + search(const cSchedule *s,const class cEvent *ev) +#else + search(const cSchedule *s,const class cEventInfo *ev) +#endif +{ + const char *title; +#if VDRVERSNUM >= 10300 + title=ev->Title(); +#else + title=ev->GetTitle(); +#endif + + int cc=0; + cev=s->GetPresentEvent(); + while(cev) + { + if (cev!=ev || tvonscreenCfg.showsearchinitiator) + { + const char *ctitle; +#if VDRVERSNUM >= 10300 + ctitle=cev->Title(); +#else + ctitle=cev->GetTitle(); +#endif + if (ctitle && title && strstr(ctitle,title)) // || strstr(title,ctitle)) + { + Add(new EventItem(cev)); + cc++; + } + } + cev=magazine::getNext(s,cev); + } + return cc; +} +void cSearchMenu::searchIn(const cSchedule** schedArray,int schedArrayNum) +{ + cChannel* channel; + const char *title; +#if VDRVERSNUM >= 10300 + title=myev->Title(); +#else + title=myev->GetTitle(); +#endif + + char txt[200]; + snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); + SetTitle(txt); + Clear(); + + SetStatus(tr("Searching...")); + Display(); +#if VDRVERSNUM >= 10307 + Skins.Message(mtInfo, tr("Searching...")); +#else + Interface->Status(tr("Searching...")); + Interface->Flush(); +#endif + int cc=0; + + for(int i=0;i<schedArrayNum;i++) + { +#if VDRVERSNUM >= 10300 + channel = Channels.GetByChannelID(schedArray[i]->ChannelID(), true); +#else + channel = Channels.GetByChannelID(schedArray[i]->GetChannelID(), true); +#endif +#if VDRVERSNUM >= 10315 + snprintf(txt,sizeof(txt),"%s /%-20.20s",tr("Searching..."),channel->ShortName(true)); +#else + snprintf(txt,sizeof(txt),"%s /%-20.20s",tr("Searching..."),channel->Name()); +#endif +#if VDRVERSNUM >= 10307 + Skins.Message(mtInfo, txt); +#else + Interface->Status(txt); + Interface->Flush(); +#endif + cc+=search(schedArray[i],myev); + } + + snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); + SetTitle(txt); + if (cc>0) + { + SetStatus(""); + SetHelp(tr("Record"), tr("Details"), NULL, tr("Back")); + } + else + { + SetStatus(tr("Nothing found!")); + SetHelp(NULL, NULL, NULL, tr("Back")); + } + Display(); +} + + +#if VDRVERSNUM >= 10300 +const class cEvent *cSearchMenu::currentSelected(void) +#else +const class cEventInfo *cSearchMenu::currentSelected(void) +#endif +{ + EventItem *item = (EventItem *)Get(Current()); + return item ? item->Event() : NULL; +} diff --git a/search.h b/search.h new file mode 100644 index 0000000..88b3afa --- /dev/null +++ b/search.h @@ -0,0 +1,80 @@ +/* + * search.h + * + * See the README file for copyright information and how to reach the author. + * + * $Id: search.h,v 1.1 2004/11/23 14:21:24 schmitzj Exp $ + * + */ + +#ifndef SEARCH_H +#define SEARCH_H + +#include <vdr/plugin.h> +#include <time.h> +#include "gfxtools.h" +#include "config.h" + +class EventItem : public cOsdItem +{ +#if VDRVERSNUM >= 10300 + const class cEvent *myev; +#else + const class cEventInfo *myev; +#endif + +public: +#if VDRVERSNUM >= 10300 + EventItem(const class cEvent *ev); +#else + EventItem(const class cEventInfo *ev); +#endif + +#if VDRVERSNUM >= 10300 + const class cEvent *Event(void) +#else + const class cEventInfo *Event(void) +#endif + { + return myev; + }; +}; + +// ----------------------------------------------------------------------------- + +class cSearchMenu : public cOsdMenu +{ +#if VDRVERSNUM >= 10300 + cSchedulesLock _schedulesLock; +#else + cMutexLock _mutexLock; +#endif + +#if VDRVERSNUM >= 10300 + const class cEvent *myev; +#else + const class cEventInfo *myev; +#endif + +#if VDRVERSNUM >= 10300 + int search(const cSchedule *s,const class cEvent *ev); +#else + int search(const cSchedule *s,const class cEventInfo *ev); +#endif + +public: +#if VDRVERSNUM >= 10300 + cSearchMenu(const class cEvent *EventInfo); +#else + cSearchMenu(const class cEventInfo *EventInfo); +#endif +#if VDRVERSNUM >= 10300 + const class cEvent *currentSelected(void); +#else + const class cEventInfo *currentSelected(void); +#endif + + void searchIn(const cSchedule** schedArray,int schedArrayNum); +}; + +#endif @@ -0,0 +1,30 @@ +/* + * timer.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: timer.c,v 1.2 2004/11/23 14:21:24 schmitzj Exp $ + * + */ + +#include "magazine.h" + +tvOcMenuEvent:: +#if VDRVERSNUM >= 10300 + tvOcMenuEvent(const class cEvent *EventInfo) +#else + tvOcMenuEvent(const class cEventInfo *EventInfo) +#endif + : cMenuEvent(EventInfo,false) +{ + helpLine(); +} + +void tvOcMenuEvent::printMsg(const char *s) +{ + SetStatus(s); +} +void tvOcMenuEvent::helpLine(bool full) +{ + SetHelp(tr("Record"), tr("Search"), full?tr("AutoTimer"):NULL, NULL); +} @@ -0,0 +1,64 @@ +/* + * timer.h + * + * See the README file for copyright information and how to reach the author. + * + * $Id: timer.h,v 1.3 2004/11/24 17:05:27 schmitzj Exp $ + * + */ + +#ifndef TIMER_H +#define TIMER_H + +#include <vdr/plugin.h> +#include <time.h> +#include "gfxtools.h" +#include "config.h" + +#if VDRVERSNUM >= 10300 +class cMenuEvent : public cOsdMenu { +private: + const cEvent *event; +public: + cMenuEvent(const cEvent *Event, bool CanSwitch = false); + virtual void Display(void); + virtual eOSState ProcessKey(eKeys Key); +}; +#else +class cMenuEvent : public cOsdMenu { +private: + const class cEventInfo *eventInfo; +public: + cMenuEvent(const class cEventInfo *EventInfo, bool CanSwitch = false); + cMenuEvent(bool Now); + virtual eOSState ProcessKey(eKeys Key); +}; +#endif + +class cMenuEditTimer : public cOsdMenu { +private: + cTimer *timer; + cTimer data; + int channel; + bool addIfConfirmed; + class cMenuEditDateItem *firstday; + void SetFirstDayItem(void); +public: + cMenuEditTimer(cTimer *Timer, bool New = false); + virtual ~cMenuEditTimer(); + virtual eOSState ProcessKey(eKeys Key); + }; + +class tvOcMenuEvent : public cMenuEvent { +public: +#if VDRVERSNUM >= 10300 + tvOcMenuEvent(const class cEvent *EventInfo); +#else + tvOcMenuEvent(const class cEventInfo *EventInfo); +#endif + void printMsg(const char *); + void helpLine(bool full=true); +}; + + +#endif diff --git a/tvonscreen.c b/tvonscreen.c index b9136ef..ae7f036 100644 --- a/tvonscreen.c +++ b/tvonscreen.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: tvonscreen.c,v 1.11 2004/07/08 10:46:44 schmitzj Exp $ + * $Id: tvonscreen.c,v 1.14 2005/01/02 22:43:46 schmitzj Exp $ * */ @@ -12,7 +12,7 @@ #include "config.h" #include "i18n.h" -static const char *VERSION = "0.6.0"; +static const char *VERSION = "0.7.0"; static const char *DESCRIPTION = "Shows the EPG info in form of a typical TV magazine"; static const char *MAINMENUENTRY = "TV-OnScreen"; |
