mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
anged menu numbering handling vor mcMain
This commit is contained in:
parent
9647640dc7
commit
5b03953fd1
5
HISTORY
5
HISTORY
@ -443,3 +443,8 @@ Version 1.2.5 (horchi)
|
||||
Version 1.2.6 (horchi)
|
||||
|
||||
- extended epg2vdr timer interface for schedules
|
||||
|
||||
Version 1.2.7 (horchi)
|
||||
|
||||
- changed menu numbering handling vor mcMain
|
||||
> now only numbers up to 999 are detected as 'Numbering'
|
||||
|
@ -474,6 +474,31 @@ cVeMenuMain::~cVeMenuMain(void) {
|
||||
free(label);
|
||||
}
|
||||
|
||||
int countDigits(int arg)
|
||||
{
|
||||
return snprintf(NULL, 0, "%d", arg) - (arg < 0);
|
||||
}
|
||||
|
||||
void cVeMenuMain::SplitText(void) {
|
||||
char* string = skipspace(text);
|
||||
unsigned int num = atoi(string);
|
||||
int digits = countDigits(num);
|
||||
|
||||
free(number);
|
||||
free(label);
|
||||
|
||||
if (digits > 0 && digits < 4 && string[digits] == ' ')
|
||||
{
|
||||
if (asprintf(&label, "%s", string+digits+1)) ;
|
||||
if (asprintf(&number, "%d", num)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf(&label, "%s", string)) ;
|
||||
number = strdup("");
|
||||
}
|
||||
}
|
||||
/*
|
||||
void cVeMenuMain::SplitText(void) {
|
||||
char *start = skipspace(text);
|
||||
bool found = false;
|
||||
@ -521,6 +546,7 @@ void cVeMenuMain::SplitText(void) {
|
||||
}
|
||||
label = strdup(skipspace(c));
|
||||
}
|
||||
*/
|
||||
|
||||
/******************************************************************
|
||||
* cLeMenuMain
|
||||
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
static const char *VERSION = "1.2.6";
|
||||
static const char *VERSION = "1.2.7";
|
||||
static const char *DESCRIPTION = trNOOP("Skin Designer");
|
||||
|
||||
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {
|
||||
|
Loading…
Reference in New Issue
Block a user