mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed a second place where a message should be given when an instant recording is started (reported by Jesus Bravo Alvarez). - Modified logging so that even on NPTL systems each line in the log file shows the individual thread's pid (based on a suggestion from Francois-Xavier Kowalski). - Fixed a problem with @plugin in keymacros.conf in case the named plugin is not loaded (reported by Franz Gangkofer). - Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule' pointers from cChannel objects (reported by Malte Schröder). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Improved NULL checking in strreplace(). - Fixed a crash in the Schedule menu with events that have no title (reported by Rolf Ahrenberg). cEvent::FixEpgBugs() now assigns a "No title" string to events that have no title. - Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Recordings are now only started if there is at least 300MB free disk space (suggested by Markus Hahn). - When entering text via the numeric keys, the cursor now automatically advances (based on a patch from Rolf Ahrenberg). - Updated the Polish OSD texts and the fontosd-iso8859-2.c file (thanks to Jaroslaw Swierczynski). - Disabled the "buffer reserve" in Transfer Mode. Last chance to complain if you really need it - it will be completely removed in the next version. If you are experiencing problems with a/v running out of sync, try the latest driver and firmware (if you are using a full featured DVB card). - Switching channels with the Up/Down or Channel+/Channel- keys now works a lot faster when the repeat function kicks in, by not actually switching the channel every time, but rather only displaying the channel info and doing the final switch when the key is released. - The channel display is now updated _before_ the channel is switched. - Added a missing initialization of 'timeout' in the cDisplayChannel constructor. - Fixed detecting if there can be any useful further input when entering channel numbers (thanks to Thomas Bergwinkl). - Updated the Spanish OSD texts (thanks to Jesus Bravo Alvarez). - Fixed handling the '0' key for switching between the last two channels (thanks to Thomas Bergwinkl).
170 lines
4.0 KiB
C++
170 lines
4.0 KiB
C++
/*
|
|
* menuitems.h: General purpose menu items
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: menuitems.h 1.16 2006/01/21 10:45:55 kls Exp $
|
|
*/
|
|
|
|
#ifndef __MENUITEMS_H
|
|
#define __MENUITEMS_H
|
|
|
|
#include "osdbase.h"
|
|
|
|
extern const char *FileNameChars;
|
|
|
|
class cMenuEditItem : public cOsdItem {
|
|
private:
|
|
char *name;
|
|
char *value;
|
|
public:
|
|
cMenuEditItem(const char *Name);
|
|
~cMenuEditItem();
|
|
void SetValue(const char *Value);
|
|
};
|
|
|
|
class cMenuEditIntItem : public cMenuEditItem {
|
|
protected:
|
|
int *value;
|
|
int min, max;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditIntItem(const char *Name, int *Value, int Min = 0, int Max = INT_MAX);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditBoolItem : public cMenuEditIntItem {
|
|
protected:
|
|
const char *falseString, *trueString;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString = NULL, const char *TrueString = NULL);
|
|
};
|
|
|
|
class cMenuEditBitItem : public cMenuEditBoolItem {
|
|
protected:
|
|
uint *value;
|
|
uint mask;
|
|
int bit;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditBitItem(const char *Name, uint *Value, uint Mask, const char *FalseString = NULL, const char *TrueString = NULL);
|
|
};
|
|
|
|
class cMenuEditNumItem : public cMenuEditItem {
|
|
protected:
|
|
char *value;
|
|
int length;
|
|
bool blind;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditNumItem(const char *Name, char *Value, int Length, bool Blind = false);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditChrItem : public cMenuEditItem {
|
|
private:
|
|
char *value;
|
|
char *allowed;
|
|
const char *current;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditChrItem(const char *Name, char *Value, const char *Allowed);
|
|
~cMenuEditChrItem();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditStrItem : public cMenuEditItem {
|
|
private:
|
|
char *value;
|
|
int length;
|
|
char *allowed;
|
|
int pos;
|
|
bool insert, newchar, uppercase;
|
|
const char *charMap;
|
|
const char *currentChar;
|
|
eKeys lastKey;
|
|
cTimeMs autoAdvanceTimeout;
|
|
void SetHelpKeys(void);
|
|
void AdvancePos(void);
|
|
virtual void Set(void);
|
|
char Inc(char c, bool Up);
|
|
protected:
|
|
bool InEditMode(void) { return pos >= 0; }
|
|
public:
|
|
cMenuEditStrItem(const char *Name, char *Value, int Length, const char *Allowed);
|
|
~cMenuEditStrItem();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditStraItem : public cMenuEditIntItem {
|
|
private:
|
|
const char * const *strings;
|
|
protected:
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditStraItem(const char *Name, int *Value, int NumStrings, const char * const *Strings);
|
|
};
|
|
|
|
class cMenuEditChanItem : public cMenuEditIntItem {
|
|
protected:
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditChanItem(const char *Name, int *Value);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditTranItem : public cMenuEditChanItem {
|
|
private:
|
|
int number;
|
|
int *source;
|
|
int transponder;
|
|
public:
|
|
cMenuEditTranItem(const char *Name, int *Value, int *Source);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditDateItem : public cMenuEditItem {
|
|
private:
|
|
static int days[];
|
|
time_t *value;
|
|
int *weekdays;
|
|
time_t oldvalue;
|
|
int dayindex;
|
|
int FindDayIndex(int WeekDays);
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditDateItem(const char *Name, time_t *Value, int *WeekDays = NULL);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditTimeItem : public cMenuEditItem {
|
|
protected:
|
|
int *value;
|
|
int hh, mm;
|
|
int pos;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditTimeItem(const char *Name, int *Value);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cPlugin;
|
|
|
|
class cMenuSetupPage : public cOsdMenu {
|
|
private:
|
|
cPlugin *plugin;
|
|
protected:
|
|
void SetSection(const char *Section);
|
|
virtual void Store(void) = 0;
|
|
void SetupStore(const char *Name, const char *Value = NULL);
|
|
void SetupStore(const char *Name, int Value);
|
|
public:
|
|
cMenuSetupPage(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
void SetPlugin(cPlugin *Plugin);
|
|
};
|
|
|
|
#endif //__MENUITEMS_H
|