From 6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25 Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Fri, 26 May 2017 11:46:01 +0200 Subject: Make MAX_CHARS configurable. --- common.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'common.c') 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 #include #include @@ -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"; } } } -- cgit v1.2.3