diff options
author | louis <louis.braun@gmx.de> | 2015-01-26 17:10:17 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-26 17:10:17 +0100 |
commit | 705eefc1f099f652dedc5645808d798d5d3d46d7 (patch) | |
tree | 4447491fa6360be2d6a985a92c73b759ada2f9b6 | |
parent | d0868978bc0970b16221cc72df5c37efbf2accc9 (diff) | |
download | vdr-plugin-skindesigner-705eefc1f099f652dedc5645808d798d5d3d46d7.tar.gz vdr-plugin-skindesigner-705eefc1f099f652dedc5645808d798d5d3d46d7.tar.bz2 |
fixed Bug that double vars were not handled correctly
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | libtemplate/globals.c | 5 | ||||
-rw-r--r-- | views/displaymenurootview.c | 14 |
3 files changed, 21 insertions, 4 deletions
@@ -184,3 +184,9 @@ Version 0.1.6 or more skin names start identically Version 0.2.0 + +- fixed Bug that double vars were not handled correctly +- fixed Bug that calling mplayer plugin via keymacros.conf causes segfault + +Version 0.2.1 + diff --git a/libtemplate/globals.c b/libtemplate/globals.c index 36e2c19..1ce7502 100644 --- a/libtemplate/globals.c +++ b/libtemplate/globals.c @@ -112,6 +112,11 @@ void cGlobals::ReplaceDoubleVars(string &value) { stringstream st; st << it->second; string doubleVal = st.str(); + if (config.replaceDecPoint) { + if (doubleVal.find_first_of('.') != string::npos) { + std::replace( doubleVal.begin(), doubleVal.end(), '.', config.decPoint); + } + } value = value.replace(foundToken, token.size(), doubleVal); } } diff --git a/views/displaymenurootview.c b/views/displaymenurootview.c index db6e56e..4caf2e5 100644 --- a/views/displaymenurootview.c +++ b/views/displaymenurootview.c @@ -31,12 +31,18 @@ cDisplayMenuRootView::cDisplayMenuRootView(cTemplateView *rootView) : cView(root } cDisplayMenuRootView::~cDisplayMenuRootView() { - if (view) + if (view) { delete view; - if (listView) + view = NULL; + } + if (listView) { delete listView; - if (detailView) + listView = NULL; + } + if (detailView) { delete detailView; + detailView = NULL; + } } /******************************************************************* @@ -337,7 +343,7 @@ void cDisplayMenuRootView::Clear(void) { } void cDisplayMenuRootView::ClearRootView(void) { - if (defaultBackgroundDrawn && view->BackgroundImplemented()) + if (defaultBackgroundDrawn && view && view->BackgroundImplemented()) ClearViewElement(veBackground); if (defaultHeaderDrawn) ClearViewElement(veHeader); |