mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Removed the unnecessary 'value' member from cMenuEditItem
This commit is contained in:
parent
a45c1c9a28
commit
b1dad5cb3c
1
HISTORY
1
HISTORY
@ -4507,3 +4507,4 @@ Video Disk Recorder Revision History
|
|||||||
new 'noneString' in cMenuEditChanItem (reported by Thomas Günther).
|
new 'noneString' in cMenuEditChanItem (reported by Thomas Günther).
|
||||||
- Added NULL checks to some strdup() calls in menuitems.c (suggested by Darren
|
- Added NULL checks to some strdup() calls in menuitems.c (suggested by Darren
|
||||||
Salt).
|
Salt).
|
||||||
|
- Removed the unnecessary 'value' member from cMenuEditItem.
|
||||||
|
@ -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: menuitems.c 1.38 2006/04/14 09:59:16 kls Exp $
|
* $Id: menuitems.c 1.39 2006/04/14 10:02:18 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menuitems.h"
|
#include "menuitems.h"
|
||||||
@ -24,21 +24,17 @@ const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@";
|
|||||||
cMenuEditItem::cMenuEditItem(const char *Name)
|
cMenuEditItem::cMenuEditItem(const char *Name)
|
||||||
{
|
{
|
||||||
name = strdup(Name ? Name : "???");
|
name = strdup(Name ? Name : "???");
|
||||||
value = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cMenuEditItem::~cMenuEditItem()
|
cMenuEditItem::~cMenuEditItem()
|
||||||
{
|
{
|
||||||
free(name);
|
free(name);
|
||||||
free(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMenuEditItem::SetValue(const char *Value)
|
void cMenuEditItem::SetValue(const char *Value)
|
||||||
{
|
{
|
||||||
free(value);
|
|
||||||
value = strdup(Value);
|
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
asprintf(&buffer, "%s:\t%s", name, value);
|
asprintf(&buffer, "%s:\t%s", name, Value);
|
||||||
SetText(buffer, false);
|
SetText(buffer, false);
|
||||||
cStatus::MsgOsdCurrentItem(buffer);
|
cStatus::MsgOsdCurrentItem(buffer);
|
||||||
}
|
}
|
||||||
|
@ -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: menuitems.h 1.19 2006/04/09 12:05:05 kls Exp $
|
* $Id: menuitems.h 1.20 2006/04/14 10:01:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MENUITEMS_H
|
#ifndef __MENUITEMS_H
|
||||||
@ -17,7 +17,6 @@ extern const char *FileNameChars;
|
|||||||
class cMenuEditItem : public cOsdItem {
|
class cMenuEditItem : public cOsdItem {
|
||||||
private:
|
private:
|
||||||
char *name;
|
char *name;
|
||||||
char *value;
|
|
||||||
public:
|
public:
|
||||||
cMenuEditItem(const char *Name);
|
cMenuEditItem(const char *Name);
|
||||||
~cMenuEditItem();
|
~cMenuEditItem();
|
||||||
|
Loading…
Reference in New Issue
Block a user