From 1bb571ae4d12b42863a8f85969439fa1dd2655ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sat, 28 Sep 2013 13:44:30 +0200 Subject: Remember current position in setup menu. Reorganise regexp.conf. Cosmetics. --- epgfixer.c | 1 - epgfixer/regexp.conf | 6 +++--- regexp.c | 1 - setup_menu.c | 8 ++++++++ tools.h | 1 - 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/epgfixer.c b/epgfixer.c index 889f929..ecf3a40 100644 --- a/epgfixer.c +++ b/epgfixer.c @@ -146,7 +146,6 @@ bool cPluginEpgfixer::SetupParse(const char *Name, const char *Value) { // Parse your own setup parameters and store their values. cString m_ProcessedArgs; - // Parse your own setup parameters and store their values. const char *pt; if (*m_ProcessedArgs && NULL != (pt = strstr(m_ProcessedArgs + 1, Name)) && *(pt - 1) == ' ' && *(pt + strlen(Name)) == ' ') { diff --git a/epgfixer/regexp.conf b/epgfixer/regexp.conf index 0e3df18..a7ef68c 100644 --- a/epgfixer/regexp.conf +++ b/epgfixer/regexp.conf @@ -1,6 +1,3 @@ -# Example of disabled regexp: -#!title=m/^(?:Movie: |Document: )(?.*)$/ - # Remove "Movie: " or "Document: " from the beginning of title field for # channels 1, 3, 5, 6 and 7: #1,3,5-7:title=m/^(?:Movie: |Document: )(?<title>.*)$/ @@ -21,3 +18,6 @@ # Matches 'foo' case-insensitively #description=m/foo/i + +# Example of disabled regexp: +#!title=m/^(?:Movie: |Document: )(?<title>.*)$/ diff --git a/regexp.c b/regexp.c index 50e11e1..c4c1243 100644 --- a/regexp.c +++ b/regexp.c @@ -78,7 +78,6 @@ void cRegexp::FreeCompiled() } } - int cRegexp::ParseModifiers(char *modstring, int substitution) { int i = 0; diff --git a/setup_menu.c b/setup_menu.c index 06dbaae..8b60870 100644 --- a/setup_menu.c +++ b/setup_menu.c @@ -82,6 +82,8 @@ protected: } void Set(void) { + int current = Current(); + Clear(); int i = 0; LISTITEM *item = (LISTITEM *)list->First(); @@ -94,6 +96,8 @@ protected: SetHelp(trVDR("Button$On/Off"), trVDR("Button$New"), trVDR("Button$Delete"), tr("Button$Cancel")); else SetHelp(NULL,trVDR("Button$New"), NULL, tr("Button$Cancel")); + + SetCurrent(Get(current)); Display(); } public: @@ -173,6 +177,8 @@ cMenuSetupEpgfixer::cMenuSetupEpgfixer(void) void cMenuSetupEpgfixer::Set(void) { + int current = Current(); + Clear(); help.Clear(); Add(new cOsdItem(tr("Regular expressions"), osUser1)); @@ -218,6 +224,8 @@ void cMenuSetupEpgfixer::Set(void) &newconfig.striphtml)); help.Append(tr("Convert HTML entities from all fields to matching regular characters.")); SetHelp(tr("Button$Load"),NULL,NULL, tr("Button$Clear EPG")); + + SetCurrent(Get(current)); Display(); } diff --git a/tools.h b/tools.h index 21dbd64..3b5c594 100644 --- a/tools.h +++ b/tools.h @@ -20,7 +20,6 @@ #endif #define error(x...) esyslog("ERROR: " x); - #define FREE(x) { free(x); x = NULL; } // --- EPG bug fixes ---------------------------------------------------- -- cgit v1.2.3