diff options
author | Frank Neumann <fnu@yavdr.org> | 2017-05-26 11:46:01 +0200 |
---|---|---|
committer | Frank Neumann <fnu@yavdr.org> | 2017-05-26 11:46:01 +0200 |
commit | 6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25 (patch) | |
tree | 8e2d567f7c6a6ce1fcd81af45d433789310ad30a /common.c | |
parent | 35b380b5b6ee8d46c1b5ed45837d3c35ea1a5faf (diff) | |
download | vdr-plugin-text2skin-6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25.tar.gz vdr-plugin-text2skin-6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25.tar.bz2 |
Make MAX_CHARS configurable.
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,6 +1,7 @@ // -*- c++ -*- #include "common.h" +#include "setup.h" #include <sstream> #include <vdr/plugin.h> #include <vdr/device.h> @@ -225,9 +226,6 @@ bool GetFrontendHasSignal(void) std::string AddExtInfoToDescription(const char *Title, const char *ShortText, const char *Description, const char *Aux, bool StripAux) { - // max. width so lines don't get wrapped - #define MAX_CHARS 100 - // prepare the description std::stringstream desc(""); @@ -274,7 +272,7 @@ std::string AddExtInfoToDescription(const char *Title, const char *ShortText, co buf << " - " << r->event->Title(); if (!isempty(r->event->ShortText())) buf << "~" << r->event->ShortText(); - desc << FitToWidth(buf, MAX_CHARS) << "\n"; + desc << FitToWidth(buf, (Text2SkinSetup.MaxChars)) << "\n"; } delete list; } @@ -297,7 +295,7 @@ std::string AddExtInfoToDescription(const char *Title, const char *ShortText, co desc << tr("AUXILIARY INFOS") << ":\n"; std::stringstream buf; buf << " - " << tr("Search timer") << ": " << searchTimer; - desc << FitToWidth(buf, MAX_CHARS) << "\n"; + desc << FitToWidth(buf, (Text2SkinSetup.MaxChars)) << "\n"; } } } |