mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added SetText() to cMenuText
This commit is contained in:
parent
d10624fbca
commit
4c5aedbd79
@ -184,7 +184,7 @@ Stefan Huelswitt <huels@iname.com>
|
|||||||
for creating mutexes with PTHREAD_MUTEX_ERRORCHECK_NP, which made the 'lockingTid'
|
for creating mutexes with PTHREAD_MUTEX_ERRORCHECK_NP, which made the 'lockingTid'
|
||||||
stuff obsolete
|
stuff obsolete
|
||||||
for suggesting to move the declaration of cMenuText to VDR/menu.h to make it
|
for suggesting to move the declaration of cMenuText to VDR/menu.h to make it
|
||||||
available to plugins
|
available to plugins, and to add a SetText() function
|
||||||
|
|
||||||
Ulrich Röder <roeder@efr-net.de>
|
Ulrich Röder <roeder@efr-net.de>
|
||||||
for pointing out that there are channels that have a symbol rate higher than
|
for pointing out that there are channels that have a symbol rate higher than
|
||||||
|
5
HISTORY
5
HISTORY
@ -2827,5 +2827,6 @@ Video Disk Recorder Revision History
|
|||||||
'Transfer Mode' (thanks to Michal Dobrzynski for reporting this one).
|
'Transfer Mode' (thanks to Michal Dobrzynski for reporting this one).
|
||||||
- Fixed a memory leak in NIT processing (thanks to Marcel Wiesweg).
|
- Fixed a memory leak in NIT processing (thanks to Marcel Wiesweg).
|
||||||
- Added a few missing initializations (thanks to Marcel Wiesweg).
|
- Added a few missing initializations (thanks to Marcel Wiesweg).
|
||||||
- Moved the declaration of cMenuText to VDR/menu.h to make it available to plugins
|
- Moved the declaration of cMenuText to VDR/menu.h to make it available to plugins.
|
||||||
(suggested by Stefan Huelswitt).
|
It now also has a SetText() function that can be used to dynamically set the text
|
||||||
|
in an already existing cMenuText (both suggested by Stefan Huelswitt).
|
||||||
|
16
menu.c
16
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.303 2004/05/23 09:39:09 kls Exp $
|
* $Id: menu.c 1.304 2004/05/23 09:47:14 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -502,7 +502,19 @@ eOSState cMenuChannels::ProcessKey(eKeys Key)
|
|||||||
cMenuText::cMenuText(const char *Title, const char *Text, eDvbFont Font)
|
cMenuText::cMenuText(const char *Title, const char *Text, eDvbFont Font)
|
||||||
:cOsdMenu(Title)
|
:cOsdMenu(Title)
|
||||||
{
|
{
|
||||||
text = Text;
|
text = NULL;
|
||||||
|
SetText(Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
cMenuText::~cMenuText()
|
||||||
|
{
|
||||||
|
free(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cMenuText::SetText(const char *Text)
|
||||||
|
{
|
||||||
|
free(text);
|
||||||
|
text = strdup(Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMenuText::Display(void)
|
void cMenuText::Display(void)
|
||||||
|
6
menu.h
6
menu.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.h 1.62 2004/05/23 09:39:02 kls Exp $
|
* $Id: menu.h 1.63 2004/05/23 09:47:26 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MENU_H
|
#ifndef __MENU_H
|
||||||
@ -21,9 +21,11 @@
|
|||||||
|
|
||||||
class cMenuText : public cOsdMenu {
|
class cMenuText : public cOsdMenu {
|
||||||
private:
|
private:
|
||||||
const char *text;
|
char *text;
|
||||||
public:
|
public:
|
||||||
cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd);
|
cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd);
|
||||||
|
virtual ~cMenuText();
|
||||||
|
void SetText(const char *Text);
|
||||||
virtual void Display(void);
|
virtual void Display(void);
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user