summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-26 11:46:01 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-26 11:46:01 +0200
commit6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25 (patch)
tree8e2d567f7c6a6ce1fcd81af45d433789310ad30a /common.c
parent35b380b5b6ee8d46c1b5ed45837d3c35ea1a5faf (diff)
downloadvdr-plugin-text2skin-6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25.tar.gz
vdr-plugin-text2skin-6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25.tar.bz2
Make MAX_CHARS configurable.
Diffstat (limited to 'common.c')
-rw-r--r--common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/common.c b/common.c
index a371f00..f35fa62 100644
--- a/common.c
+++ b/common.c
@@ -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";
}
}
}