You can subscribe to this list here.
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(8) |
Feb
(6) |
Mar
(5) |
Apr
(7) |
May
(3) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(8) |
Dec
(2) |
| 2014 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(5) |
Dec
(1) |
| 2015 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(29) |
May
(43) |
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: GetAway <tux...@ne...> - 2014-11-07 15:46:49
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 8f9abfa8c0b426b42231f8ede21d3a434ec12e65 (commit)
via 8d7215d40fa907d95568e6852d54b21af02ea8a0 (commit)
via 155e42daa74ea4e5e1ca4ab789430c0056f904dc (commit)
via 35e42b607dd140eb2a990be519b093af6c99f776 (commit)
via 2ccff82fe9c1f58060487e74c0e29049d848368c (commit)
via 74a24e3364a44c5d17f21bf1560ba056a4e571e4 (commit)
via ec1bb8bcdd17a86ff34df8694dbd5221e36031a1 (commit)
via ae16f57cc525556d829511166b2ca058a6ddcc62 (commit)
via bd7b8acdcb425b48d278c893bf709ccc0cbd9359 (commit)
via bc5228d81bb23518a182db94c6df0287bc3fdfd9 (commit)
via 27260ea172d037de57fa691c5c670ddfe85cf897 (commit)
via ad2ecda9e11da3ca2cb6f38e4229a214d58568bd (commit)
via adf6297278c2de1f7758e98151e2bfb9fcf8bb90 (commit)
via a726e172299ec8521db9f8d636dc7aa7420a9ed7 (commit)
via 02873f78090484613c7e632844dbbca8cc1ea7a8 (commit)
from 8cade3ffa8084dba2171ab4cabb90065fb692659 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8f9abfa8c0b426b42231f8ede21d3a434ec12e65
Author: Christian Schuett <Gau...@ho...>
Date: Sun Nov 2 20:53:20 2014 +0100
nhttpd controlapi: allow zapping to subchannels
based on idea by Moritz Venn <mor...@fr...>
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 62cdf55..3a7748e 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -800,6 +800,20 @@ Beispiel:<br>
>>>http://dbox/control/zapto?name=Das%20Erste<br>
ok <br>
</div>
+<br>
+<b>Parameter:</b> subchannel=<channel_id> (64 bit, hexidecimal value)<br>
+<b>Rueckgabe:</b><br>
+<br>
+Zappt auf den angegebenen Unterkanal.<br>
+Als Rueckgabe ist im Erfolgsfall ok zu erwarten.<br>
+<br>
+<b>Rueckgabe-Format:</b> ok / error<br>
+<div class="example">
+Beispiel:<br>
+<br>
+>>>http://dbox/control/zapto?subchannel=1008500d4<br>
+ok <br>
+</div>
<!-- *********************************************************** -->
<div class="title1"><a name="setmode"></a>7. Radio/TV, Record Mode</div>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index f2a7188..d6f825b 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -1428,7 +1428,8 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
CSectionsdClient::LinkageDescriptorList desc;
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
- if (has_current_next && NeutrinoAPI->Sectionsd->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey, desc))
+ if (has_current_next && currentNextInfo.flags & CSectionsdClient::epgflags::current_has_linkagedescriptors &&
+ NeutrinoAPI->Sectionsd->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey, desc))
{
for(unsigned int i=0;i< desc.size();i++)
{
@@ -1454,6 +1455,19 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
else
hh->SendError();
}
+ else if (!hh->ParamList["subchannel"].empty())
+ {
+ t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID();
+ CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
+ bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
+ if (has_current_next && currentNextInfo.flags & CSectionsdClient::epgflags::current_has_linkagedescriptors)
+ {
+ NeutrinoAPI->ZapToSubService(hh->ParamList["subchannel"].c_str());
+ hh->SendOk();
+ }
+ else
+ hh->SendError();
+ }
else
{
NeutrinoAPI->ZapTo(hh->ParamList["1"].c_str());
commit 8d7215d40fa907d95568e6852d54b21af02ea8a0
Author: Christian Schuett <Gau...@ho...>
Date: Sun Nov 2 17:27:15 2014 +0100
nhttpd helper: pass std::string by reference if possible
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp
index 471eb23..8e17c03 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp
@@ -92,7 +92,7 @@ std::string string_printf(const char *fmt, ...)
// ySplitString: spit string "str" in two strings "left" and "right" at
// one of the chars in "delimiter" returns true if delimiter found
//-------------------------------------------------------------------------
-bool ySplitString(std::string str, std::string delimiter, std::string& left, std::string& right)
+bool ySplitString(const std::string &str, const std::string &delimiter, std::string &left, std::string &right)
{
std::string::size_type pos;
if ((pos = str.find_first_of(delimiter)) != std::string::npos)
@@ -111,7 +111,7 @@ bool ySplitString(std::string str, std::string delimiter, std::string& left, std
// ySplitString: spit string "str" in two strings "left" and "right" at
// one of the chars in "delimiter" returns true if delimiter found
//-------------------------------------------------------------------------
-bool ySplitStringExact(std::string str, std::string delimiter, std::string& left, std::string& right)
+bool ySplitStringExact(const std::string &str, const std::string &delimiter, std::string &left, std::string &right)
{
std::string::size_type pos;
if ((pos = str.find(delimiter)) != std::string::npos)
@@ -130,7 +130,7 @@ bool ySplitStringExact(std::string str, std::string delimiter, std::string& left
// ySplitStringRight: spit string "str" in two strings "left" and "right" at
// one of the chars in "delimiter" returns true if delimiter found
//-------------------------------------------------------------------------
-bool ySplitStringLast(std::string str, std::string delimiter, std::string& left, std::string& right)
+bool ySplitStringLast(const std::string &str, const std::string &delimiter, std::string &left, std::string &right)
{
std::string::size_type pos;
if ((pos = str.find_last_of(delimiter)) != std::string::npos)
@@ -148,7 +148,7 @@ bool ySplitStringLast(std::string str, std::string delimiter, std::string& left,
//-------------------------------------------------------------------------
// ySplitStringVector: spit string "str" and build vector of strings
//-------------------------------------------------------------------------
-CStringArray ySplitStringVector(std::string str, std::string delimiter)
+CStringArray ySplitStringVector(const std::string &str, const std::string &delimiter)
{
std::string left, right, rest;
bool found;
@@ -203,7 +203,7 @@ bool nocase_compare (char c1, char c2)
//-----------------------------------------------------------------------------
// Decode URLEncoded std::string
//-----------------------------------------------------------------------------
-std::string decodeString(std::string encodedString)
+std::string decodeString(const std::string &encodedString)
{
const char *string = encodedString.c_str();
unsigned int count=0;
@@ -239,7 +239,7 @@ std::string decodeString(std::string encodedString)
//-----------------------------------------------------------------------------
// HTMLEncode std::string
//-----------------------------------------------------------------------------
-std::string encodeString(std::string decodedString)
+std::string encodeString(const std::string &decodedString)
{
unsigned int len = sizeof(char) * decodedString.length()*5 + 1;
std::string result( len, '\0' );
@@ -279,7 +279,7 @@ std::string string_tolower(std::string str)
//-----------------------------------------------------------------------------
// write string to a file
//-----------------------------------------------------------------------------
-bool write_to_file(std::string filename, std::string content)
+bool write_to_file(const std::string &filename, const std::string &content)
{
FILE *fd = NULL;
if((fd = fopen(filename.c_str(),"w")) != NULL) // open file
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.h b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.h
index 2d570ac..2b22c66 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.h
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.h
@@ -21,8 +21,8 @@ void correctTime(struct tm *zt);
//-----------------------------------------------------------------------------
std::string itoa(unsigned int conv);
std::string itoh(unsigned int conv);
-std::string decodeString(std::string encodedString);
-std::string encodeString(std::string decodedString);
+std::string decodeString(const std::string &encodedString);
+std::string encodeString(const std::string &decodedString);
std::string string_tolower(std::string str);
//-----------------------------------------------------------------------------
@@ -31,12 +31,12 @@ std::string string_tolower(std::string str);
std::string trim(std::string const& source, char const* delims = " \t\r\n");
void replace(std::string &str, const std::string &find_what, const std::string &replace_with);
std::string string_printf(const char *fmt, ...);
-bool ySplitString(std::string str, std::string delimiter, std::string& left, std::string& right);
-bool ySplitStringExact(std::string str, std::string delimiter, std::string& left, std::string& right);
-bool ySplitStringLast(std::string str, std::string delimiter, std::string& left, std::string& right);
-CStringArray ySplitStringVector(std::string str, std::string delimiter);
+bool ySplitString(const std::string &str, const std::string &delimiter, std::string &left, std::string &right);
+bool ySplitStringExact(const std::string &str, const std::string &delimiter, std::string &left, std::string &right);
+bool ySplitStringLast(const std::string &str, const std::string &delimiter, std::string &left, std::string &right);
+CStringArray ySplitStringVector(const std::string &str, const std::string &delimiter);
bool nocase_compare (char c1, char c2);
std::string timeString(time_t time);
-bool write_to_file(std::string filename, std::string content);
+bool write_to_file(const std::string &filename, const std::string &content);
#endif /* __yhttpd_helper_h__ */
commit 155e42daa74ea4e5e1ca4ab789430c0056f904dc
Author: GetAway <get...@t-...>
Date: Sat Nov 1 19:13:18 2014 +0100
tuxmaild: fix mail header parsing version bump 1.51C
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
index 5069113..06af926 100644
--- a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
+++ b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
@@ -829,7 +829,7 @@ int DecodeHeader(char *encodedstring)
{
char *ptrS, *ptrE;
- if((ptrS = strstr(encodedstring, "?B?")))
+ if((ptrS = strstr(encodedstring, "?B?")) || (ptrS = strstr(encodedstring, "?b?")))
{
ptrS += 3;
@@ -840,7 +840,7 @@ int DecodeHeader(char *encodedstring)
return ptrE+2 - encodedstring;
}
}
- else if((ptrS = strstr(encodedstring, "?Q?")))
+ else if((ptrS = strstr(encodedstring, "?Q?")) || (ptrS = strstr(encodedstring, "?q?")))
{
ptrS += 3;
@@ -4800,7 +4800,7 @@ void SigHandler(int signal)
int main(int argc, char **argv)
{
- char cvs_revision[] = "$Revision: 1.51B $";
+ char cvs_revision[] = "$Revision: 1.51C $";
int param, nodelay = 0, account, mailstatus, unread_mailstatus;
pthread_t thread_id;
void *thread_result = 0;
commit 35e42b607dd140eb2a990be519b093af6c99f776
Author: Christian Schuett <Gau...@ho...>
Date: Fri Oct 31 18:12:37 2014 +0100
Neutrino: check emptiness of strings with empty()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index cdaeadd..f2a7188 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -51,7 +51,7 @@ CControlAPI::CControlAPI(CNeutrinoAPI *_NeutrinoAPI)
//-----------------------------------------------------------------------------
void CControlAPI::init(CyhookHandler *hh)
{
- if(PLUGIN_DIRS[0] == "")
+ if(PLUGIN_DIRS[0].empty())
{ // given in nhttpd.conf
PLUGIN_DIRS[0]=hh->WebserverConfigList["PublicDocumentRoot"];
PLUGIN_DIRS[0].append("/scripts");
@@ -226,7 +226,7 @@ void CControlAPI::Execute(CyhookHandler *hh)
else if(std::string(yCgiCallList[index].mime_type) == "") // decide in function
;
else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml?
- if (hh->ParamList["xml"] != "")
+ if (!hh->ParamList["xml"].empty())
hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1");
else
hh->SetHeader(HTTP_OK, "text/html; charset=iso-8859-1");
@@ -264,7 +264,7 @@ void CControlAPI::TimerCGI(CyhookHandler *hh)
NeutrinoAPI->Timerd->removeTimerEvent(removeId);
hh->SendOk();
}
- else if(hh->ParamList["get"] != "")
+ else if(!hh->ParamList["get"].empty())
{
int pre=0,post=0;
NeutrinoAPI->Timerd->getRecordingSafety(pre,post);
@@ -807,11 +807,11 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
}
unsigned int repeat = 1;
unsigned int delay = 250;
- if (hh->ParamList["delay"] != "")
+ if (!hh->ParamList["delay"].empty())
delay = atoi(hh->ParamList["delay"].c_str());
- if (hh->ParamList["duration"] != "")
+ if (!hh->ParamList["duration"].empty())
repeat = atoi(hh->ParamList["duration"].c_str())*1000/delay;
- if (hh->ParamList["repeat"] != "")
+ if (!hh->ParamList["repeat"].empty())
repeat = atoi(hh->ParamList["repeat"].c_str());
int evd = open(EVENTDEV, O_RDWR);
@@ -973,7 +973,7 @@ void CControlAPI::VolumeCGI(CyhookHandler *hh)
{
hh->Write((char *) (NeutrinoAPI->Controld->getMute() ? "1" : "0")); // mute
}
- else if(hh->ParamList["1"]!="")
+ else if(!hh->ParamList["1"].empty())
{ //set volume
char vol = atol( hh->ParamList["1"].c_str() );
NeutrinoAPI->Controld->setVolume(vol);
@@ -1198,7 +1198,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh)
}
}
}
- else if (hh->ParamList["eventid"] != "")
+ else if (!hh->ParamList["eventid"].empty())
{
//special epg query
unsigned long long epgid;
@@ -1211,9 +1211,9 @@ void CControlAPI::EpgCGI(CyhookHandler *hh)
hh->WriteLn(epg.info2);
}
}
- else if (hh->ParamList["eventid2fsk"] != "")
+ else if (!hh->ParamList["eventid2fsk"].empty())
{
- if (hh->ParamList["starttime"] != "")
+ if (!hh->ParamList["starttime"].empty())
{
unsigned long long epgid;
time_t starttime;
@@ -1442,7 +1442,7 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
}
}
}
- else if (hh->ParamList["name"] != "")
+ else if (!hh->ParamList["name"].empty())
{
t_channel_id channel_id;
channel_id = NeutrinoAPI->ChannelNameToChannelId(hh->ParamList["name"]);
@@ -1472,7 +1472,7 @@ void CControlAPI::StartPluginCGI(CyhookHandler *hh)
std::string pluginname;
if (!(hh->ParamList.empty()))
{
- if (hh->ParamList["name"] != "")
+ if (!hh->ParamList["name"].empty())
{
pluginname = hh->ParamList["name"];
//pluginname=decodeString(pluginname);
@@ -1517,21 +1517,21 @@ void CControlAPI::LCDAction(CyhookHandler *hh)
return;
}
- if (hh->ParamList["lock"] != "")
+ if (!hh->ParamList["lock"].empty())
if(sscanf( hh->ParamList["lock"].c_str(), "%d", &tval))
NeutrinoAPI->LcdAPI->LockDisplay(tval);
else
error=1;
- if (hh->ParamList["clear"] != "")
+ if (!hh->ParamList["clear"].empty())
if(sscanf( hh->ParamList["clear"].c_str(), "%d", &tval))
if(tval)
NeutrinoAPI->LcdAPI->Clear();
else
error=1;
- if (hh->ParamList["png"] != "")
+ if (!hh->ParamList["png"].empty())
if(! NeutrinoAPI->LcdAPI->ShowPng((char*)hh->ParamList["png"].c_str()))
error=1;
- if (hh->ParamList["raw"] != "")
+ if (!hh->ParamList["raw"].empty())
{
char *sptr=strdup((char*)hh->ParamList["raw"].c_str()),*pptr;
int loop=4;
@@ -1550,44 +1550,44 @@ void CControlAPI::LCDAction(CyhookHandler *hh)
if(sptr)
free(sptr);
}
- if (hh->ParamList["line"] != "")
+ if (!hh->ParamList["line"].empty())
if(sscanf( hh->ParamList["line"].c_str(), "%d,%d,%d,%d,%d",&x1,&y1,&x2,&y2,&coll)==5)
NeutrinoAPI->LcdAPI->DrawLine(x1,y1,x2,y2,coll);
else
error=1;
- if (hh->ParamList["rect"] != "")
+ if (!hh->ParamList["rect"].empty())
if(sscanf( hh->ParamList["rect"].c_str(), "%d,%d,%d,%d,%d,%d",&x1,&y1,&x2,&y2,&coll,&colf)==6)
NeutrinoAPI->LcdAPI->DrawRect(x1,y1,x2,y2,coll,colf);
else
error=1;
- if (hh->ParamList["xpos"] != "")
+ if (!hh->ParamList["xpos"].empty())
if(sscanf( hh->ParamList["xpos"].c_str(), "%d", &tval))
xpos=tval;
else
error=1;
- if (hh->ParamList["ypos"] != "")
+ if (!hh->ParamList["ypos"].empty())
if(sscanf( hh->ParamList["ypos"].c_str(), "%d", &tval))
ypos=tval;
else
error=1;
- if (hh->ParamList["size"] != "")
+ if (!hh->ParamList["size"].empty())
if(sscanf( hh->ParamList["size"].c_str(), "%d", &tval))
size=tval;
else
error=1;
- if (hh->ParamList["color"] != "")
+ if (!hh->ParamList["color"].empty())
if(sscanf( hh->ParamList["color"].c_str(), "%d", &tval))
color=tval;
else
error=1;
- if (hh->ParamList["font"] != "")
+ if (!hh->ParamList["font"].empty())
if(sscanf( hh->ParamList["font"].c_str(), "%d", &tval) && tval>=0 && tval<3)
font=tval;
else
error=1;
- if (hh->ParamList["text"] != "")
+ if (!hh->ParamList["text"].empty())
NeutrinoAPI->LcdAPI->DrawText(xpos, ypos, size, color, font, (char*)hh->ParamList["text"].c_str());
- if (hh->ParamList["update"] != "")
+ if (!hh->ParamList["update"].empty())
if(sscanf( hh->ParamList["update"].c_str(), "%d", &tval))
if(tval)
NeutrinoAPI->LcdAPI->Update();
@@ -2194,7 +2194,7 @@ void CControlAPI::YWebCGI(CyhookHandler *hh)
{
bool status=true;
int para;
- if (hh->ParamList["video_stream_pids"] != "")
+ if (!hh->ParamList["video_stream_pids"].empty())
{
para=0;
sscanf( hh->ParamList["video_stream_pids"].c_str(), "%d", ¶);
@@ -2221,7 +2221,7 @@ void CControlAPI::YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no)
apid_idx=apid_no;
if(!pids.APIDs.empty())
apid = pids.APIDs[apid_idx].pid;
- if(hh->ParamList["no_commas"] != "")
+ if(!hh->ParamList["no_commas"].empty())
{
hh->printf("0x%04x 0x%04x 0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid);
if (pids.PIDs.pcrpid != 0 && pids.PIDs.pcrpid != pids.PIDs.vpid)
@@ -2316,17 +2316,17 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
int alHour=0;
// if alarm given then in parameters im time_t format
- if(hh->ParamList["alarm"] != "")
+ if(!hh->ParamList["alarm"].empty())
{
alarmTimeT = atoi(hh->ParamList["alarm"].c_str());
- if(hh->ParamList["stop"] != "")
+ if(!hh->ParamList["stop"].empty())
stopTimeT = atoi(hh->ParamList["stop"].c_str());
- if(hh->ParamList["announce"] != "")
+ if(!hh->ParamList["announce"].empty())
announceTimeT = atoi(hh->ParamList["announce"].c_str());
else
announceTimeT = alarmTimeT;
}
- else if(hh->ParamList["alDate"] != "") //given formatted
+ else if(!hh->ParamList["alDate"].empty()) //given formatted
{
// Alarm Date - Format exact! DD.MM.YYYY
tnull = time(NULL);
@@ -2339,7 +2339,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
}
// Alarm Time - Format exact! HH:MM
- if(hh->ParamList["alTime"] != "")
+ if(!hh->ParamList["alTime"].empty())
sscanf(hh->ParamList["alTime"].c_str(),"%2d.%2d",&(alarmTime->tm_hour), &(alarmTime->tm_min));
alHour = alarmTime->tm_hour;
correctTime(alarmTime);
@@ -2348,11 +2348,11 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
struct tm *stopTime = localtime(&alarmTimeT);
stopTime->tm_sec = 0;
// Stop Time - Format exact! HH:MM
- if(hh->ParamList["stTime"] != "")
+ if(!hh->ParamList["stTime"].empty())
sscanf(hh->ParamList["stTime"].c_str(),"%2d.%2d",&(stopTime->tm_hour), &(stopTime->tm_min));
// Stop Date - Format exact! DD.MM.YYYY
- if(hh->ParamList["stDate"] != "")
+ if(!hh->ParamList["stDate"].empty())
if(sscanf(hh->ParamList["stDate"].c_str(),"%2d.%2d.%4d",&(stopTime->tm_mday), &(stopTime->tm_mon), &(stopTime->tm_year)) == 3)
{
stopTime->tm_mon -= 1;
@@ -2360,7 +2360,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
}
correctTime(stopTime);
stopTimeT = mktime(stopTime);
- if(hh->ParamList["stDate"] == "" && alHour > stopTime->tm_hour)
+ if(hh->ParamList["stDate"].empty() && alHour > stopTime->tm_hour)
stopTimeT += 24* 60 * 60; // add 1 Day
}
else // alarm/stop time given in pieces
@@ -2368,15 +2368,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
// alarm time
time_t now = time(NULL);
struct tm *alarmTime=localtime(&now);
- if(hh->ParamList["ad"] != "")
+ if(!hh->ParamList["ad"].empty())
alarmTime->tm_mday = atoi(hh->ParamList["ad"].c_str());
- if(hh->ParamList["amo"] != "")
+ if(!hh->ParamList["amo"].empty())
alarmTime->tm_mon = atoi(hh->ParamList["amo"].c_str())-1;
- if(hh->ParamList["ay"] != "")
+ if(!hh->ParamList["ay"].empty())
alarmTime->tm_year = atoi(hh->ParamList["ay"].c_str())-1900;
- if(hh->ParamList["ah"] != "")
+ if(!hh->ParamList["ah"].empty())
alarmTime->tm_hour = atoi(hh->ParamList["ah"].c_str());
- if(hh->ParamList["ami"] != "")
+ if(!hh->ParamList["ami"].empty())
alarmTime->tm_min = atoi(hh->ParamList["ami"].c_str());
alarmTime->tm_sec = 0;
correctTime(alarmTime);
@@ -2385,15 +2385,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
// stop time
struct tm *stopTime = alarmTime;
- if(hh->ParamList["sd"] != "")
+ if(!hh->ParamList["sd"].empty())
stopTime->tm_mday = atoi(hh->ParamList["sd"].c_str());
- if(hh->ParamList["smo"] != "")
+ if(!hh->ParamList["smo"].empty())
stopTime->tm_mon = atoi(hh->ParamList["smo"].c_str())-1;
- if(hh->ParamList["sy"] != "")
+ if(!hh->ParamList["sy"].empty())
stopTime->tm_year = atoi(hh->ParamList["sy"].c_str())-1900;
- if(hh->ParamList["sh"] != "")
+ if(!hh->ParamList["sh"].empty())
stopTime->tm_hour = atoi(hh->ParamList["sh"].c_str());
- if(hh->ParamList["smi"] != "")
+ if(!hh->ParamList["smi"].empty())
stopTime->tm_min = atoi(hh->ParamList["smi"].c_str());
stopTime->tm_sec = 0;
correctTime(stopTime);
@@ -2404,22 +2404,22 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
announceTimeT -= 60;
CTimerd::CTimerEventTypes type;
- if(hh->ParamList["type"] != "")
+ if(!hh->ParamList["type"].empty())
type = (CTimerd::CTimerEventTypes) atoi(hh->ParamList["type"].c_str());
else // default is: record
type = CTimerd::TIMER_RECORD;
// repeat
- if(hh->ParamList["repcount"] != "")
+ if(!hh->ParamList["repcount"].empty())
{
repCount = atoi(hh->ParamList["repcount"].c_str());
}
CTimerd::CTimerEventRepeat rep;
- if(hh->ParamList["rep"] != "")
+ if(!hh->ParamList["rep"].empty())
rep = (CTimerd::CTimerEventRepeat) atoi(hh->ParamList["rep"].c_str());
else // default: no repeat
rep = (CTimerd::CTimerEventRepeat)0;
- if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) && hh->ParamList["wd"] != "")
+ if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) && !hh->ParamList["wd"].empty())
NeutrinoAPI->Timerd->getWeekdaysFromStr((int*)&rep, hh->ParamList["wd"].c_str());
// apids
@@ -2457,7 +2457,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
eventinfo.recordingSafety = (hh->ParamList["rs"] == "1");
// channel by Id or name
- if(hh->ParamList["channel_id"] != "")
+ if(!hh->ParamList["channel_id"].empty())
sscanf(hh->ParamList["channel_id"].c_str(),
SCANF_CHANNEL_ID_TYPE,
&eventinfo.channel_id);
@@ -2477,7 +2477,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
data= &eventinfo;
else if (type==CTimerd::TIMER_RECORD)
{
- if(_rec_dir == "")
+ if(_rec_dir.empty())
{
// get Default Recordingdir
CConfigFile *Config = new CConfigFile(',');
@@ -2508,7 +2508,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
// update or add timer
if(hh->ParamList["update"]=="1")
{
- if(hh->ParamList["id"] != "")
+ if(!hh->ParamList["id"].empty())
{
unsigned modyId = atoi(hh->ParamList["id"].c_str());
if(type == CTimerd::TIMER_RECORD)
@@ -2551,7 +2551,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
//-------------------------------------------------------------------------
void CControlAPI::setBouquetCGI(CyhookHandler *hh)
{
- if (hh->ParamList["selected"] != "") {
+ if (!hh->ParamList["selected"].empty()) {
int selected = atoi(hh->ParamList["selected"].c_str());
if(hh->ParamList["action"].compare("hide") == 0)
NeutrinoAPI->Zapit->setBouquetHidden(selected - 1,true);
@@ -2576,7 +2576,7 @@ void CControlAPI::saveBouquetCGI(CyhookHandler *hh)
//-------------------------------------------------------------------------
void CControlAPI::moveBouquetCGI(CyhookHandler *hh)
{
- if (hh->ParamList["selected"] != "" && (
+ if (!hh->ParamList["selected"].empty() && (
hh->ParamList["action"] == "up" ||
hh->ParamList["action"] == "down"))
{
@@ -2598,7 +2598,7 @@ void CControlAPI::deleteBouquetCGI(CyhookHandler *hh)
{
int selected = -1;
- if (hh->ParamList["selected"] != "") {
+ if (!hh->ParamList["selected"].empty()) {
selected = atoi(hh->ParamList["selected"].c_str());
NeutrinoAPI->Zapit->deleteBouquet(selected - 1);
hh->SendOk();
@@ -2624,9 +2624,9 @@ void CControlAPI::addBouquetCGI(CyhookHandler *hh)
//-------------------------------------------------------------------------
void CControlAPI::renameBouquetCGI(CyhookHandler *hh)
{
- if (hh->ParamList["selected"] != "")
+ if (!hh->ParamList["selected"].empty())
{
- if (hh->ParamList["nameto"] != "")
+ if (!hh->ParamList["nameto"].empty())
{
if (NeutrinoAPI->Zapit->existsBouquet((hh->ParamList["nameto"]).c_str()) == -1)
{
@@ -2667,7 +2667,7 @@ void CControlAPI::changeBouquetCGI(CyhookHandler *hh)
NeutrinoAPI->Zapit->renumChannellist();
NeutrinoAPI->UpdateBouquets();
- if(hh->ParamList["redirect"] != "")
+ if(!hh->ParamList["redirect"].empty())
hh->SendRewrite(hh->ParamList["redirect"]);
else
hh->SendOk();
@@ -2695,7 +2695,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh)
int apid=0,apid_no=0,apid_idx=0;
pids.PIDs.vpid=0;
- if(hh->ParamList["audio_no"] !="")
+ if(!hh->ParamList["audio_no"].empty())
apid_no = atoi(hh->ParamList["audio_no"].c_str());
NeutrinoAPI->Zapit->getPIDS(pids);
@@ -2722,14 +2722,14 @@ void CControlAPI::build_live_url(CyhookHandler *hh)
hh->SendError();
// build url
std::string url = "";
- if(hh->ParamList["host"] !="")
+ if(!hh->ParamList["host"].empty())
url = "http://"+hh->ParamList["host"];
else
url = "http://"+hh->HeaderList["Host"];
url += (mode == CZapitClient::MODE_TV) ? ":31339/0," : ":31338/";
url += xpids;
// response url
- if(hh->ParamList["vlc_link"] !="")
+ if(!hh->ParamList["vlc_link"].empty())
{
write_to_file("/tmp/vlc.m3u", url);
hh->SendRedirect("/tmp/vlc.m3u");
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index 38542af..ef59fbe 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -157,7 +157,7 @@ std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler */*hh*/, std::s
yip = Config->getString("network_nfs_ip_"+ynr,"");
ydir = Config->getString("network_nfs_dir_"+ynr,"");
ylocal_dir = Config->getString("network_nfs_local_dir_"+ynr,"");
- if(ydir != "")
+ if(!ydir.empty())
ydir="("+ydir+")";
yresult += string_printf("<input type='radio' name='R1' value='%d' %s />%d %s - %s %s %s<br/>",
@@ -201,7 +201,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler */*hh
unsigned int nr=1;
ySplitString(para," ",nr_str, do_show_hidden);
- if(nr_str != "")
+ if(!nr_str.empty())
nr = atoi(nr_str.c_str());
for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size();i++)
@@ -268,7 +268,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler */*hh
int mode = CZapitClient::MODE_CURRENT;
ySplitString(para," ",abouquet, achannel_id);
- if(abouquet != "")
+ if(!abouquet.empty())
bnumber = atoi(abouquet.c_str());
if(bnumber != 0) //Bouquet View
@@ -300,7 +300,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
CZapitClient::BouquetChannelList *channellist;
ySplitString(para," ",abnumber, tmp);
- if(abnumber != "")
+ if(!abnumber.empty())
BouquetNr = atoi(abnumber.c_str());
if (BouquetNr > 0)
channellist = NeutrinoAPI->GetBouquet(BouquetNr, CZapitClient::MODE_CURRENT);
@@ -317,7 +317,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
std::string timestr;
bool have_logos = false;
- if(hh->WebserverConfigList["TUXBOX_LOGOS_URL"] != "")
+ if(!hh->WebserverConfigList["TUXBOX_LOGOS_URL"].empty())
have_logos = true;
CZapitClient::BouquetChannelList::iterator channel = channellist->begin();
for (; channel != channellist->end(); ++channel)
@@ -482,7 +482,7 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler */*hh*/, std::s
int apid=0,apid_no=0,apid_idx=0;
pids.PIDs.vpid=0;
- if(para != "")
+ if(!para.empty())
apid_no = atoi(para.c_str());
NeutrinoAPI->Zapit->getPIDS(pids);
@@ -641,7 +641,7 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler */*hh*/, st
in >> ymtd >> dummy >> dummy; //format: mtd# start end "name "
in.getline(ytmp, 200); // Rest of line is the mtd description
yname = ytmp;
- if((j>0) && (ymtd != ""))// iggnore first line
+ if((j>0) && !ymtd.empty())// iggnore first line
{
ysel = ((j==1) ? "checked=\"checked\"" : "");
yresult += string_printf("<input type='radio' name='R1' value='%d' %s title='%s' />%d %s<br/>",
@@ -860,7 +860,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin
if(cmd != "new")
{
// init timerid
- if(stimerid != "")
+ if(!stimerid.empty())
timerId = (unsigned)atoi(stimerid.c_str());
NeutrinoAPI->Timerd->getTimer(timer, timerId);
@@ -1004,7 +1004,7 @@ std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std::
if (hh->ParamList["saved"] == "1")
hh->ParamList["have_saved"]="true";
- if (hh->ParamList["selected"] != "")
+ if (!hh->ParamList["selected"].empty())
selected = atoi(hh->ParamList["selected"].c_str());
// List of all bouquets
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd.cpp
index a8197c7..285c3b0 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd.cpp
@@ -221,7 +221,7 @@ bool Cyhttpd::Configure()
std::string groupname= ConfigList["server.group_name"];
// get user data
- if(username != "")
+ if(!username.empty())
{
if((pwd = getpwnam(username.c_str())) == NULL)
{
@@ -230,7 +230,7 @@ bool Cyhttpd::Configure()
}
}
// get group data
- if(groupname != "")
+ if(!groupname.empty())
{
if((grp = getgrnam(groupname.c_str())) == NULL)
{
@@ -259,7 +259,7 @@ bool Cyhttpd::Configure()
}
#endif
#ifdef Y_CONFIG_FEATURE_HTTPD_USER
- if(username != "" && pwd != NULL && grp != NULL)
+ if(!username.empty() && pwd != NULL && grp != NULL)
{
log_level_printf(2, "set user and groups\n");
@@ -267,7 +267,7 @@ bool Cyhttpd::Configure()
setgid(grp->gr_gid);
setgroups(0, NULL);
// set user group
- if(groupname != "")
+ if(!groupname.empty())
initgroups(username.c_str(), grp->gr_gid);
// set user
if(setuid(pwd->pw_uid) == -1)
@@ -433,11 +433,11 @@ void Cyhttpd::ReadConfig(void)
Config->setBool("webserver.threading", OrgConfig.getBool("THREADS", true));
Config->setInt32("WebsiteMain.port",OrgConfig.getInt32("Port", HTTPD_STANDARD_PORT));
Config->setString("WebsiteMain.directory", OrgConfig.getString("PrivatDocRoot", PRIVATEDOCUMENTROOT));
- if(OrgConfig.getString("PublicDocRoot", "") != "")
+ if(!OrgConfig.getString("PublicDocRoot", "").empty())
Config->setString("WebsiteMain.override_directory", OrgConfig.getString("PublicDocRoot", PRIVATEDOCUMENTROOT));
- if(OrgConfig.getString("HostedDocRoot", "") != "")
+ if(!OrgConfig.getString("HostedDocRoot", "").empty())
Config->setString("WebsiteMain.special_locations", "/hosted/="+OrgConfig.getString("HostedDocRoot", PRIVATEDOCUMENTROOT));
- if(OrgConfig.getString("HostedDocRoot", "") != "")
+ if(!OrgConfig.getString("HostedDocRoot", "").empty())
Config->setString("Tuxbox.HostedDocumentRoot", OrgConfig.getString("HostedDocRoot", PRIVATEDOCUMENTROOT));
// mod_auth
Config->setString("mod_auth.username", OrgConfig.getString("AuthUser", AUTHUSER));
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
index 35de525..d861516 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
@@ -61,7 +61,7 @@ bool CWebserverRequest::HandleRequest(void)
start_line = Connection->sock->ReceiveLine();
if(!Connection->sock->isValid)
return false;
- if(start_line == "") // Socket empty
+ if(start_line.empty()) // Socket empty
{
log_level_printf(1,"HandleRequest: End of line not found\n");
Connection->Response.SendError(HTTP_INTERNAL_SERVER_ERROR);
@@ -89,7 +89,7 @@ bool CWebserverRequest::HandleRequest(void)
return false;
}
- if(tmp_line == "")
+ if(tmp_line.empty())
{
Connection->Response.SendError(HTTP_INTERNAL_SERVER_ERROR);
return false;
@@ -272,7 +272,7 @@ bool CWebserverRequest::HandlePost()
do
{
tmp_line = Connection->sock->ReceiveLine();
- if(tmp_line == "") // Socket empty
+ if(tmp_line.empty()) // Socket empty
{
log_level_printf(1,"HandleRequest: (Header) End of line not found: %s\n", strerror(errno));
Connection->Response.SendError(HTTP_INTERNAL_SERVER_ERROR);
@@ -285,7 +285,7 @@ bool CWebserverRequest::HandlePost()
// read meesage body
unsigned int content_len = 0;
- if(HeaderList["Content-Length"] != "")
+ if(!HeaderList["Content-Length"].empty())
content_len = atoi( HeaderList["Content-Length"].c_str() );
// Get Rest of Request from Socket
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp
index ba69d9c..93e1ba6 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp
@@ -115,12 +115,12 @@ bool CySocket::initSSL(void)
aprintf("ySocket:SSL Error: Create SSL_CTX_new : %s\n", ERR_error_string(ERR_get_error(), NULL) );
return false;
}
- if(SSL_pemfile == "")
+ if(SSL_pemfile.empty())
{
aprintf("ySocket:SSL Error: no pemfile given\n");
return false;
}
- if(SSL_CA_file != "") // have a CA?
+ if(!SSL_CA_file.empty()) // have a CA?
if(1 != SSL_CTX_load_verify_locations(SSL_ctx, SSL_CA_file.c_str(), NULL))
{
aprintf("ySocket:SSL Error: %s CA-File:%s\n",ERR_error_string(ERR_get_error(), NULL), SSL_CA_file.c_str());
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_auth.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_auth.cpp
index 41682da..9a900bb 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_auth.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_auth.cpp
@@ -18,7 +18,7 @@ THandleStatus CmAuth::Hook_PrepareResponse(CyhookHandler *hh)
if(authenticate)
{
if( (hh->UrlData["clientaddr"]).find(IADDR_LOCAL)>0 &&
- (no_auth_client == "" ||
+ (no_auth_client.empty() ||
(hh->UrlData["clientaddr"]).find(no_auth_client)>0)) // dont check local calls or calls from NoAuthClient
{
if (!CheckAuth(hh))
@@ -53,7 +53,7 @@ THandleStatus CmAuth::Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigLi
//-----------------------------------------------------------------------------
bool CmAuth::CheckAuth(CyhookHandler *hh)
{
- if (hh->HeaderList["Authorization"] == "")
+ if (hh->HeaderList["Authorization"].empty())
return false;
std::string encodet = hh->HeaderList["Authorization"].substr(6,hh->HeaderList["Authorization"].length() - 6);
std::string decodet = decodeBase64(encodet.c_str());
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_cache.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_cache.cpp
index 9bbefca..e54f4aa 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_cache.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_cache.cpp
@@ -40,7 +40,7 @@ THandleStatus CmodCache::Hook_PrepareResponse(CyhookHandler *hh)
// Check if modified
time_t if_modified_since = (time_t)-1;
- if(hh->HeaderList["If-Modified-Since"] != "") // Have If-Modified-Since Requested by Browser?
+ if(!hh->HeaderList["If-Modified-Since"].empty()) // Have If-Modified-Since Requested by Browser?
{
struct tm mod;
if(strptime(hh->HeaderList["If-Modified-Since"].c_str(), RFC1123FMT, &mod) != NULL)
@@ -235,12 +235,12 @@ void CmodCache::yshowCacheInfo(CyhookHandler *hh)
void CmodCache::yCacheClear(CyhookHandler *hh)
{
std::string result="";
- if(hh->ParamList["category"] != "")
+ if(!hh->ParamList["category"].empty())
{
RemoveCategoryFromCache(hh->ParamList["category"]);
result = string_printf("Category (%s) removed from cache.</br>", hh->ParamList["category"].c_str());
}
- else if(hh->ParamList["url"] != "")
+ else if(!hh->ParamList["url"].empty())
{
RemoveURLFromCache(hh->ParamList["url"]);
result = string_printf("URL (%s) removed from cache.</br>", hh->ParamList["url"].c_str());
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
index c3b53b1..87468f7 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
@@ -72,7 +72,7 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh)
int filed;
log_level_printf(4,"mod_sendfile prepare hook start url:%s\n",hh->UrlData["fullurl"].c_str());
std::string mime = sendfileTypes[hh->UrlData["fileext"]];
- if(mime != "" || (hh->WebserverConfigList["mod_sendfile.sendAll"] == "true") && hh->UrlData["fileext"] != "yhtm")
+ if(!mime.empty() || (hh->WebserverConfigList["mod_sendfile.sendAll"] == "true") && hh->UrlData["fileext"] != "yhtm")
{
//TODO: Check allowed directories / actually in GetFileName
// build filename
@@ -94,7 +94,7 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh)
// check If-Modified-Since
time_t if_modified_since = (time_t)-1;
- if(hh->HeaderList["If-Modified-Since"] != "")
+ if(!hh->HeaderList["If-Modified-Since"].empty())
{
struct tm mod;
if(strptime(hh->HeaderList["If-Modified-Since"].c_str(), RFC1123FMT, &mod) != NULL)
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_weblog.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_weblog.cpp
index cf27273..63db846 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_weblog.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_weblog.cpp
@@ -67,7 +67,7 @@ THandleStatus CmWebLog::Hook_ReadConfig(CConfigFile *Config, CStringList &/*Conf
//-----------------------------------------------------------------------------
bool CmWebLog::OpenLogFile()
{
- if(WebLogFilename == "")
+ if(WebLogFilename.empty())
return false;
if(WebLogFile == NULL)
{
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
index 837e6ad..198eb71 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
@@ -52,7 +52,7 @@ CyParser::~CyParser(void)
//-----------------------------------------------------------------------------
void CyParser::init(CyhookHandler *hh)
{
- if(HTML_DIRS[0] == "")
+ if(HTML_DIRS[0].empty())
{
CyParser::HTML_DIRS[0]=hh->WebserverConfigList["PublicDocumentRoot"];
HTML_DIRS[1]=hh->WebserverConfigList["PrivatDocumentRoot"];
@@ -137,7 +137,7 @@ void CyParser::Execute(CyhookHandler *hh)
if(std::string(yCgiCallList[index].mime_type) == "") // set by self
;
else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml?
- if (hh->ParamList["xml"] != "")
+ if (!hh->ParamList["xml"].empty())
hh->SetHeader(HTTP_OK, "text/xml");
else
hh->SetHeader(HTTP_OK, "text/plain");
@@ -167,14 +167,14 @@ void CyParser::cgi(CyhookHandler *hh)
if (!hh->ParamList.empty())
{
- if (hh->ParamList["tmpl"] != "") // for GET and POST
+ if (!hh->ParamList["tmpl"].empty()) // for GET and POST
htmlfilename = hh->ParamList["tmpl"];
else
htmlfilename = hh->ParamList["1"];
- if (hh->ParamList["debug"] != "") // switch debug on
+ if (!hh->ParamList["debug"].empty()) // switch debug on
ydebug = true;
- if (hh->ParamList["execute"] != "") // execute done first!
+ if (!hh->ParamList["execute"].empty()) // execute done first!
{
ycmd = hh->ParamList["execute"];
ycmd = YPARSER_ESCAPE_START + ycmd + YPARSER_ESCAPE_END;
@@ -182,7 +182,7 @@ void CyParser::cgi(CyhookHandler *hh)
yresult = cgi_cmd_parsing(hh, ycmd, ydebug); // parsing engine
}
// parsing given file
- if(htmlfilename != "")
+ if (!htmlfilename.empty())
yresult = cgi_file_parsing(hh, htmlfilename, ydebug);
}
else
@@ -243,9 +243,9 @@ void CyParser::ParseAndSendFile(CyhookHandler *hh)
hh->SetHeader(HTTP_OK, "text/html");
if (hh->Method == M_HEAD)
return;
- if (hh->ParamList["debug"] != "") // switch debug on
+ if (!hh->ParamList["debug"].empty()) // switch debug on
ydebug = true;
- if (hh->ParamList["execute"] != "") // execute done first!
+ if (!hh->ParamList["execute"].empty()) // execute done first!
{
ycmd = hh->ParamList["execute"];
ycmd = YPARSER_ESCAPE_START + ycmd + YPARSER_ESCAPE_END;
@@ -382,7 +382,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd)
if(ySplitString(ycmd_name,"~",if_value,if_then))
{
ySplitString(if_then,"~",if_then,if_else);
- yresult = (if_value == "") ? if_then : if_else;
+ yresult = (if_value.empty()) ? if_then : if_else;
}
}
else if(ycmd_type == "if-equal")
@@ -451,7 +451,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd)
{
ySplitString(tmp,";",varname, ydefault);
yresult = YWeb_cgi_get_ini(hh, filename, varname, yaccess);
- if(yresult == "" && ydefault != "")
+ if(yresult.empty() && !ydefault.empty())
yresult = ydefault;
}
else
@@ -525,7 +525,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd)
else
yresult = "ycgi-type unknown";
}
- else if (hh->ParamList[ycmd] != "")
+ else if (!hh->ParamList[ycmd].empty())
{
if((hh->ParamList[ycmd]).find("script") == std::string::npos)
yresult = hh->ParamList[ycmd];
@@ -543,7 +543,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd)
std::string CyParser::YWeb_cgi_get_ini(CyhookHandler */*hh*/, std::string filename, std::string varname, std::string yaccess)
{
std::string result;
- if((yaccess == "open") || (yaccess == ""))
+ if((yaccess == "open") || yaccess.empty())
{
yConfig->clear();
yConfig->loadConfig(filename);
@@ -559,13 +559,13 @@ std::string CyParser::YWeb_cgi_get_ini(CyhookHandler */*hh*/, std::string filen
void CyParser::YWeb_cgi_set_ini(CyhookHandler */*hh*/, std::string filename, std::string varname, std::string varvalue, std::string yaccess)
{
std::string result;
- if((yaccess == "open") || (yaccess == ""))
+ if((yaccess == "open") || yaccess.empty())
{
yConfig->clear();
yConfig->loadConfig(filename);
}
yConfig->setString(varname, varvalue);
- if((yaccess == "save") || (yaccess == ""))
+ if((yaccess == "save") || yaccess.empty())
yConfig->saveConfig(filename);
}
@@ -767,7 +767,7 @@ std::string CyParser::func_do_reload_httpd_config(CyhookHandler */*hh*/, std::s
//-------------------------------------------------------------------------
std::string CyParser::func_change_httpd(CyhookHandler *hh, std::string para)
{
- if(para != "" && access(para.c_str(), 4) == 0)
+ if(!para.empty() && access(para.c_str(), 4) == 0)
{
hh->status = HANDLED_ABORT;
int err = execvp(para.c_str(), NULL); // no return if successful
diff --git a/tuxbox/neutrino/src/driver/rcinput.cpp b/tuxbox/neutrino/src/driver/rcinput.cpp
index eb2c466..4a5b6dc 100644
--- a/tuxbox/neutrino/src/driver/rcinput.cpp
+++ b/tuxbox/neutrino/src/driver/rcinput.cpp
@@ -525,13 +525,13 @@ void CRCInput::load_conf(bool initialize) {
if (keyaction != CRCInput::RC_nokey)
{
if (debug_user_translate) {
- if (data == "")
+ if (data.empty())
printf("[rcinput] Binding %s[%c] -> %s\n", keyword.c_str(), modint2ch(modifier), argument.c_str());
else
printf("[rcinput] Binding %s[%c] -> %s(%s)\n", keyword.c_str(), modint2ch(modifier), action.c_str(), data.c_str());
}
user_translate_table[modifier][keycode] = (neutrino_msg_t) keyaction;
- if (data != "")
+ if (!data.empty())
{
char *data_str = (char *) malloc((data.length()+1)*sizeof(char));
strcpy(data_str, data.c_str());
diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp
index 0b3fd63..97eeafc 100644
--- a/tuxbox/neutrino/src/gui/epgplus.cpp
+++ b/tuxbox/neutrino/src/gui/epgplus.cpp
@@ -1622,7 +1622,7 @@ int EpgPlus::MenuTargetAddRecordTimer::exec(CMenuTarget*, const std::string&)
epgPlus->paint();
recDir = recDirs.get_selected_dir();
}
- if (recDir != "" || RECORDING_FILE != g_settings.recording_type)
+ if (!recDir.empty() || RECORDING_FILE != g_settings.recording_type)
{
if (timerdclient.addRecordTimerEvent(epgPlus->selectedChannelEntry->channel->channel_id,
(*It)->channelEvent.startTime,
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index e7ea041..4da1704 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -501,7 +501,7 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
text2 = epgData.title.substr(text1.length()+ 1, uint(-1) );
}
- if (text2!="")
+ if (!text2.empty())
toph = 2* topboxheight;
else
toph = topboxheight;
@@ -740,13 +740,13 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
recDir = recDirs.get_selected_dir();
}
- if ((recDir == "") && (RECORDING_FILE == g_settings.recording_type))
+ if (recDir.empty() && (RECORDING_FILE == g_settings.recording_type))
{
printf("set zapto timer failed, no record directory...\n");
ShowLocalizedMessage(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_EPGLIST_ERROR_NO_RECORDDIR_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_ERROR);
}
- if ((recDir != "") || (RECORDING_FILE != g_settings.recording_type))
+ if (!recDir.empty() || (RECORDING_FILE != g_settings.recording_type))
{
if (timerdclient.addRecordTimerEvent(channel_id,
epgData.epg_times.startzeit,
diff --git a/tuxbox/neutrino/src/gui/esound.cpp b/tuxbox/neutrino/src/gui/esound.cpp
index fb3ff09..b2ba48a 100644
--- a/tuxbox/neutrino/src/gui/esound.cpp
+++ b/tuxbox/neutrino/src/gui/esound.cpp
@@ -137,7 +137,7 @@ int CEsoundGui::exec(CMenuTarget* parent, const std::string &)
}
}
- if (tmp == "")
+ if (tmp.empty())
{
printf("[esound.cpp] %s in %s or %s not found, returning...", esound_start_script.c_str(), esound_start_path1.c_str(), esound_start_path2.c_str());
return menu_return::RETURN_EXIT_ALL;
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index ec90cd5..fa78f29 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -419,13 +419,13 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
recDir = recDirs.get_selected_dir();
}
- if ((recDir == "") && (RECORDING_FILE == g_settings.recording_type))
+ if (recDir.empty() && (RECORDING_FILE == g_settings.recording_type))
{
printf("set zapto timer failed, no record directory...\n");
ShowLocalizedMessage(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_EPGLIST_ERROR_NO_RECORDDIR_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_ERROR);
}
- if ((recDir != "") || (RECORDING_FILE != g_settings.recording_type))
+ if (!recDir.empty() || (RECORDING_FILE != g_settings.recording_type))
{
// if (Timer.addRecordTimerEvent(channel_id,
if (Timer.addRecordTimerEvent(evtlist[selected].get_channel_id(),
@@ -1175,7 +1175,7 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey)
if(parent != NULL)
parent->hide();
- if(actionkey == "")
+ if(actionkey.empty())
{
res = showMenu();
}
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 3467f76..1904de3 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -1920,7 +1920,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
source = m_movieSelectionHandler->file.Name;
CDirChooser dir(&dest,"/mnt/","/hdd");
dir.exec(NULL,"");
- if(dest != "")
+ if(!dest.empty())
{
dest += "/";
dest += m_movieSelectionHandler->file.getFileName();
@@ -1939,7 +1939,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
source = m_movieSelectionHandler->file.Name;
CDirChooser dir(&dest,"/mnt/","/hdd");
dir.exec(NULL,"");
- if(dest != "")
+ if(!dest.empty())
{
dest += "/";
dest += m_movieSelectionHandler->file.getFileName();
@@ -2507,10 +2507,8 @@ void CMovieBrowser::updateDir(void)
// check if there is a record dir and if we should use it
for(int i = 0; i < MAX_RECORDING_DIR; i++)
{
- if(g_settings.recording_dir[i] != "" )
- {
+ if(!g_settings.recording_dir[i].empty())
addDir(g_settings.recording_dir[i],&m_settings.storageDirRecUsed[i]);
- }
}
for(int i = 0; i < MB_MAX_DIRS; i++)
@@ -3170,7 +3168,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
CMenuOptionChooser* chooserRec[MAX_RECORDING_DIR];
for(i = 0; i < MAX_RECORDING_DIR; i++)
{
- if(g_settings.recording_dir[i] != "" &&
+ if(!g_settings.recording_dir[i].empty() &&
g_settings.recording_dir[i] != g_settings.streaming_moviedir)
{
chooserRec[i] = new CMenuOptionChooser(g_settings.recording_dir[i].c_str() , &m_settings.storageDirRecUsed[i] , MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true);
@@ -3849,7 +3847,7 @@ int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey)
{
int returnval = menu_return::RETURN_REPAINT;
- if(actionKey == "")
+ if(actionKey.empty())
{
if(parent)
parent->hide();
diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp
index 3951f19..57e5e1d 100644
--- a/tuxbox/neutrino/src/gui/movieplayer2.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp
@@ -2753,7 +2753,7 @@ CMoviePlayerGui::PlayStream(int streamtype)
else if (streamtype == STREAMTYPE_LOCAL)
{
INFO("STREAMTYPE_LOCAL '%s'\n", startfilename.c_str());
- if (startfilename != "")
+ if (!startfilename.empty())
{
CFile file;
struct stat s;
diff --git a/tuxbox/neutrino/src/gui/widget/dirchooser.cpp b/tuxbox/neutrino/src/gui/widget/dirchooser.cpp
index 50a8c65..8582903 100755
--- a/tuxbox/neutrino/src/gui/widget/dirchooser.cpp
+++ b/tuxbox/neutrino/src/gui/widget/dirchooser.cpp
@@ -234,7 +234,7 @@ int CRecDirChooser::exec(CMenuTarget* parent, const std::string & actionKey)
else if (strcmp(key, "dirChooser") == 0)
{
selectedDir = -1;
- if(g_settings.recording_dir[0] != "")
+ if(!g_settings.recording_dir[0].empty())
{
dir = g_settings.recording_dir[0];
}
@@ -248,7 +248,7 @@ int CRecDirChooser::exec(CMenuTarget* parent, const std::string & actionKey)
{
dir = "";
}
- if(dir == "" )
+ if(dir.empty())
{
result = menu_return::RETURN_REPAINT;
}
@@ -257,7 +257,7 @@ int CRecDirChooser::exec(CMenuTarget* parent, const std::string & actionKey)
{
dir = "";
result = CMenuWidget::exec(parent, actionKey);
- if(dir != "")
+ if(!dir.empty())
{
if (localDir)
{
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 914a166..8a6cc27 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -1366,7 +1366,7 @@ int CLockedMenuForwarder::exec(CMenuTarget* parent)
int CMenuSelectorTarget::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
{
// printf("CMenuSelector: %s\n", actionKey.c_str());
- if (actionKey != "")
+ if (!actionKey.empty())
*m_select = atoi(actionKey.c_str());
else
*m_select = -1;
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index efd383f..93996a5 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -1756,7 +1756,7 @@ bool CNeutrinoApp::doGuiRecord(char * preselectedDir, bool addTimer, char * file
refreshGui = true;
recDir = recDirs.get_selected_dir();
//printf("dir : %s\n",recDir.c_str());
- if( recDir != "")
+ if (!recDir.empty())
{
int nfs_nr = getNFSIDOfDir(recDir.c_str());
if(nfs_nr != -1)
commit 2ccff82fe9c1f58060487e74c0e29049d848368c
Author: Christian Schuett <Gau...@ho...>
Date: Wed Oct 29 21:14:04 2014 +0100
Neutrino: use empty() instead of length() if possible
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: GetAway <get...@t-...>
diff --git a/dvb/zapit/src/controld.cpp b/dvb/zapit/src/controld.cpp
index 96f0c6c..ed64fa2 100644
--- a/dvb/zapit/src/controld.cpp
+++ b/dvb/zapit/src/controld.cpp
@@ -273,7 +273,7 @@ void setup_tv_vcr(tv_vcr_format &v2, std::string &line) {
void setup_scalar(switchvalue &s, std::string &str) {
nuke_leading_whitespace(str);
- if (str.length() > 0) {
+ if (!str.empty()) {
int n;
sscanf(str.c_str(), "%d", &n);
s = (switchvalue) n;
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
index c4813e1..35de525 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yrequest.cpp
@@ -562,7 +562,7 @@ unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, unsigne
}
log_level_printf(2,"<POST Boundary> read file (already:%d all:%d)\n", _readbytes, content_len);
}
- while((_readbytes < content_len) && (tmp_line.length() != 0));
+ while((_readbytes < content_len) && !tmp_line.empty());
content_len -= _readbytes;
close(fd);
log_level_printf(2,"<POST Boundary> read file End\n");
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
index 07be8b9..c3b53b1 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_sendfile.cpp
@@ -192,7 +192,7 @@ int CmodSendfile::OpenFile(CyhookHandler */*hh*/, std::string fullfilename)
{
int fd= -1;
std::string tmpstring;
- if(fullfilename.length() > 0)
+ if (!fullfilename.empty())
{
fd = open( fullfilename.c_str(), O_RDONLY );
if (fd<=0)
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
index 4f1c9e0..837e6ad 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
@@ -187,7 +187,7 @@ void CyParser::cgi(CyhookHandler *hh)
}
else
printf("[CyParser] Y-cgi:no parameter given\n");
- if (yresult.length()<=0)
+ if (yresult.empty())
hh->SetError(HTTP_NOT_IMPLEMENTED, HANDLED_NOT_IMPLEMENTED);
else
hh->addResult(yresult, HANDLED_READY);
@@ -254,7 +254,7 @@ void CyParser::ParseAndSendFile(CyhookHandler *hh)
}
// parsing given file
yresult += cgi_file_parsing(hh, hh->UrlData["filename"], ydebug);
- if (yresult.length()<=0)
+ if (yresult.empty())
hh->SetError(HTTP_NOT_IMPLEMENTED, HANDLED_NOT_IMPLEMENTED);
else
{
@@ -612,7 +612,7 @@ std::string CyParser::YWeb_cgi_include_block(std::string filename, std::string
log_level_printf(6, "include-block: (%s) from file\n", blockname.c_str() );
}
pthread_mutex_unlock( &yParser_mutex );
- if(yfile.length() != 0)
+ if(!yfile.empty())
{
std::string t = "start-block~"+blockname;
std::string::size_type start, end;
diff --git a/tuxbox/neutrino/daemons/sectionsd/SIbouquets.hpp b/tuxbox/neutrino/daemons/sectionsd/SIbouquets.hpp
index 42b8414..d3c89a3 100644
--- a/tuxbox/neutrino/daemons/sectionsd/SIbouquets.hpp
+++ b/tuxbox/neutrino/daemons/sectionsd/SIbouquets.hpp
@@ -122,7 +122,7 @@ public:
printf("Transport-Stream-ID: %hu\n", transport_stream_id);
printf("Service-ID: %hu\n", service_id);
printf("Service-Typ: %hhu\n", serviceTyp);
- if(bouquetName.length())
+ if (!bouquetName.empty())
printf("Bouquet-Name: %s\n", bouquetName.c_str());
}
};
diff --git a/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp b/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp
index 15cc153..ff4a644 100644
--- a/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp
+++ b/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp
@@ -162,7 +162,7 @@ int SIevent::saveXML2(FILE *file) const
i = langName.begin() ;
i != langName.end() ;
++i) {
- if (i->second.length()) {
+ if (!i->second.empty()) {
fprintf(file, "\t\t\t<name lang=\"%s\" string=\"", i->first.c_str());
saveStringToXMLfile(file, i->second.c_str());
fprintf(file, "\"/>\n");
@@ -172,18 +172,18 @@ int SIevent::saveXML2(FILE *file) const
i = langText.begin() ;
i != langText.end() ;
++i) {
- if (i->second.length()) {
+ if (!i->second.empty()) {
fprintf(file, "\t\t\t<text lang=\"%s\" string=\"", i->first.c_str());
saveStringToXMLfile(file, i->second.c_str());
fprintf(file, "\"/>\n");
}
}
- if(item.length()) {
+ if (!item.empty()) {
fprintf(file, "\t\t\t<item string=\"");
saveStringToXMLfile(file, item.c_str());
fprintf(file, "\"/>\n");
}
- if(itemDescription.length()) {
+ if (!itemDescription.empty()) {
fprintf(file, "\t\t\t<item_description string=\"");
saveStringToXMLfile(file, itemDescription.c_str());
fprintf(file, "\"/>\n");
@@ -192,7 +192,7 @@ int SIevent::saveXML2(FILE *file) const
i = langExtendedText.begin() ;
i != langExtendedText.end() ;
++i) {
- if (i->second.length()) {
+ if (!i->second.empty()) {
fprintf(file, "\t\t\t<extended_text lang=\"%s\" string=\"", i->first.c_str());
saveStringToXMLfile(file, i->second.c_str());
fprintf(file, "\"/>\n");
@@ -291,9 +291,9 @@ void SIevent::dump(void) const
if (service_id)
printf("Service-ID: %hu\n", service_id);
printf("Event-ID: %hu\n", eventID);
- if(item.length())
+ if (!item.empty())
printf("Item: %s\n", item.c_str());
- if(itemDescription.length())
+ if (!itemDescription.empty())
printf("Item-Description: %s\n", itemDescription.c_str());
for (std::map<std::string, std::string>::const_iterator it = langName.begin() ;
@@ -306,13 +306,13 @@ void SIevent::dump(void) const
it != langEx...
[truncated message content] |
|
From: GetAway <tux...@ne...> - 2014-10-31 11:01:43
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 8cade3ffa8084dba2171ab4cabb90065fb692659 (commit)
via 59788b0d26762fc248c5cf8610d5895d441dd800 (commit)
from a06c2c6403315904a2f803ab6417c4c554d072bf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8cade3ffa8084dba2171ab4cabb90065fb692659
Author: GetAway <get...@t-...>
Date: Thu Oct 30 16:58:20 2014 +0100
tuxmail: add utf8_to_latin1 encoding version bump 1.56B
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/plugins/tuxmail/tuxmail.c b/tuxbox/plugins/tuxmail/tuxmail.c
index 42abecc..043bc73 100644
--- a/tuxbox/plugins/tuxmail/tuxmail.c
+++ b/tuxbox/plugins/tuxmail/tuxmail.c
@@ -858,7 +858,7 @@ int RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color)
* GetStringLen
******************************************************************************/
-int GetStringLen(unsigned char *string)
+int GetStringLen(char *string)
{
int stringlen = 0;
@@ -881,9 +881,12 @@ int GetStringLen(unsigned char *string)
* RenderString
******************************************************************************/
-void RenderString(unsigned char *string, int sx, int sy, int maxwidth, int layout, int size, int color)
+void RenderString(char *string, int sx, int sy, int maxwidth, int layout, int size, int color)
{
int stringlen, ex, charwidth;
+ char rstr[256]={0}, *rptr=rstr;
+
+ strcpy(rstr,string);
// set size
@@ -933,15 +936,59 @@ void RenderString(unsigned char *string, int sx, int sy, int maxwidth, int layou
ex = sx + maxwidth;
- while(*string != '\0')
+ while(*rptr != '\0')
{
- if((charwidth = RenderChar(*string, sx, sy, ex, color)) == -1)
+ int uml = 0;
+ switch(*rptr) /* skip Umlauts */
+ {
+ case '\xc4':
+ case '\xd6':
+ case '\xdc':
+ case '\xe4':
+ case '\xf6':
+ case '\xfc':
+ case '\xdf': uml=1; break;
+ }
+ if (uml == 0)
+ {
+ // UTF8_to_Latin1 encoding
+ if (((*rptr) & 0xf0) == 0xf0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f'; // ? question mark
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xe0) == 0xe0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xc0) == 0xc0)
+ {
+ char c = (((*rptr) & 3) << 6);
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ *rptr = (c | ((*rptr) & 0x3f));
+ }
+ }
+ if((charwidth = RenderChar(*rptr, sx, sy, ex, color)) == -1)
{
return; /* string > maxwidth */
}
sx += charwidth;
- string++;
+ rptr++;
}
}
@@ -3759,7 +3806,7 @@ void SaveAndReloadDB(int iSave)
void plugin_exec(PluginParam *par)
{
- char cvs_revision[] = "$Revision: 1.56A $";
+ char cvs_revision[] = "$Revision: 1.56B $";
int loop, account, mailindex;
FILE *fd_run;
FT_Error error;
commit 59788b0d26762fc248c5cf8610d5895d441dd800
Author: GetAway <get...@t-...>
Date: Mon Oct 27 20:42:02 2014 +0100
tuxmaild: force tls handshake pump version 1.51B
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
index bd8de6a..5069113 100644
--- a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
+++ b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
@@ -1539,6 +1539,8 @@ int SendPOPCommand(int command, char *param, int ssl)
ERR_print_errors_fp (stderr);
return 0;
}
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2);
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3);
c->sslHandle = SSL_new (c->sslContext);
if (c->sslHandle == NULL) {
@@ -2058,6 +2060,8 @@ int SendIMAPCommand(int command, char *param, char *param2, int ssl)
ERR_print_errors_fp (stderr);
return 0;
}
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2);
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3);
c->sslHandle = SSL_new (c->sslContext);
if (c->sslHandle == NULL) {
@@ -2689,6 +2693,8 @@ int SendSMTPCommand(int command, char *param, int ssl)
ERR_print_errors_fp (stderr);
return 0;
}
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2);
+ SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3);
c->sslHandle = SSL_new (c->sslContext);
if (c->sslHandle == NULL) {
@@ -4794,7 +4800,7 @@ void SigHandler(int signal)
int main(int argc, char **argv)
{
- char cvs_revision[] = "$Revision: 1.51A $";
+ char cvs_revision[] = "$Revision: 1.51B $";
int param, nodelay = 0, account, mailstatus, unread_mailstatus;
pthread_t thread_id;
void *thread_result = 0;
-----------------------------------------------------------------------
Summary of changes:
tuxbox/plugins/tuxmail/daemon/tuxmaild.c | 8 ++++-
tuxbox/plugins/tuxmail/tuxmail.c | 59 +++++++++++++++++++++++++++---
2 files changed, 60 insertions(+), 7 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-10-30 07:48:20
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via 28d7bd2d41fb8264fb2218bc6b839a30621fa838 (commit)
from 038bf2347a8002bb80b7be4c5ffb54f40128fdc9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 28d7bd2d41fb8264fb2218bc6b839a30621fa838
Author: GetAway <get...@t-...>
Date: Mon Oct 27 20:49:42 2014 +0100
cdk: fix building libcrypto for linux-ppc
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/make/contrib-libs.mk b/make/contrib-libs.mk
index a4fc7a3..685a535 100644
--- a/make/contrib-libs.mk
+++ b/make/contrib-libs.mk
@@ -52,7 +52,7 @@ $(DEPDIR)/libcrypto: bootstrap libz @DEPENDS_libcrypto@
shared no-ec no-err no-engine no-hw zlib-dynamic \
no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-smime \
no-rmd160 no-aes192 no-ripemd no-camellia no-ans1 no-krb5 \
- tuxbox --prefix=/ --openssldir=/ && \
+ linux-ppc --prefix=/ --openssldir=/ && \
$(MAKE) depend MAKEDEPPROG=$(target)-gcc ZLIB_INCLUDE="-I$(targetprefix)/include" && \
$(MAKE) -j1 all && \
@INSTALL_libcrypto@
@@ -60,6 +60,7 @@ $(DEPDIR)/libcrypto: bootstrap libz @DEPENDS_libcrypto@
sed -e "s,^prefix=,prefix=$(targetprefix)," < @DIR_libcrypto@/libcrypto.pc > $(targetprefix)/lib/pkgconfig/libcrypto.pc && \
sed -e "s,^prefix=,prefix=$(targetprefix)," < @DIR_libcrypto@/libssl.pc > $(targetprefix)/lib/pkgconfig/libssl.pc && \
@CLEANUP_libcrypto@
+ chmod 0755 $(targetprefix)/lib/libcrypto.so.* $(targetprefix)/lib/libssl.so.*
touch $@
if ENABLE_UCLIBC
-----------------------------------------------------------------------
Summary of changes:
make/contrib-libs.mk | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-10-03 17:19:55
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via a06c2c6403315904a2f803ab6417c4c554d072bf (commit)
via e732447ca2f05d66a4f62104f3c2ff2f3b5c3629 (commit)
via 57f9c8b8f10d219e7f8e654939e15f63a194b2a0 (commit)
via 8e0aa4c0b9a0cb55c6b5da795cf2cb66414ab811 (commit)
via 703d44902bdd72a8490aaf90c765997992d87767 (commit)
via 43294adfaa570486a5dd118ffa3d55569e47bcf6 (commit)
via bf71299a4d1a9939273cbd178dc7a2b6c1d9cee2 (commit)
via 11f4071bcc45888c9edad68b3bf0a9e84ea0359d (commit)
via c91f0f579924a2cce9d74f87fadbdf411e2d1aeb (commit)
from d6b9cf22da9ab7ae02fdcf366fee87f396c6015c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a06c2c6403315904a2f803ab6417c4c554d072bf
Author: GetAway <get...@t-...>
Date: Sun Sep 28 19:37:57 2014 +0200
input: add utf8_to_latin1 encoding version bump 1.40
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/tools/input/input.c b/tuxbox/tools/input/input.c
index 2e227ce..23d518f 100644
--- a/tuxbox/tools/input/input.c
+++ b/tuxbox/tools/input/input.c
@@ -36,7 +36,7 @@
#define NCF_FILE "/var/tuxbox/config/neutrino.conf"
#define ECF_FILE "/var/tuxbox/config/engima/config"
#define BUFSIZE 1024
-#define I_VERSION 1.39
+#define I_VERSION 1.40
#define FONT "/share/fonts/pakenham.ttf"
diff --git a/tuxbox/tools/input/text.c b/tuxbox/tools/input/text.c
index 5cabd92..cde98c8 100644
--- a/tuxbox/tools/input/text.c
+++ b/tuxbox/tools/input/text.c
@@ -155,8 +155,8 @@ int stringlen = 0;
int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int size, int color)
{
- int stringlen, ex, charwidth,i,found;
- char rstr[256], *rptr=rstr, rc;
+ int stringlen = 0, ex = 0, charwidth = 0, i = 0, found = 0;
+ char rstr[256]={0}, *rptr=rstr, rc=' ';
int varcolor=color;
//set size
@@ -232,6 +232,50 @@ int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int siz
}
else
{
+ int uml = 0;
+ switch(*rptr) /* skip Umlauts */
+ {
+ case '\xc4':
+ case '\xd6':
+ case '\xdc':
+ case '\xe4':
+ case '\xf6':
+ case '\xfc':
+ case '\xdf': uml=1; break;
+ }
+ if (uml == 0)
+ {
+ // UTF8_to_Latin1 encoding
+ if (((*rptr) & 0xf0) == 0xf0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f'; // ? question mark
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xe0) == 0xe0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xc0) == 0xc0)
+ {
+ char c = (((*rptr) & 3) << 6);
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ *rptr = (c | ((*rptr) & 0x3f));
+ }
+ }
if((charwidth = RenderChar(*rptr, sx, sy, ex, varcolor)) == -1) return sx; /* string > maxwidth */
sx += charwidth;
}
commit e732447ca2f05d66a4f62104f3c2ff2f3b5c3629
Author: Christian Schuett <Gau...@ho...>
Date: Fri Sep 12 23:20:57 2014 +0200
Neutrino: move theme loading to class CThemes
this avoids keeping default theme data multiple times and removes
duplicate code in classes CNeutrinoApp and CThemes
based on patches by martii <m4...@gm...> in Neutrino-MP Git and
[CST] Focus <foc...@gm...> in Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/themes.cpp b/tuxbox/neutrino/src/gui/themes.cpp
index 4981d07..000d152 100644
--- a/tuxbox/neutrino/src/gui/themes.cpp
+++ b/tuxbox/neutrino/src/gui/themes.cpp
@@ -46,7 +46,7 @@
#define THEMEDIR THEMESDIR "/"
#define USERDIR "/var" THEMEDIR
-#define FILE_PREFIX ".theme"
+#define FILE_SUFFIX ".theme"
CThemes::CThemes(const neutrino_locale_t title, const char * const IconName)
: themefile('\t')
@@ -84,10 +84,10 @@ int CThemes::exec(CMenuTarget* parent, const std::string & actionKey)
if ( strstr(themeFile.c_str(), "{U}") != 0 )
{
themeFile.erase(0, 3);
- readFile((char*)((std::string)USERDIR + themeFile + FILE_PREFIX).c_str());
+ readFile((char*)((std::string)USERDIR + themeFile + FILE_SUFFIX).c_str());
}
else
- readFile((char*)((std::string)THEMEDIR + themeFile + FILE_PREFIX).c_str());
+ readFile((char*)((std::string)THEMEDIR + themeFile + FILE_SUFFIX).c_str());
}
return res;
}
@@ -185,8 +185,8 @@ int CThemes::Show()
int res = themes.exec(NULL, "");
selected = themes.getSelected();
- if (file_name.length() > 1) {
- saveFile((char*)((std::string)USERDIR + file_name + FILE_PREFIX).c_str());
+ if (file_name.length() > 0) {
+ saveFile((char*)((std::string)USERDIR + file_name + FILE_SUFFIX).c_str());
}
if (hasThemeChanged) {
@@ -293,47 +293,7 @@ void CThemes::readFile(char* themename)
{
if(themefile.loadConfig(themename))
{
- g_settings.menu_Head_alpha = themefile.getInt32( "menu_Head_alpha", 0x00 );
- g_settings.menu_Head_red = themefile.getInt32( "menu_Head_red", 0x00 );
- g_settings.menu_Head_green = themefile.getInt32( "menu_Head_green", 0x0A );
- g_settings.menu_Head_blue = themefile.getInt32( "menu_Head_blue", 0x19 );
- g_settings.menu_Head_Text_alpha = themefile.getInt32( "menu_Head_Text_alpha", 0x00 );
- g_settings.menu_Head_Text_red = themefile.getInt32( "menu_Head_Text_red", 0x5f );
- g_settings.menu_Head_Text_green = themefile.getInt32( "menu_Head_Text_green", 0x46 );
- g_settings.menu_Head_Text_blue = themefile.getInt32( "menu_Head_Text_blue", 0x00 );
- g_settings.menu_Content_alpha = themefile.getInt32( "menu_Content_alpha", 0x14 );
- g_settings.menu_Content_red = themefile.getInt32( "menu_Content_red", 0x00 );
- g_settings.menu_Content_green = themefile.getInt32( "menu_Content_green", 0x0f );
- g_settings.menu_Content_blue = themefile.getInt32( "menu_Content_blue", 0x23 );
- g_settings.menu_Content_Text_alpha = themefile.getInt32( "menu_Content_Text_alpha", 0x00 );
- g_settings.menu_Content_Text_red = themefile.getInt32( "menu_Content_Text_red", 0x64 );
- g_settings.menu_Content_Text_green = themefile.getInt32( "menu_Content_Text_green", 0x64 );
- g_settings.menu_Content_Text_blue = themefile.getInt32( "menu_Content_Text_blue", 0x64 );
- g_settings.menu_Content_Selected_alpha = themefile.getInt32( "menu_Content_Selected_alpha", 0x14 );
- g_settings.menu_Content_Selected_red = themefile.getInt32( "menu_Content_Selected_red", 0x19 );
- g_settings.menu_Content_Selected_green = themefile.getInt32( "menu_Content_Selected_green", 0x37 );
- g_settings.menu_Content_Selected_blue = themefile.getInt32( "menu_Content_Selected_blue", 0x64 );
- g_settings.menu_Content_Selected_Text_alpha = themefile.getInt32( "menu_Content_Selected_Text_alpha", 0x00 );
- g_settings.menu_Content_Selected_Text_red = themefile.getInt32( "menu_Content_Selected_Text_red", 0x00 );
- g_settings.menu_Content_Selected_Text_green = themefile.getInt32( "menu_Content_Selected_Text_green", 0x00 );
- g_settings.menu_Content_Selected_Text_blue = themefile.getInt32( "menu_Content_Selected_Text_blue", 0x00 );
- g_settings.menu_Content_inactive_alpha = themefile.getInt32( "menu_Content_inactive_alpha", 0x14 );
- g_settings.menu_Content_inactive_red = themefile.getInt32( "menu_Content_inactive_red", 0x00 );
- g_settings.menu_Content_inactive_green = themefile.getInt32( "menu_Content_inactive_green", 0x0f );
- g_settings.menu_Content_inactive_blue = themefile.getInt32( "menu_Content_inactive_blue", 0x23 );
- g_settings.menu_Content_inactive_Text_alpha = themefile.getInt32( "menu_Content_inactive_Text_alpha", 0x00 );
- g_settings.menu_Content_inactive_Text_red = themefile.getInt32( "menu_Content_inactive_Text_red", 55 );
- g_settings.menu_Content_inactive_Text_green = themefile.getInt32( "menu_Content_inactive_Text_green", 70 );
- g_settings.menu_Content_inactive_Text_blue = themefile.getInt32( "menu_Content_inactive_Text_blue", 85 );
- g_settings.infobar_alpha = themefile.getInt32( "infobar_alpha", 0x14 );
- g_settings.infobar_red = themefile.getInt32( "infobar_red", 0x00 );
- g_settings.infobar_green = themefile.getInt32( "infobar_green", 0x0e );
- g_settings.infobar_blue = themefile.getInt32( "infobar_blue", 0x23 );
- g_settings.infobar_Text_alpha = themefile.getInt32( "infobar_Text_alpha", 0x00 );
- g_settings.infobar_Text_red = themefile.getInt32( "infobar_Text_red", 0x64 );
- g_settings.infobar_Text_green = themefile.getInt32( "infobar_Text_green", 0x64 );
- g_settings.infobar_Text_blue = themefile.getInt32( "infobar_Text_blue", 0x64 );
-
+ getColors(themefile);
colorSetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
hasThemeChanged = true;
}
@@ -343,105 +303,104 @@ void CThemes::readFile(char* themename)
void CThemes::saveFile(char * themename)
{
- themefile.setInt32( "menu_Head_alpha", g_settings.menu_Head_alpha );
- themefile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
- themefile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
- themefile.setInt32( "menu_Head_blue", g_settings.menu_Head_blue );
- themefile.setInt32( "menu_Head_Text_alpha", g_settings.menu_Head_Text_alpha );
- themefile.setInt32( "menu_Head_Text_red", g_settings.menu_Head_Text_red );
- themefile.setInt32( "menu_Head_Text_green", g_settings.menu_Head_Text_green );
- themefile.setInt32( "menu_Head_Text_blue", g_settings.menu_Head_Text_blue );
- themefile.setInt32( "menu_Content_alpha", g_settings.menu_Content_alpha );
- themefile.setInt32( "menu_Content_red", g_settings.menu_Content_red );
- themefile.setInt32( "menu_Content_green", g_settings.menu_Content_green );
- themefile.setInt32( "menu_Content_blue", g_settings.menu_Content_blue );
- themefile.setInt32( "menu_Content_Text_alpha", g_settings.menu_Content_Text_alpha );
- themefile.setInt32( "menu_Content_Text_red", g_settings.menu_Content_Text_red );
- themefile.setInt32( "menu_Content_Text_green", g_settings.menu_Content_Text_green );
- themefile.setInt32( "menu_Content_Text_blue", g_settings.menu_Content_Text_blue );
- themefile.setInt32( "menu_Content_Selected_alpha", g_settings.menu_Content_Selected_alpha );
- themefile.setInt32( "menu_Content_Selected_red", g_settings.menu_Content_Selected_red );
- themefile.setInt32( "menu_Content_Selected_green", g_settings.menu_Content_Selected_green );
- themefile.setInt32( "menu_Content_Selected_blue", g_settings.menu_Content_Selected_blue );
- themefile.setInt32( "menu_Content_Selected_Text_alpha", g_settings.menu_Content_Selected_Text_alpha );
- themefile.setInt32( "menu_Content_Selected_Text_red", g_settings.menu_Content_Selected_Text_red );
- themefile.setInt32( "menu_Content_Selected_Text_green", g_settings.menu_Content_Selected_Text_green );
- themefile.setInt32( "menu_Content_Selected_Text_blue", g_settings.menu_Content_Selected_Text_blue );
- themefile.setInt32( "menu_Content_inactive_alpha", g_settings.menu_Content_inactive_alpha );
- themefile.setInt32( "menu_Content_inactive_red", g_settings.menu_Content_inactive_red );
- themefile.setInt32( "menu_Content_inactive_green", g_settings.menu_Content_inactive_green );
- themefile.setInt32( "menu_Content_inactive_blue", g_settings.menu_Content_inactive_blue );
- themefile.setInt32( "menu_Content_inactive_Text_alpha", g_settings.menu_Content_inactive_Text_alpha );
- themefile.setInt32( "menu_Content_inactive_Text_red", g_settings.menu_Content_inactive_Text_red );
- themefile.setInt32( "menu_Content_inactive_Text_green", g_settings.menu_Content_inactive_Text_green );
- themefile.setInt32( "menu_Content_inactive_Text_blue", g_settings.menu_Content_inactive_Text_blue );
- themefile.setInt32( "infobar_alpha", g_settings.infobar_alpha );
- themefile.setInt32( "infobar_red", g_settings.infobar_red );
- themefile.setInt32( "infobar_green", g_settings.infobar_green );
- themefile.setInt32( "infobar_blue", g_settings.infobar_blue );
- themefile.setInt32( "infobar_Text_alpha", g_settings.infobar_Text_alpha );
- themefile.setInt32( "infobar_Text_red", g_settings.infobar_Text_red );
- themefile.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
- themefile.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
-
+ setColors(themefile);
if (!themefile.saveConfig(themename))
printf("[neutrino theme] %s write error\n", themename);
}
-
-
// setup default Color Sheme (Neutrino)
void CThemes::setupDefaultColors()
{
- g_settings.menu_Head_alpha = 0x00;
- g_settings.menu_Head_red = 0x00;
- g_settings.menu_Head_green = 0x0A;
- g_settings.menu_Head_blue = 0x19;
-
- g_settings.menu_Head_Text_alpha = 0x00;
- g_settings.menu_Head_Text_red = 0x5f;
- g_settings.menu_Head_Text_green = 0x46;
- g_settings.menu_Head_Text_blue = 0x00;
-
- g_settings.menu_Content_alpha = 0x14;
- g_settings.menu_Content_red = 0x00;
- g_settings.menu_Content_green = 0x0f;
- g_settings.menu_Content_blue = 0x23;
-
- g_settings.menu_Content_Text_alpha = 0x00;
- g_settings.menu_Content_Text_red = 0x64;
- g_settings.menu_Content_Text_green = 0x64;
- g_settings.menu_Content_Text_blue = 0x64;
-
- g_settings.menu_Content_Selected_alpha = 0x14;
- g_settings.menu_Content_Selected_red = 0x19;
- g_settings.menu_Content_Selected_green = 0x37;
- g_settings.menu_Content_Selected_blue = 0x64;
-
- g_settings.menu_Content_Selected_Text_alpha = 0x00;
- g_settings.menu_Content_Selected_Text_red = 0x00;
- g_settings.menu_Content_Selected_Text_green = 0x00;
- g_settings.menu_Content_Selected_Text_blue = 0x00;
-
- g_settings.menu_Content_inactive_alpha = 0x14;
- g_settings.menu_Content_inactive_red = 0x00;
- g_settings.menu_Content_inactive_green = 0x0f;
- g_settings.menu_Content_inactive_blue = 0x23;
-
- g_settings.menu_Content_inactive_Text_alpha = 0x00;
- g_settings.menu_Content_inactive_Text_red = 55;
- g_settings.menu_Content_inactive_Text_green = 70;
- g_settings.menu_Content_inactive_Text_blue = 85;
-
- g_settings.infobar_alpha = 0x14;
- g_settings.infobar_red = 0x00;
- g_settings.infobar_green = 0x0e;
- g_settings.infobar_blue = 0x23;
-
- g_settings.infobar_Text_alpha = 0x00;
- g_settings.infobar_Text_red = 0x64;
- g_settings.infobar_Text_green = 0x64;
- g_settings.infobar_Text_blue = 0x64;
+ CConfigFile empty(':');
+ getColors(empty);
+}
+
+void CThemes::getColors(CConfigFile &configfile)
+{
+ g_settings.menu_Head_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 );
+ g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
+ g_settings.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A );
+ g_settings.menu_Head_blue = configfile.getInt32( "menu_Head_blue", 0x19 );
+ g_settings.menu_Head_Text_alpha = configfile.getInt32( "menu_Head_Text_alpha", 0x00 );
+ g_settings.menu_Head_Text_red = configfile.getInt32( "menu_Head_Text_red", 0x5f );
+ g_settings.menu_Head_Text_green = configfile.getInt32( "menu_Head_Text_green", 0x46 );
+ g_settings.menu_Head_Text_blue = configfile.getInt32( "menu_Head_Text_blue", 0x00 );
+ g_settings.menu_Content_alpha = configfile.getInt32( "menu_Content_alpha", 0x14 );
+ g_settings.menu_Content_red = configfile.getInt32( "menu_Content_red", 0x00 );
+ g_settings.menu_Content_green = configfile.getInt32( "menu_Content_green", 0x0f );
+ g_settings.menu_Content_blue = configfile.getInt32( "menu_Content_blue", 0x23 );
+ g_settings.menu_Content_Text_alpha = configfile.getInt32( "menu_Content_Text_alpha", 0x00 );
+ g_settings.menu_Content_Text_red = configfile.getInt32( "menu_Content_Text_red", 0x64 );
+ g_settings.menu_Content_Text_green = configfile.getInt32( "menu_Content_Text_green", 0x64 );
+ g_settings.menu_Content_Text_blue = configfile.getInt32( "menu_Content_Text_blue", 0x64 );
+ g_settings.menu_Content_Selected_alpha = configfile.getInt32( "menu_Content_Selected_alpha", 0x14 );
+ g_settings.menu_Content_Selected_red = configfile.getInt32( "menu_Content_Selected_red", 0x19 );
+ g_settings.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 0x37 );
+ g_settings.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 0x64 );
+ g_settings.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0x00 );
+ g_settings.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0x00 );
+ g_settings.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0x00 );
+ g_settings.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0x00 );
+ g_settings.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 0x14 );
+ g_settings.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 0x00 );
+ g_settings.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 0x0f );
+ g_settings.menu_Content_inactive_blue = configfile.getInt32( "menu_Content_inactive_blue", 0x23 );
+ g_settings.menu_Content_inactive_Text_alpha = configfile.getInt32( "menu_Content_inactive_Text_alpha", 0x00 );
+ g_settings.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 55 );
+ g_settings.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 70 );
+ g_settings.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 85 );
+ g_settings.infobar_alpha = configfile.getInt32( "infobar_alpha", 0x14 );
+ g_settings.infobar_red = configfile.getInt32( "infobar_red", 0x00 );
+ g_settings.infobar_green = configfile.getInt32( "infobar_green", 0x0e );
+ g_settings.infobar_blue = configfile.getInt32( "infobar_blue", 0x23 );
+ g_settings.infobar_Text_alpha = configfile.getInt32( "infobar_Text_alpha", 0x00 );
+ g_settings.infobar_Text_red = configfile.getInt32( "infobar_Text_red", 0x64 );
+ g_settings.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
+ g_settings.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
+}
+
+void CThemes::setColors(CConfigFile &configfile)
+{
+ configfile.setInt32( "menu_Head_alpha", g_settings.menu_Head_alpha );
+ configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
+ configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
+ configfile.setInt32( "menu_Head_blue", g_settings.menu_Head_blue );
+ configfile.setInt32( "menu_Head_Text_alpha", g_settings.menu_Head_Text_alpha );
+ configfile.setInt32( "menu_Head_Text_red", g_settings.menu_Head_Text_red );
+ configfile.setInt32( "menu_Head_Text_green", g_settings.menu_Head_Text_green );
+ configfile.setInt32( "menu_Head_Text_blue", g_settings.menu_Head_Text_blue );
+ configfile.setInt32( "menu_Content_alpha", g_settings.menu_Content_alpha );
+ configfile.setInt32( "menu_Content_red", g_settings.menu_Content_red );
+ configfile.setInt32( "menu_Content_green", g_settings.menu_Content_green );
+ configfile.setInt32( "menu_Content_blue", g_settings.menu_Content_blue );
+ configfile.setInt32( "menu_Content_Text_alpha", g_settings.menu_Content_Text_alpha );
+ configfile.setInt32( "menu_Content_Text_red", g_settings.menu_Content_Text_red );
+ configfile.setInt32( "menu_Content_Text_green", g_settings.menu_Content_Text_green );
+ configfile.setInt32( "menu_Content_Text_blue", g_settings.menu_Content_Text_blue );
+ configfile.setInt32( "menu_Content_Selected_alpha", g_settings.menu_Content_Selected_alpha );
+ configfile.setInt32( "menu_Content_Selected_red", g_settings.menu_Content_Selected_red );
+ configfile.setInt32( "menu_Content_Selected_green", g_settings.menu_Content_Selected_green );
+ configfile.setInt32( "menu_Content_Selected_blue", g_settings.menu_Content_Selected_blue );
+ configfile.setInt32( "menu_Content_Selected_Text_alpha", g_settings.menu_Content_Selected_Text_alpha );
+ configfile.setInt32( "menu_Content_Selected_Text_red", g_settings.menu_Content_Selected_Text_red );
+ configfile.setInt32( "menu_Content_Selected_Text_green", g_settings.menu_Content_Selected_Text_green );
+ configfile.setInt32( "menu_Content_Selected_Text_blue", g_settings.menu_Content_Selected_Text_blue );
+ configfile.setInt32( "menu_Content_inactive_alpha", g_settings.menu_Content_inactive_alpha );
+ configfile.setInt32( "menu_Content_inactive_red", g_settings.menu_Content_inactive_red );
+ configfile.setInt32( "menu_Content_inactive_green", g_settings.menu_Content_inactive_green );
+ configfile.setInt32( "menu_Content_inactive_blue", g_settings.menu_Content_inactive_blue );
+ configfile.setInt32( "menu_Content_inactive_Text_alpha", g_settings.menu_Content_inactive_Text_alpha );
+ configfile.setInt32( "menu_Content_inactive_Text_red", g_settings.menu_Content_inactive_Text_red );
+ configfile.setInt32( "menu_Content_inactive_Text_green", g_settings.menu_Content_inactive_Text_green );
+ configfile.setInt32( "menu_Content_inactive_Text_blue", g_settings.menu_Content_inactive_Text_blue );
+ configfile.setInt32( "infobar_alpha", g_settings.infobar_alpha );
+ configfile.setInt32( "infobar_red", g_settings.infobar_red );
+ configfile.setInt32( "infobar_green", g_settings.infobar_green );
+ configfile.setInt32( "infobar_blue", g_settings.infobar_blue );
+ configfile.setInt32( "infobar_Text_alpha", g_settings.infobar_Text_alpha );
+ configfile.setInt32( "infobar_Text_red", g_settings.infobar_Text_red );
+ configfile.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
+ configfile.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
}
bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *)
diff --git a/tuxbox/neutrino/src/gui/themes.h b/tuxbox/neutrino/src/gui/themes.h
index f82015f..2148dcc 100644
--- a/tuxbox/neutrino/src/gui/themes.h
+++ b/tuxbox/neutrino/src/gui/themes.h
@@ -52,12 +52,15 @@ class CThemes : public CMenuTarget
void saveFile(char* themename);
void readThemes(CMenuWidget &);
void rememberOldTheme(bool remember);
+ void setupDefaultColors();
public:
CThemes(const neutrino_locale_t title = LOCALE_COLORTHEMEMENU_HEAD2, const char * const IconName = NEUTRINO_ICON_COLORS);
~CThemes();
- void setupDefaultColors();
int exec(CMenuTarget* parent, const std::string & actionKey);
+
+ static void getColors(CConfigFile &configfile);
+ static void setColors(CConfigFile &configfile);
};
#endif
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index ec360d9..6a1ebcb 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -107,6 +107,7 @@
#endif
#include "gui/rc_lock.h"
#include "gui/update.h"
+#include "gui/themes.h"
#include <system/setting_helpers.h>
#include <system/settings.h>
@@ -452,57 +453,9 @@ int CNeutrinoApp::loadSetup()
//widget settings
g_settings.widget_fade = configfile.getBool("widget_fade" , true );
- //colors (neutrino defaultcolors)
- g_settings.menu_Head_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 );
- g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
- g_settings.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A );
- g_settings.menu_Head_blue = configfile.getInt32( "menu_Head_blue", 0x19 );
-
- g_settings.menu_Head_Text_alpha = configfile.getInt32( "menu_Head_Text_alpha", 0x00 );
- g_settings.menu_Head_Text_red = configfile.getInt32( "menu_Head_Text_red", 0x5f );
- g_settings.menu_Head_Text_green = configfile.getInt32( "menu_Head_Text_green", 0x46 );
- g_settings.menu_Head_Text_blue = configfile.getInt32( "menu_Head_Text_blue", 0x00 );
-
- g_settings.menu_Content_alpha = configfile.getInt32( "menu_Content_alpha", 0x14 );
- g_settings.menu_Content_red = configfile.getInt32( "menu_Content_red", 0x00 );
- g_settings.menu_Content_green = configfile.getInt32( "menu_Content_green", 0x0f );
- g_settings.menu_Content_blue = configfile.getInt32( "menu_Content_blue", 0x23 );
-
- g_settings.menu_Content_Text_alpha = configfile.getInt32( "menu_Content_Text_alpha", 0x00 );
- g_settings.menu_Content_Text_red = configfile.getInt32( "menu_Content_Text_red", 0x64 );
- g_settings.menu_Content_Text_green = configfile.getInt32( "menu_Content_Text_green", 0x64 );
- g_settings.menu_Content_Text_blue = configfile.getInt32( "menu_Content_Text_blue", 0x64 );
-
- g_settings.menu_Content_Selected_alpha = configfile.getInt32( "menu_Content_Selected_alpha", 0x14 );
- g_settings.menu_Content_Selected_red = configfile.getInt32( "menu_Content_Selected_red", 0x19 );
- g_settings.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 0x37 );
- g_settings.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 0x64 );
-
- g_settings.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0x00 );
- g_settings.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0x00 );
- g_settings.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0x00 );
- g_settings.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0x00 );
-
- g_settings.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 0x14 );
- g_settings.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 0x00 );
- g_settings.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 0x0f );
- g_settings.menu_Content_inactive_blue = configfile.getInt32( "menu_Content_inactive_blue", 0x23 );
-
- g_settings.menu_Content_inactive_Text_alpha = configfile.getInt32( "menu_Content_inactive_Text_alpha", 0x00 );
- g_settings.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 55 );
- g_settings.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 70 );
- g_settings.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 85 );
-
- g_settings.infobar_alpha = configfile.getInt32( "infobar_alpha", 0x14 );
- g_settings.infobar_red = configfile.getInt32( "infobar_red", 0x00 );
- g_settings.infobar_green = configfile.getInt32( "infobar_green", 0x0e );
- g_settings.infobar_blue = configfile.getInt32( "infobar_blue", 0x23 );
-
- g_settings.infobar_Text_alpha = configfile.getInt32( "infobar_Text_alpha", 0x00 );
- g_settings.infobar_Text_red = configfile.getInt32( "infobar_Text_red", 0x64 );
- g_settings.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
- g_settings.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
-
+ //colors
+ CThemes::getColors(configfile);
+
//corners
g_settings.rounded_corners = configfile.getBool("rounded_corners", true);
@@ -1040,56 +993,8 @@ void CNeutrinoApp::saveSetup()
configfile.setBool("widget_fade" , g_settings.widget_fade);
//colors
- configfile.setInt32( "menu_Head_alpha", g_settings.menu_Head_alpha );
- configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
- configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
- configfile.setInt32( "menu_Head_blue", g_settings.menu_Head_blue );
-
- configfile.setInt32( "menu_Head_Text_alpha", g_settings.menu_Head_Text_alpha );
- configfile.setInt32( "menu_Head_Text_red", g_settings.menu_Head_Text_red );
- configfile.setInt32( "menu_Head_Text_green", g_settings.menu_Head_Text_green );
- configfile.setInt32( "menu_Head_Text_blue", g_settings.menu_Head_Text_blue );
-
- configfile.setInt32( "menu_Content_alpha", g_settings.menu_Content_alpha );
- configfile.setInt32( "menu_Content_red", g_settings.menu_Content_red );
- configfile.setInt32( "menu_Content_green", g_settings.menu_Content_green );
- configfile.setInt32( "menu_Content_blue", g_settings.menu_Content_blue );
-
- configfile.setInt32( "menu_Content_Text_alpha", g_settings.menu_Content_Text_alpha );
- configfile.setInt32( "menu_Content_Text_red", g_settings.menu_Content_Text_red );
- configfile.setInt32( "menu_Content_Text_green", g_settings.menu_Content_Text_green );
- configfile.setInt32( "menu_Content_Text_blue", g_settings.menu_Content_Text_blue );
-
- configfile.setInt32( "menu_Content_Selected_alpha", g_settings.menu_Content_Selected_alpha );
- configfile.setInt32( "menu_Content_Selected_red", g_settings.menu_Content_Selected_red );
- configfile.setInt32( "menu_Content_Selected_green", g_settings.menu_Content_Selected_green );
- configfile.setInt32( "menu_Content_Selected_blue", g_settings.menu_Content_Selected_blue );
-
- configfile.setInt32( "menu_Content_Selected_Text_alpha", g_settings.menu_Content_Selected_Text_alpha );
- configfile.setInt32( "menu_Content_Selected_Text_red", g_settings.menu_Content_Selected_Text_red );
- configfile.setInt32( "menu_Content_Selected_Text_green", g_settings.menu_Content_Selected_Text_green );
- configfile.setInt32( "menu_Content_Selected_Text_blue", g_settings.menu_Content_Selected_Text_blue );
-
- configfile.setInt32( "menu_Content_inactive_alpha", g_settings.menu_Content_inactive_alpha );
- configfile.setInt32( "menu_Content_inactive_red", g_settings.menu_Content_inactive_red );
- configfile.setInt32( "menu_Content_inactive_green", g_settings.menu_Content_inactive_green );
- configfile.setInt32( "menu_Content_inactive_blue", g_settings.menu_Content_inactive_blue );
-
- configfile.setInt32( "menu_Content_inactive_Text_alpha", g_settings.menu_Content_inactive_Text_alpha );
- configfile.setInt32( "menu_Content_inactive_Text_red", g_settings.menu_Content_inactive_Text_red );
- configfile.setInt32( "menu_Content_inactive_Text_green", g_settings.menu_Content_inactive_Text_green );
- configfile.setInt32( "menu_Content_inactive_Text_blue", g_settings.menu_Content_inactive_Text_blue );
-
- configfile.setInt32( "infobar_alpha", g_settings.infobar_alpha );
- configfile.setInt32( "infobar_red", g_settings.infobar_red );
- configfile.setInt32( "infobar_green", g_settings.infobar_green );
- configfile.setInt32( "infobar_blue", g_settings.infobar_blue );
-
- configfile.setInt32( "infobar_Text_alpha", g_settings.infobar_Text_alpha );
- configfile.setInt32( "infobar_Text_red", g_settings.infobar_Text_red );
- configfile.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
- configfile.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
-
+ CThemes::setColors(configfile);
+
//corners
configfile.setBool( "rounded_corners", g_settings.rounded_corners );
commit 57f9c8b8f10d219e7f8e654939e15f63a194b2a0
Author: GetAway <get...@t-...>
Date: Fri Sep 12 11:12:59 2014 +0200
Port CS-tuxmail SSL Support
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/plugins/tuxmail/daemon/Makefile.am b/tuxbox/plugins/tuxmail/daemon/Makefile.am
index 2cf1aa6..6cfc701 100644
--- a/tuxbox/plugins/tuxmail/daemon/Makefile.am
+++ b/tuxbox/plugins/tuxmail/daemon/Makefile.am
@@ -2,4 +2,4 @@ bin_PROGRAMS = tuxmaild
tuxmaild_SOURCES = tuxmaild.c
-tuxmaild_LDADD = -lpthread
+tuxmaild_LDADD = -lpthread -lssl -lcrypto
diff --git a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
index 65b34af..bd8de6a 100644
--- a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
+++ b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c
@@ -66,6 +66,7 @@ int ReadConf()
fprintf(fd_conf, "SUSER0=\n");
fprintf(fd_conf, "SPASS0=\n");
fprintf(fd_conf, "INBOX0=\n");
+ fprintf(fd_conf, "SSL0=0\n");
fclose(fd_conf);
@@ -251,6 +252,14 @@ int ReadConf()
sscanf(ptr + 7, "%s", account_db[index-'0'].inbox);
}
}
+ else if((ptr = strstr(line_buffer, "SSL")) && (*(ptr+4) == '='))
+ {
+ char index = *(ptr+3);
+ if((index >= '0') && (index <= '9'))
+ {
+ sscanf(ptr + 5, "%d", &account_db[index-'0'].ssl);
+ }
+ }
}
// check for update
@@ -359,6 +368,7 @@ int ReadConf()
fprintf(fd_conf, "SUSER%d=%s\n", loop, account_db[loop].suser);
fprintf(fd_conf, "SPASS%d=%s\n", loop, account_db[loop].spass);
fprintf(fd_conf, "INBOX%d=%s\n", loop, account_db[loop].inbox);
+ fprintf(fd_conf, "SSL%d=%d\n", loop, account_db[loop].ssl);
if(!account_db[loop + 1].name[0])
{
@@ -1444,7 +1454,7 @@ void writeFOut( char *s)
* SendPOPCommand (0=fail, 1=done)
******************************************************************************/
-int SendPOPCommand(int command, char *param)
+int SendPOPCommand(int command, char *param, int ssl)
{
struct hostent *server;
struct sockaddr_in SockAddr;
@@ -1511,6 +1521,48 @@ int SendPOPCommand(int command, char *param)
return 0;
}
+ if(ssl == 1)
+ {
+ // Init SSL struct
+ printf("TuxMailD <Init SSL for POP3>\n");
+ c = malloc (sizeof (connection));
+ c->sslHandle = NULL;
+ c->sslContext = NULL;
+
+ SSL_load_error_strings ();
+ SSL_library_init ();
+
+ c->sslContext = SSL_CTX_new (SSLv23_client_method ());
+ if (c->sslContext == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not set SSL client method") : printf("TuxMailD <could not set SSL client method>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ c->sslHandle = SSL_new (c->sslContext);
+ if (c->sslHandle == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not create SSL struct for the connection") : printf("TuxMailD <could not create SSL struct for the connection>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (!SSL_set_fd (c->sslHandle, sock)) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not connect SSL struct to the socket") : printf("TuxMailD <could not connect SSL struct to socket>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (SSL_connect (c->sslHandle) != 1) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not handle SSL handshake") : printf("TuxMailD <could not handle SSL handshake>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+ }
+
break;
case USER:
@@ -1583,7 +1635,10 @@ int SendPOPCommand(int command, char *param)
}
}
- send(sock, send_buffer, strlen(send_buffer), 0);
+ if(ssl == 1)
+ SSL_write (c->sslHandle, send_buffer, strlen(send_buffer));
+ else
+ send(sock, send_buffer, strlen(send_buffer), 0);
}
// get server response
@@ -1602,7 +1657,7 @@ int SendPOPCommand(int command, char *param)
if(command == RETR)
{
- while(recv(sock, &recv_buffer[3], 1, 0) > 0)
+ while((ssl == 1 ? SSL_read (c->sslHandle, &recv_buffer[3], 1) : recv(sock, &recv_buffer[3], 1, 0)) > 0)
{
if((nRead) && (nRead < 75000))
{
@@ -1611,8 +1666,8 @@ int SendPOPCommand(int command, char *param)
}
// scan for header-end
- if(!nRead && recv_buffer[3] == '\n' && recv_buffer[1] == '\n')
- {
+ if(!nRead && recv_buffer[3] == '\n' && recv_buffer[1] == '\n')
+ {
nRead++;
}
@@ -1630,7 +1685,7 @@ int SendPOPCommand(int command, char *param)
}
else
{
- while(recv(sock, &recv_buffer[stringindex], 1, 0) > 0)
+ while((ssl == 1 ? SSL_read (c->sslHandle, &recv_buffer[stringindex], 1) : recv(sock, &recv_buffer[stringindex], 1, 0)) > 0)
{
if(command == TOP)
{
@@ -1869,6 +1924,19 @@ int SendPOPCommand(int command, char *param)
case QUIT:
close(sock);
+
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+
+ free (c);
+ }
}
}
else
@@ -1882,6 +1950,19 @@ int SendPOPCommand(int command, char *param)
close(sock);
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+
+ free (c);
+ }
+
return 0;
}
@@ -1892,7 +1973,7 @@ int SendPOPCommand(int command, char *param)
* SendIMAPCommand (0=fail, 1=done)
******************************************************************************/
-int SendIMAPCommand(int command, char *param, char *param2)
+int SendIMAPCommand(int command, char *param, char *param2, int ssl)
{
struct hostent *server;
struct sockaddr_in SockAddr;
@@ -1959,6 +2040,48 @@ int SendIMAPCommand(int command, char *param, char *param2)
return 0;
}
+ if(ssl == 1)
+ {
+ // Init SSL struct
+ printf("TuxMailD <Init SSL for IMAP>\n");
+ c = malloc (sizeof (connection));
+ c->sslHandle = NULL;
+ c->sslContext = NULL;
+
+ SSL_load_error_strings ();
+ SSL_library_init ();
+
+ c->sslContext = SSL_CTX_new (SSLv23_client_method ());
+ if (c->sslContext == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not set SSL client method") : printf("TuxMailD <could not set SSL client method>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ c->sslHandle = SSL_new (c->sslContext);
+ if (c->sslHandle == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not create SSL struct for the connection") : printf("TuxMailD <could not create SSL struct for the connection>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (!SSL_set_fd (c->sslHandle, sock)) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not connect SSL struct to the socket") : printf("TuxMailD <could not connect SSL struct to socket>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (SSL_connect (c->sslHandle) != 1) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not handle SSL handshake") : printf("TuxMailD <could not handle SSL handshake>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+ }
+
break;
case LOGIN:
@@ -2053,7 +2176,10 @@ int SendIMAPCommand(int command, char *param, char *param2)
}
}
- send(sock, send_buffer, strlen(send_buffer), 0);
+ if(ssl == 1)
+ SSL_write (c->sslHandle, send_buffer, strlen(send_buffer));
+ else
+ send(sock, send_buffer, strlen(send_buffer), 0);
}
// get server response
@@ -2072,7 +2198,7 @@ int SendIMAPCommand(int command, char *param, char *param2)
if(command == RETR)
{
- while(recv(sock, &recv_buffer[stringindex], 1, 0) > 0)
+ while((ssl == 1 ? SSL_read (c->sslHandle, &recv_buffer[stringindex], 1) : recv(sock, &recv_buffer[stringindex], 1, 0)) > 0)
{
// read line by line
if((nRead) && (nRead < 75000))
@@ -2127,7 +2253,7 @@ int SendIMAPCommand(int command, char *param, char *param2)
}
else
{
- while(recv(sock, &recv_buffer[stringindex], 1, 0) > 0)
+ while((ssl == 1 ? SSL_read (c->sslHandle, &recv_buffer[stringindex], 1) : recv(sock, &recv_buffer[stringindex], 1, 0)) > 0)
{
// read line by line and end if leading character hast been '?' or after one line after INIT
if(recv_buffer[stringindex] == '\n')
@@ -2439,6 +2565,20 @@ int SendIMAPCommand(int command, char *param, char *param2)
case LOGOUT:
close(sock);
+
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+
+ free (c);
+ }
+
return 1;
default:
@@ -2448,6 +2588,19 @@ int SendIMAPCommand(int command, char *param, char *param2)
slog ? syslog(LOG_DAEMON | LOG_INFO, "IMAP Server (%s)", recv_buffer) : printf("TuxMailD <IMAP Server (%s)>\n", recv_buffer);
close(sock);
+
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+ free (c);
+ }
+
return 0;
}
@@ -2455,7 +2608,7 @@ int SendIMAPCommand(int command, char *param, char *param2)
* SendSMTPCommand (0=fail, 1=done)
******************************************************************************/
-int SendSMTPCommand(int command, char *param)
+int SendSMTPCommand(int command, char *param, int ssl)
{
FILE *fd_log;
static int sock;
@@ -2518,6 +2671,48 @@ int SendSMTPCommand(int command, char *param)
return 0;
}
+ if(ssl == 1)
+ {
+ // Init SSL struct
+ printf("TuxMailD <Init SSL for SMTP>\n");
+ c = malloc (sizeof (connection));
+ c->sslHandle = NULL;
+ c->sslContext = NULL;
+
+ SSL_load_error_strings ();
+ SSL_library_init ();
+
+ c->sslContext = SSL_CTX_new (SSLv23_client_method ());
+ if (c->sslContext == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not set SSL client method") : printf("TuxMailD <could not set SSL client method>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ c->sslHandle = SSL_new (c->sslContext);
+ if (c->sslHandle == NULL) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not create SSL struct for the connection") : printf("TuxMailD <could not create SSL struct for the connection>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (!SSL_set_fd (c->sslHandle, sock)) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not connect SSL struct to the socket") : printf("TuxMailD <could not connect SSL struct to socket>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+
+ if (SSL_connect (c->sslHandle) != 1) {
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "could not handle SSL handshake") : printf("TuxMailD <could not handle SSL handshake>\n");
+
+ ERR_print_errors_fp (stderr);
+ return 0;
+ }
+ }
+
break;
case EHLO:
@@ -2583,7 +2778,10 @@ int SendSMTPCommand(int command, char *param)
}
}
- send(sock, &send_buffer, strlen(send_buffer), 0);
+ if(ssl == 1)
+ SSL_write (c->sslHandle, &send_buffer, strlen(send_buffer));
+ else
+ send(sock, &send_buffer, strlen(send_buffer), 0);
}
// get server response
@@ -2596,7 +2794,10 @@ int SendSMTPCommand(int command, char *param)
return 1;
}
- recv(sock, &recv_buffer, sizeof(recv_buffer), 0);
+ if(ssl == 1)
+ SSL_read (c->sslHandle, &recv_buffer, sizeof(recv_buffer));
+ else
+ recv(sock, &recv_buffer, sizeof(recv_buffer), 0);
if(logging == 'Y')
{
@@ -2659,6 +2860,19 @@ int SendSMTPCommand(int command, char *param)
close(sock);
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+
+ free (c);
+ }
+
if(strncmp(recv_buffer, "221", 3))
{
return 0;
@@ -2685,11 +2899,22 @@ int SendSMTPCommand(int command, char *param)
}
}
- send(sock, &send_buffer, strlen(send_buffer), 0);
+ if(ssl == 1)
+ {
+ SSL_write (c->sslHandle, send_buffer, strlen(send_buffer));
- memset(recv_buffer, 0, sizeof(recv_buffer));
+ memset(recv_buffer, 0, sizeof(recv_buffer));
- recv(sock, &recv_buffer, sizeof(recv_buffer), 0);
+ SSL_read (c->sslHandle, &recv_buffer, sizeof(recv_buffer));
+ }
+ else
+ {
+ send(sock, &send_buffer, strlen(send_buffer), 0);
+
+ memset(recv_buffer, 0, sizeof(recv_buffer));
+
+ recv(sock, &recv_buffer, sizeof(recv_buffer), 0);
+ }
if(logging == 'Y')
{
@@ -2707,6 +2932,19 @@ int SendSMTPCommand(int command, char *param)
close(sock);
+ if(ssl == 1)
+ {
+ if (c->sslHandle)
+ {
+ SSL_shutdown (c->sslHandle);
+ SSL_free (c->sslHandle);
+ }
+ if (c->sslContext)
+ SSL_CTX_free (c->sslContext);
+
+ free (c);
+ }
+
return 0;
}
@@ -2739,7 +2977,7 @@ int SendMail(int account)
{
linebuffer[strlen(linebuffer) - 1] = '\0';
- if(!SendSMTPCommand(INIT, linebuffer))
+ if(!SendSMTPCommand(INIT, linebuffer, account_db[account].ssl))
{
fclose(mail);
@@ -2755,7 +2993,7 @@ int SendMail(int account)
{
linebuffer[strlen(linebuffer) - 1] = '\0';
- if(!SendSMTPCommand(EHLO, linebuffer))
+ if(!SendSMTPCommand(EHLO, linebuffer, account_db[account].ssl))
{
fclose(mail);
@@ -2781,7 +3019,7 @@ int SendMail(int account)
EncodeBase64(decodedstring, strlen(account_db[account].suser) + strlen(account_db[account].spass) + 2);
}
- if(!SendSMTPCommand(AUTH, encodedstring))
+ if(!SendSMTPCommand(AUTH, encodedstring, account_db[account].ssl))
{
fclose(mail);
@@ -2796,7 +3034,7 @@ int SendMail(int account)
{
linebuffer[strlen(linebuffer) - 1] = '\0';
- if(!SendSMTPCommand(MAIL, linebuffer))
+ if(!SendSMTPCommand(MAIL, linebuffer, account_db[account].ssl))
{
fclose(mail);
@@ -2812,7 +3050,7 @@ int SendMail(int account)
{
linebuffer[strlen(linebuffer) - 1] = '\0';
- if(!SendSMTPCommand(RCPT, linebuffer))
+ if(!SendSMTPCommand(RCPT, linebuffer, account_db[account].ssl))
{
fclose(mail);
@@ -2822,7 +3060,7 @@ int SendMail(int account)
// send data
- if(!SendSMTPCommand(DATA1, ""))
+ if(!SendSMTPCommand(DATA1, "", account_db[account].ssl))
{
fclose(mail);
@@ -2835,7 +3073,7 @@ int SendMail(int account)
{
linebuffer[strlen(linebuffer) - 1] = '\0';
- if(!SendSMTPCommand(DATA2, linebuffer))
+ if(!SendSMTPCommand(DATA2, linebuffer, account_db[account].ssl))
{
fclose(mail);
@@ -2845,7 +3083,7 @@ int SendMail(int account)
memset(linebuffer, 0, sizeof(linebuffer));
}
- if(!SendSMTPCommand(DATA3, ""))
+ if(!SendSMTPCommand(DATA3, "", account_db[account].ssl))
{
fclose(mail);
@@ -2854,7 +3092,7 @@ int SendMail(int account)
// send quit
- if(!SendSMTPCommand(QUIT, ""))
+ if(!SendSMTPCommand(QUIT, "", account_db[account].ssl))
{
fclose(mail);
@@ -2892,7 +3130,7 @@ int SaveMail(int account, char* mailuid)
if( !imap1 )
{
- if(!SendPOPCommand(INIT, account_db[account].pop3))
+ if(!SendPOPCommand(INIT, account_db[account].pop3, account_db[account].ssl))
{
if(fd_mail)
{
@@ -2902,7 +3140,7 @@ int SaveMail(int account, char* mailuid)
return 0;
}
- if(!SendPOPCommand(USER, account_db[account].user))
+ if(!SendPOPCommand(USER, account_db[account].user, account_db[account].ssl))
{
if(fd_mail)
{
@@ -2912,7 +3150,7 @@ int SaveMail(int account, char* mailuid)
return 0;
}
- if(!SendPOPCommand(PASS, account_db[account].pass))
+ if(!SendPOPCommand(PASS, account_db[account].pass, account_db[account].ssl))
{
if(fd_mail)
{
@@ -2922,7 +3160,7 @@ int SaveMail(int account, char* mailuid)
return 0;
}
- if(!SendPOPCommand(STAT, ""))
+ if(!SendPOPCommand(STAT, "", account_db[account].ssl))
{
if(fd_mail)
{
@@ -2934,7 +3172,7 @@ int SaveMail(int account, char* mailuid)
}
else
{
- if(!SendIMAPCommand(INIT, account_db[account].imap, ""))
+ if(!SendIMAPCommand(INIT, account_db[account].imap, "", account_db[account].ssl))
{
if(fd_mail)
{
@@ -2945,7 +3183,7 @@ int SaveMail(int account, char* mailuid)
}
// login to mail server
- if(!SendIMAPCommand(LOGIN, account_db[account].user, account_db[account].pass))
+ if(!SendIMAPCommand(LOGIN, account_db[account].user, account_db[account].pass, account_db[account].ssl))
{
if(fd_mail)
{
@@ -2956,7 +3194,7 @@ int SaveMail(int account, char* mailuid)
}
// select folder, get mail count and UID
- if(!SendIMAPCommand(SELECT, account_db[account].inbox, ""))
+ if(!SendIMAPCommand(SELECT, account_db[account].inbox, "", account_db[account].ssl))
{
if(fd_mail)
{
@@ -2977,7 +3215,7 @@ int SaveMail(int account, char* mailuid)
if( !imap1 )
{
- if(!SendPOPCommand(UIDL, mailnumber))
+ if(!SendPOPCommand(UIDL, mailnumber, account_db[account].ssl))
{
if(fd_mail)
{
@@ -2989,7 +3227,7 @@ int SaveMail(int account, char* mailuid)
}
else
{
- if(!SendIMAPCommand(UIDL, mailnumber, ""))
+ if(!SendIMAPCommand(UIDL, mailnumber, "", account_db[account].ssl))
{
if(fd_mail)
{
@@ -3007,7 +3245,7 @@ int SaveMail(int account, char* mailuid)
if( !imap1 )
{
- if(!SendPOPCommand(RETR, mailnumber))
+ if(!SendPOPCommand(RETR, mailnumber, account_db[account].ssl))
{
if(fd_mail)
{
@@ -3018,12 +3256,12 @@ int SaveMail(int account, char* mailuid)
}
fclose(fd_mail);
- SendPOPCommand(QUIT, "");
+ SendPOPCommand(QUIT, "", account_db[account].ssl);
}
else
{
char seen = 0;
- if(!SendIMAPCommand(FLAGS, mailnumber, &seen))
+ if(!SendIMAPCommand(FLAGS, mailnumber, &seen, account_db[account].ssl))
{
if(fd_mail)
{
@@ -3033,7 +3271,7 @@ int SaveMail(int account, char* mailuid)
return 0;
}
- if((!seen) || (!SendIMAPCommand(RETR, mailnumber, "")))
+ if((!seen) || (!SendIMAPCommand(RETR, mailnumber, "", account_db[account].ssl)))
{
if(fd_mail)
{
@@ -3045,7 +3283,7 @@ int SaveMail(int account, char* mailuid)
if( seen == 'U' )
{
- if(!SendIMAPCommand(UNSEEN, mailnumber, ""))
+ if(!SendIMAPCommand(UNSEEN, mailnumber, "", account_db[account].ssl))
{
if(fd_mail)
{
@@ -3057,7 +3295,7 @@ int SaveMail(int account, char* mailuid)
}
fclose(fd_mail);
- SendIMAPCommand(LOGOUT, "", "");
+ SendIMAPCommand(LOGOUT, "", "", account_db[account].ssl);
}
return 1;
@@ -3068,11 +3306,11 @@ int SaveMail(int account, char* mailuid)
if( !imap1 )
{
- SendPOPCommand(QUIT, "");
+ SendPOPCommand(QUIT, "", account_db[account].ssl);
}
else
{
- SendIMAPCommand(LOGOUT, "", "");
+ SendIMAPCommand(LOGOUT, "", "", account_db[account].ssl);
}
}
@@ -3331,7 +3569,7 @@ int AddNewMailFile(int account, char *mailnumber, FILE *fd_status)
{
if( !imap )
{
- if(!SendPOPCommand(RETR, mailnumber))
+ if(!SendPOPCommand(RETR, mailnumber, account_db[account].ssl))
{
idx1 = 0;
fclose(fd_mail);
@@ -3348,12 +3586,12 @@ int AddNewMailFile(int account, char *mailnumber, FILE *fd_status)
{
char seen=0;
- if(!SendIMAPCommand(FLAGS, mailnumber, &seen))
+ if(!SendIMAPCommand(FLAGS, mailnumber, &seen, account_db[account].ssl))
{
seen=0;
}
- if((!seen) || (!SendIMAPCommand(RETR, mailnumber, "")))
+ if((!seen) || (!SendIMAPCommand(RETR, mailnumber, "", account_db[account].ssl)))
{
// printf("error write email nr: %s at %stuxmail.idx%u.%u\n",mailnumber,maildir,account,idx1);
idx1 = 0;
@@ -3364,7 +3602,7 @@ int AddNewMailFile(int account, char *mailnumber, FILE *fd_status)
// printf("write email nr: %s at %stuxmail.idx%u.%u\n",mailnumber,maildir,account,idx1);
if( seen == 'U' )
{
- SendIMAPCommand(UNSEEN, mailnumber, "");
+ SendIMAPCommand(UNSEEN, mailnumber, "", account_db[account].ssl);
}
fclose(fd_mail);
@@ -3429,19 +3667,19 @@ int CheckAccount(int account)
imap = 1;
// init connection to server
- if(!SendIMAPCommand(INIT, account_db[account].imap, ""))
+ if(!SendIMAPCommand(INIT, account_db[account].imap, "", account_db[account].ssl))
{
return 0;
}
// login to mail server
- if(!SendIMAPCommand(LOGIN, account_db[account].user, account_db[account].pass))
+ if(!SendIMAPCommand(LOGIN, account_db[account].user, account_db[account].pass, account_db[account].ssl))
{
return 0;
}
// select folder, get mail count and UID
- if(!SendIMAPCommand(SELECT, account_db[account].inbox, ""))
+ if(!SendIMAPCommand(SELECT, account_db[account].inbox, "", account_db[account].ssl))
{
return 0;
}
@@ -3449,27 +3687,27 @@ int CheckAccount(int account)
else
{
// get mail count
- if(!SendPOPCommand(INIT, account_db[account].pop3))
+ if(!SendPOPCommand(INIT, account_db[account].pop3, account_db[account].ssl))
{
return 0;
}
- if(!SendPOPCommand(USER, account_db[account].user))
+ if(!SendPOPCommand(USER, account_db[account].user, account_db[account].ssl))
{
return 0;
}
- if(!SendPOPCommand(PASS, account_db[account].pass))
+ if(!SendPOPCommand(PASS, account_db[account].pass, account_db[account].ssl))
{
return 0;
}
- if(!SendPOPCommand(STAT, ""))
+ if(!SendPOPCommand(STAT, "", account_db[account].ssl))
{
return 0;
}
- if(!SendPOPCommand(RSET, ""))
+ if(!SendPOPCommand(RSET, "", account_db[account].ssl))
{
return 0;
}
@@ -3543,7 +3781,7 @@ int CheckAccount(int account)
if( !imap )
{
- if(!SendPOPCommand(UIDL, mailnumber))
+ if(!SendPOPCommand(UIDL, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3557,7 +3795,7 @@ int CheckAccount(int account)
}
else
{
- if(!SendIMAPCommand(UIDL, mailnumber, ""))
+ if(!SendIMAPCommand(UIDL, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3574,7 +3812,7 @@ int CheckAccount(int account)
{
if( !imap )
{
- if(!SendPOPCommand(TOP, mailnumber))
+ if(!SendPOPCommand(TOP, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3589,7 +3827,7 @@ int CheckAccount(int account)
else
{
char seen;
- if(!SendIMAPCommand(FLAGS, mailnumber, &seen))
+ if(!SendIMAPCommand(FLAGS, mailnumber, &seen, account_db[account].ssl))
{
free(known_uids);
@@ -3601,7 +3839,7 @@ int CheckAccount(int account)
return 0;
}
- if(!SendIMAPCommand(FETCH, mailnumber, ""))
+ if(!SendIMAPCommand(FETCH, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3615,7 +3853,7 @@ int CheckAccount(int account)
if( seen == 'U' )
{
- if(!SendIMAPCommand(UNSEEN, mailnumber, ""))
+ if(!SendIMAPCommand(UNSEEN, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3635,7 +3873,7 @@ int CheckAccount(int account)
if( !imap )
{
- if(!SendPOPCommand(DELE, mailnumber))
+ if(!SendPOPCommand(DELE, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3649,7 +3887,7 @@ int CheckAccount(int account)
}
else
{
- if(!SendIMAPCommand(DELE, mailnumber, ""))
+ if(!SendIMAPCommand(DELE, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3689,7 +3927,7 @@ int CheckAccount(int account)
{
if( !imap )
{
- if(!SendPOPCommand(DELE, mailnumber))
+ if(!SendPOPCommand(DELE, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3703,7 +3941,7 @@ int CheckAccount(int account)
}
else
{
- if(!SendIMAPCommand(DELE, mailnumber, ""))
+ if(!SendIMAPCommand(DELE, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3756,7 +3994,7 @@ int CheckAccount(int account)
{
if( !imap )
{
- if(!SendPOPCommand(TOP, mailnumber))
+ if(!SendPOPCommand(TOP, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3771,7 +4009,7 @@ int CheckAccount(int account)
else
{
char seen;
- if(!SendIMAPCommand(FLAGS, mailnumber, &seen))
+ if(!SendIMAPCommand(FLAGS, mailnumber, &seen, account_db[account].ssl))
{
free(known_uids);
@@ -3783,7 +4021,7 @@ int CheckAccount(int account)
return 0;
}
- if(!SendIMAPCommand(FETCH, mailnumber, ""))
+ if(!SendIMAPCommand(FETCH, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3797,7 +4035,7 @@ int CheckAccount(int account)
if( seen == 'U' )
{
- if(!SendIMAPCommand(UNSEEN, mailnumber, ""))
+ if(!SendIMAPCommand(UNSEEN, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3815,7 +4053,7 @@ int CheckAccount(int account)
{
if( !imap )
{
- if(!SendPOPCommand(DELE, mailnumber))
+ if(!SendPOPCommand(DELE, mailnumber, account_db[account].ssl))
{
free(known_uids);
@@ -3829,7 +4067,7 @@ int CheckAccount(int account)
}
else
{
- if(!SendIMAPCommand(DELE, mailnumber, ""))
+ if(!SendIMAPCommand(DELE, mailnumber, "", account_db[account].ssl))
{
free(known_uids);
@@ -3934,7 +4172,7 @@ int CheckAccount(int account)
if(( !deleted_messages ) && ( !imap ))
{
- if(!SendPOPCommand(RSET, ""))
+ if(!SendPOPCommand(RSET, "", account_db[account].ssl))
{
return 0;
}
@@ -3979,22 +4217,22 @@ int CheckAccount(int account)
if( !imap )
{
- if(!SendPOPCommand(QUIT, ""))
+ if(!SendPOPCommand(QUIT, "", account_db[account].ssl))
{
return 0;
}
}
else
{
- if(!SendIMAPCommand(EXPUNGE, "", ""))
+ if(!SendIMAPCommand(EXPUNGE, "", "", account_db[account].ssl))
{
return 0;
}
- if(!SendIMAPCommand(CLOSE, "", ""))
+ if(!SendIMAPCommand(CLOSE, "", "", account_db[account].ssl))
{
return 0;
}
- if(!SendIMAPCommand(LOGOUT, "", ""))
+ if(!SendIMAPCommand(LOGOUT, "", "", account_db[account].ssl))
{
return 0;
}
@@ -4556,7 +4794,7 @@ void SigHandler(int signal)
int main(int argc, char **argv)
{
- char cvs_revision[] = "$Revision: 1.51 $";
+ char cvs_revision[] = "$Revision: 1.51A $";
int param, nodelay = 0, account, mailstatus, unread_mailstatus;
pthread_t thread_id;
void *thread_result = 0;
@@ -4671,7 +4909,7 @@ int main(int argc, char **argv)
{
case 0:
- slog ? syslog(LOG_DAEMON | LOG_INFO, "%s started [%s]", versioninfo, timeinfo) : printf("TuxMailD %s started [%s]\n", versioninfo, timeinfo);
+ slog ? syslog(LOG_DAEMON | LOG_INFO, "%s started [%s]", versioninfo, timeinfo) : printf("TuxMailD %s (with SSL support) started [%s]\n", versioninfo, timeinfo);
setsid();
chdir("/");
diff --git a/tuxbox/plugins/tuxmail/daemon/tuxmaild.h b/tuxbox/plugins/tuxmail/daemon/tuxmaild.h
index 9a30e63..06c024f 100644
--- a/tuxbox/plugins/tuxmail/daemon/tuxmaild.h
+++ b/tuxbox/plugins/tuxmail/daemon/tuxmaild.h
@@ -21,6 +21,10 @@
#include <arpa/inet.h>
#include <syslog.h>
+#include <openssl/rand.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+
#include "audio.h"
#define DSP "/dev/sound/dsp"
@@ -157,6 +161,7 @@ struct
int mail_new;
int mail_unread;
int mail_read;
+ int ssl;
}account_db[10];
@@ -195,6 +200,14 @@ struct CHUNK
unsigned long ChunkSize;
};
+// SSL
+typedef struct {
+ SSL *sslHandle;
+ SSL_CTX *sslContext;
+} connection;
+
+connection *c;
+
// some data
char versioninfo[12];
diff --git a/tuxbox/plugins/tuxmail/tuxmail.c b/tuxbox/plugins/tuxmail/tuxmail.c
index 204bce1..42abecc 100644
--- a/tuxbox/plugins/tuxmail/tuxmail.c
+++ b/tuxbox/plugins/tuxmail/tuxmail.c
@@ -201,6 +201,14 @@ void ReadConf()
sscanf(ptr + 7, "%s", maildb[index-'0'].inbox);
}
}
+ else if ( ( ptr = strstr ( line_buffer, "SSL" ) ) && ( * ( ptr+4 ) == '=' ) )
+ {
+ char index = * ( ptr+3 );
+ if ( ( index >= '0' ) && ( index <= '9' ) )
+ {
+ sscanf ( ptr + 5, "%d", &maildb[index-'0'].ssl );
+ }
+ }
}
fclose(fd_conf);
@@ -287,6 +295,7 @@ int WriteConf()
fprintf(fd_conf, "SUSER%d=%s\n", loop, maildb[loop].suser);
fprintf(fd_conf, "SPASS%d=%s\n", loop, maildb[loop].spass);
fprintf(fd_conf, "INBOX%d=%s\n", loop, maildb[loop].inbox);
+ fprintf(fd_conf, "SSL%d=%d\n", loop, maildb[loop].ssl );
if(!maildb[loop + 1].user[0])
{
break;
@@ -1459,7 +1468,7 @@ void PaintSmtpMailHeader( int nEditDirectStyle , int nConfigPage)
RenderString(linebuffer, 2*BORDERSIZE+380, BORDERSIZE+3*FONTHEIGHT_SMALL-6 , VIEWX-4*BORDERSIZE, LEFT, NORMAL, WHITE);
int i;
- for( i=2; i<14; i++)
+ for( i=2; i<15; i++)
{
switch( i )
{
@@ -1515,6 +1524,13 ...
[truncated message content] |
|
From: Thilo G. <tux...@ne...> - 2014-10-03 17:18:30
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via 038bf2347a8002bb80b7be4c5ffb54f40128fdc9 (commit)
via fe58be38a0665f257042caa965997815dda83e39 (commit)
via 879ea422a359f35b81592e0f3e2fcb3bb3e88005 (commit)
via 7a705bae8fde96084aef551eff5675a425676a8c (commit)
from c5ac465d346eba22f3797977d8a8e7786c7978c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 038bf2347a8002bb80b7be4c5ffb54f40128fdc9
Author: GetAway <get...@t-...>
Date: Fri Sep 12 11:11:04 2014 +0200
Port CS-tuxmail SSL Support
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/configure.ac b/configure.ac
index fa84317..d000f97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -784,6 +784,12 @@ AM_CONDITIONAL(ENABLE_WGET,test "$enable_wget" = "yes")
AC_ARG_WITH(ssl,
AS_HELP_STRING(--with-ssl,build image with OpenSSL - use it for standalone wget & links),
[enable_ssl="$withval"],[enable_ssl=no])
+if test "$enable_tuxmail" = "yes"; then
+ if test "$enable_ssl" = "no"; then
+ summary_plugins="/ tuxmail"
+ fi
+ enable_ssl=yes
+fi
AM_CONDITIONAL(ENABLE_SSL,test "$enable_ssl" = "yes")
AC_ARG_ENABLE(enigma-dbswitch,
@@ -1795,7 +1801,7 @@ Neutrino EPG plus $enable_epgplus
Radiotext support: $enable_radiotext
FLAC support: $enable_flac
CURL version: $with_curlversion
-OpenSSL: $enable_ssl
+OpenSSL: $enable_ssl $summary_plugins
German keymaps: $enable_german_keymaps
aformat $enable_aformat
diff --git a/make/plugins.mk b/make/plugins.mk
index f00b57f..900b2aa 100644
--- a/make/plugins.mk
+++ b/make/plugins.mk
@@ -17,11 +17,11 @@ $(targetprefix)/lib/pkgconfig/tuxbox-plugins.pc: $(appsdir)/tuxbox/plugins/confi
$(MAKE) -C $(appsdir)/tuxbox/plugins/include install
cp $(appsdir)/tuxbox/plugins/tuxbox-plugins.pc $(targetprefix)/lib/pkgconfig/tuxbox-plugins.pc
-tuxmail: $(appsdir)/tuxbox/plugins/config.status
+tuxmail: libcrypto $(appsdir)/tuxbox/plugins/config.status
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxmail all
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxmail install
-flash-tuxmail: $(appsdir)/tuxbox/plugins/config.status | $(flashprefix)/root
+flash-tuxmail: libcrypto $(appsdir)/tuxbox/plugins/config.status | $(flashprefix)/root
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxmail all prefix=$(flashprefix)/root
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxmail install prefix=$(flashprefix)/root
@FLASHROOTDIR_MODIFIED@
commit fe58be38a0665f257042caa965997815dda83e39
Author: rhabarber1848 <rha...@cv...>
Date: Wed Sep 10 10:21:29 2014 +0200
optional ssl for wget and links bump version openssl-0.9.8zb
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/Patches/libcrypto.diff b/Patches/libcrypto.diff
index 4786c0c..4086e81 100644
--- a/Patches/libcrypto.diff
+++ b/Patches/libcrypto.diff
@@ -1,76 +1,71 @@
-diff -u openssl-0.9.7d.old/Configure openssl-0.9.7d.new/Configure
---- openssl-0.9.7d.old/Configure 2004-03-12 22:24:44.000000000 +0100
-+++ openssl-0.9.7d.new/Configure 2004-05-13 19:05:38.000000000 +0200
-@@ -557,6 +557,9 @@
+diff -u -pr openssl-0.9.8zb-orig/Configure openssl-0.9.8zb-mod/Configure
+--- openssl-0.9.8zb-orig/Configure 2014-08-06 23:27:40.000000000 +0200
++++ openssl-0.9.8zb-mod/Configure 2014-09-09 14:39:16.000000000 +0200
+@@ -546,6 +546,9 @@ my %table=(
##### OS/2 EMX
"OS2-EMX", "gcc::::::::",
+##### Tuxbox
-+"tuxbox", "__TUXBOX_CC__:-DB_ENDIAN -DTERMIO __TUXBOX_CFLAGS__ -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"tuxbox", "__TUXBOX_CC__:-DB_ENDIAN -DTERMIO __TUXBOX_CFLAGS__ -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
##### VxWorks for various targets
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
---- openssl-0.9.7d.old/Makefile.org 2004-03-12 22:33:04.000000000 +0100
-+++ openssl-0.9.7d.new/Makefile.org 2004-05-13 19:10:12.000000000 +0200
-@@ -173,7 +173,7 @@
- # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
- SHLIB_MARK=
+Nur in openssl-0.9.8zb-mod: Configure.orig.
+diff -u -pr openssl-0.9.8zb-orig/Makefile.org openssl-0.9.8zb-mod/Makefile.org
+--- openssl-0.9.8zb-orig/Makefile.org 2014-08-06 23:27:40.000000000 +0200
++++ openssl-0.9.8zb-mod/Makefile.org 2014-09-09 14:50:18.000000000 +0200
+@@ -132,8 +132,8 @@ FIPSCANLIB=
--DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
+ BASEADDR=
+
+-DIRS= crypto fips ssl engines apps test tools
+-SHLIBDIRS= crypto ssl fips
+DIRS= crypto ssl
- SHLIBDIRS= fips crypto ssl
++SHLIBDIRS= crypto ssl
# dirs in crypto to build
-@@ -883,4 +883,51 @@
+ SDIRS= \
+@@ -727,4 +727,42 @@ install_docs:
done); \
done
+install_cdk:
-+ @mkdir -p \
-+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
-+ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
-+ $(INSTALL_PREFIX)$(OPENSSLDIR)/lib
-+ @for i in $(EXHEADER) ;\
++ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl
++ @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
+ do \
+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ done;
-+ @for i in $(DIRS) ;\
-+ do \
-+ if [ -d "$$i" ]; then \
-+ (cd $$i; echo "installing $$i..."; \
-+ $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
-+ fi; \
-+ done
-+ @for i in $(LIBS) ;\
++ @set -e; target=install; $(RECURSIVE_BUILD_CMD)
++ @set -e; for i in $(LIBS) ;\
+ do \
+ if [ -f "$$i" ]; then \
+ ( echo installing $$i; \
-+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-+ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
-+ j=$$(echo $$i | sed -e 's/\.a//'); ln -sf $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$j.a $$j_pic.a ); \
++ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
+ fi; \
+ done;
-+ @if [ -n "$(SHARED_LIBS)" ]; then \
++ @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
+ tmp="$(SHARED_LIBS)"; \
+ for i in $${tmp:-x}; \
+ do \
+ if [ -f "$$i" -o -f "$$i.a" ]; then \
+ ( echo installing $$i; \
-+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
-+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
++ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
+ fi; \
+ done; \
+ ( here="`pwd`"; \
-+ cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
-+ set $(MAKE); \
-+ $$1 -f $$here/Makefile link-shared ); \
++ cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
++ $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
+ fi
-+ cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
-+
+
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/configure.ac b/configure.ac
index a75a288..fa84317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -781,6 +781,11 @@ AC_ARG_WITH(wget,
[enable_wget="$withval"],[enable_wget=no])
AM_CONDITIONAL(ENABLE_WGET,test "$enable_wget" = "yes")
+AC_ARG_WITH(ssl,
+ AS_HELP_STRING(--with-ssl,build image with OpenSSL - use it for standalone wget & links),
+ [enable_ssl="$withval"],[enable_ssl=no])
+AM_CONDITIONAL(ENABLE_SSL,test "$enable_ssl" = "yes")
+
AC_ARG_ENABLE(enigma-dbswitch,
AS_HELP_STRING(--disable-enigma-dbswitch,disable Enigma dbswitch),
,[enable_enigma_dbswitch=yes])
@@ -1790,6 +1795,7 @@ Neutrino EPG plus $enable_epgplus
Radiotext support: $enable_radiotext
FLAC support: $enable_flac
CURL version: $with_curlversion
+OpenSSL: $enable_ssl
German keymaps: $enable_german_keymaps
aformat $enable_aformat
diff --git a/make/contrib-apps.mk b/make/contrib-apps.mk
index 5ca2fe6..6f799e6 100644
--- a/make/contrib-apps.mk
+++ b/make/contrib-apps.mk
@@ -7,6 +7,16 @@ contrib_apps: bzip2 console_data kbd fbset lirc lsof dropbear ssh tcpdump bonnie
CONTRIB_DEPSCLEANUP = rm -f .deps/bzip2 .deps/console_data .deps/kbd .deps/directfb_examples .deps/fbset .deps/lirc .deps/lsof .deps/ssh .deps/tcpdump .deps/bonnie .deps/vdr .deps/lufs .deps/dropbear .deps/kermit .deps/wget .deps/ncftp .deps/screen .deps/lzma .deps/lzma_host .deps/ntpd .deps/ntpclient .deps/links .deps/links_g .deps/esound .deps/openntpd .deps/python .deps/ser2net .deps/ipkg .deps/openvpn .deps/htop .deps/netio .deps/netio_host
+if ENABLE_SSL
+SSL_DEPS=libcrypto
+SSL_WGET_OPTS=--with-ssl=openssl
+SSL_LINKS_OPTS=--with-ssl=$(targetprefix)
+else
+SSL_DEPS=
+SSL_WGET_OPTS=--without-ssl
+SSL_LINKS_OPTS=--without-ssl
+endif
+
#bzip2
$(DEPDIR)/bzip2: bootstrap @DEPENDS_bzip2@
@PREPARE_bzip2@
@@ -364,7 +374,7 @@ $(DEPDIR)/kermit: bootstrap @DEPENDS_kermit@ libcrypto Patches/kermit.diff
touch $@
#wget
-$(DEPDIR)/wget: bootstrap @DEPENDS_wget@
+$(DEPDIR)/wget: bootstrap libz $(SSL_DEPS) @DEPENDS_wget@
@PREPARE_wget@
cd @DIR_wget@ && \
$(BUILDENV) \
@@ -375,6 +385,7 @@ $(DEPDIR)/wget: bootstrap @DEPENDS_wget@
--disable-nls \
--disable-opie \
--disable-digest \
+ $(SSL_WGET_OPTS) \
--prefix=&& \
$(MAKE) all && \
@INSTALL_wget@
@@ -486,7 +497,7 @@ $(flashprefix)/root/bin/links: $(DEPDIR)/links | $(flashprefix)/root
$(INSTALL) $(targetprefix)/bin/links $(flashprefix)/root/bin
@FLASHROOTDIR_MODIFIED@
-$(DEPDIR)/links_g: bootstrap libdirectfb kb2rcd links-plugin @DEPENDS_links_g@
+$(DEPDIR)/links_g: bootstrap libdirectfb kb2rcd links-plugin $(SSL_DEPS) @DEPENDS_links_g@
@PREPARE_links_g@
cd @DIR_links_g@ && \
$(BUILDENV_BIN) \
@@ -496,6 +507,7 @@ $(DEPDIR)/links_g: bootstrap libdirectfb kb2rcd links-plugin @DEPENDS_links_g@
--prefix= \
--enable-graphics \
--without-x \
+ $(SSL_LINKS_OPTS) \
--oldincludedir=$(targetprefix)/include:$(targetprefix)/include/directfb && \
$(MAKE) all && \
@INSTALL_links_g@
diff --git a/make/contrib-libs.mk b/make/contrib-libs.mk
index 95acb47..a4fc7a3 100644
--- a/make/contrib-libs.mk
+++ b/make/contrib-libs.mk
@@ -42,20 +42,23 @@ $(DEPDIR)/libcommoncplusplus: bootstrap libxml2 @DEPENDS_libcommoncplusplus@
@CLEANUP_libcommoncplusplus@
touch $@
-if !ENABLE_OPENVPN
-OPENVPN_NOMD4=no-md4
-endif
-$(DEPDIR)/libcrypto: bootstrap @DEPENDS_libcrypto@
+$(DEPDIR)/libcrypto: bootstrap libz @DEPENDS_libcrypto@
@PREPARE_libcrypto@
cd @DIR_libcrypto@ && \
sed -e 's|__TUXBOX_CC__|$(target)-gcc|' -e 's|__TUXBOX_CFLAGS__|$(TARGET_CFLAGS)|' ./Configure > ./Configure.tuxbox && \
$(BUILDENV) \
- sh ./Configure.tuxbox shared no-hw no-idea no-md2 $(OPENVPN_NOMD4) no-mdc2 no-rc2 no-rc5 tuxbox --prefix=/ --openssldir=/ && \
- $(MAKE) depend && \
- $(MAKE) all && \
+ sh ./Configure.tuxbox \
+ -DOPENSSL_SMALL_FOOTPRINT \
+ shared no-ec no-err no-engine no-hw zlib-dynamic \
+ no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-smime \
+ no-rmd160 no-aes192 no-ripemd no-camellia no-ans1 no-krb5 \
+ tuxbox --prefix=/ --openssldir=/ && \
+ $(MAKE) depend MAKEDEPPROG=$(target)-gcc ZLIB_INCLUDE="-I$(targetprefix)/include" && \
+ $(MAKE) -j1 all && \
@INSTALL_libcrypto@
- rm -f $(targetprefix)/lib/pkgconfig/openssl.pc && \
sed -e "s,^prefix=,prefix=$(targetprefix)," < @DIR_libcrypto@/openssl.pc > $(targetprefix)/lib/pkgconfig/openssl.pc && \
+ sed -e "s,^prefix=,prefix=$(targetprefix)," < @DIR_libcrypto@/libcrypto.pc > $(targetprefix)/lib/pkgconfig/libcrypto.pc && \
+ sed -e "s,^prefix=,prefix=$(targetprefix)," < @DIR_libcrypto@/libssl.pc > $(targetprefix)/lib/pkgconfig/libssl.pc && \
@CLEANUP_libcrypto@
touch $@
diff --git a/rules-archive b/rules-archive
index a4e9f5e..e347057 100644
--- a/rules-archive
+++ b/rules-archive
@@ -69,7 +69,7 @@ squashfs2.2r2.tar.gz;http://prdownloads.sourceforge.net/sourceforge/squashfs
#
# contrib libs
#
-openssl-0.9.7e.tar.gz;http://www.openssl.org/source
+openssl-0.9.8zb.tar.gz;http://www.openssl.org/source
curl-7.10.1.tar.gz;http://curl.haxx.se/download/archeology
curl-7.20.0.tar.bz2;http://curl.haxx.se/download
freetype-2.3.12.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/freetype
@@ -124,7 +124,7 @@ dropbear-0.52.tar.bz2;http://www.ucc.asn.au/~matt/dropbear/releases
cku211.tar.gz;ftp://kermit.columbia.edu/kermit/archives
libtool-1.5.22.tar.gz;ftp://ftp.gnu.org/gnu/libtool
samba-2.0.10.tar.gz;http://samba.org/samba/ftp/old-versions
-wget-1.11.4.tar.bz2;http://ftp.gnu.org/pub/gnu/wget
+wget-1.13.4.tar.bz2;http://ftp.gnu.org/pub/gnu/wget
ncftp-3.2.2-src.tar.bz2;ftp://ftp.ncftp.com/ncftp
screen-4.0.3.tar.gz;ftp://ftp.gnu.org/pub/gnu/screen
links-1.00.tar.gz;http://www.jikos.cz/~mikulas/links//download
diff --git a/rules-install b/rules-install
index 14b6577..b926228 100644
--- a/rules-install
+++ b/rules-install
@@ -53,7 +53,7 @@ udev;make:install:DESTDIR=TARGET
# contrib libs
#
libboost;remove:TARGET/include/boost;move:boost:TARGET/include/boost
-libcrypto;install:libcrypto.a:TARGET/lib/libcrypto_pic.a;install:libssl.a:TARGET/lib/libssl_pic.a;make:install_cdk:INSTALL_PREFIX=TARGET:INSTALLTOP=
+libcrypto;install:libcrypto.a:TARGET/lib/libcrypto_pic.a;install:libssl.a:TARGET/lib/libssl_pic.a;make:install_cdk:INSTALL_PREFIX=TARGET:INSTALLTOP=/
libcurl;make:install:DESTDIR=TARGET;archive:TARGET/lib/libcurl_pic.a:lib/*.lo;rewrite-libtool:TARGET/lib/libcurl.la
libcurl_current;make:install:DESTDIR=TARGET;archive:TARGET/lib/libcurl_pic.a:lib/*.o;rewrite-libtool:TARGET/lib/libcurl.la
libcommoncplusplus;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libccext2.la;rewrite-libtool:TARGET/lib/libccgnu2.la
diff --git a/rules-make b/rules-make
index a2a01d7..fd562a8 100644
--- a/rules-make
+++ b/rules-make
@@ -62,7 +62,7 @@ squashfs;3.0;mksquashfs;squashfs3.0.tar.gz:mksquashfs_lzma.diff:lzma442.tar.bz2:
#
libboost;boost-1.53.0;boost_1_53_0;boost_1_53_0.tar.bz2;extract:boost_1_53_0.tar.bz2
libcommoncplusplus;1.0.13;commoncpp2-1.0.13;commoncpp2-1.0.13.tar.gz:libcommoncplusplus.diff;extract:commoncpp2-1.0.13.tar.gz;patch:libcommoncplusplus.diff
-libcrypto;0.9.7e;openssl-0.9.7e;openssl-0.9.7e.tar.gz:libcrypto.diff;extract:openssl-0.9.7e.tar.gz;patch:libcrypto.diff
+libcrypto;0.9.8zb;openssl-0.9.8zb;openssl-0.9.8zb.tar.gz:libcrypto.diff;extract:openssl-0.9.8zb.tar.gz;patch:libcrypto.diff
libcurl;7.10.1;curl-7.10.1;curl-7.10.1.tar.gz:libcurl.diff;extract:curl-7.10.1.tar.gz;patch:libcurl.diff
libcurl_current;7.20.0;curl-7.20.0;curl-7.20.0.tar.bz2;extract:curl-7.20.0.tar.bz2
libdirectfb;1.0.0;DirectFB-1.0.0;DirectFB-1.0.0.tar.gz:libdirectfb.diff;extract:DirectFB-1.0.0.tar.gz;patch:libdirectfb.diff
@@ -116,7 +116,7 @@ dropbear;0.52;dropbear-0.52;dropbear-0.52.tar.bz2:dropbear-nopass.diff:dropbear-
kermit;8.0;c-kermit-8.0;cku211.tar.gz;dirextract:cku211.tar.gz;patch:kermit.diff
libtool;1.5.22;libtool-1.5.22;libtool-1.5.22.tar.gz;extract:libtool-1.5.22.tar.gz
samba;2.0.10;samba-2.0.10;samba-2.0.10.tar.gz:samba_ppc.diff;extract:samba-2.0.10.tar.gz;patch:samba_ppc.diff
-wget;1.11.4;wget-1.11.4;wget-1.11.4.tar.bz2;extract:wget-1.11.4.tar.bz2
+wget;1.13.4;wget-1.13.4;wget-1.13.4.tar.bz2;extract:wget-1.13.4.tar.bz2
ncftp;3.2.2;ncftp-3.2.2;ncftp-3.2.2-src.tar.bz2;extract:ncftp-3.2.2-src.tar.bz2
screen;4.0.3;screen-4.0.3;screen-4.0.3.tar.gz:screen.diff;extract:screen-4.0.3.tar.gz;patch:screen.diff
links;1.0;links-1.00;links-1.00.tar.gz;extract:links-1.00.tar.gz
commit 879ea422a359f35b81592e0f3e2fcb3bb3e88005
Author: GetAway <get...@t-...>
Date: Tue Sep 2 21:24:40 2014 +0200
bump version libpng-1.2.51
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/rules-archive b/rules-archive
index ad63930..a4e9f5e 100644
--- a/rules-archive
+++ b/rules-archive
@@ -75,7 +75,7 @@ curl-7.20.0.tar.bz2;http://curl.haxx.se/download
freetype-2.3.12.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/freetype
ncurses-5.3.tar.gz;ftp://$(gnuserver)/ncurses
jpegsrc.v6b.tar.gz;http://www.xfig.org/software/jpeg
-libpng-1.2.50.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/libpng
+libpng-1.2.51.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/libpng
libxml2-2.4.30.tar.gz;ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.4
zlib-1.2.8.tar.gz;http://zlib.net
libffi-1.20.tar.gz;ftp://sources.redhat.com/pub/libffi
diff --git a/rules-make b/rules-make
index 5876a9a..a2a01d7 100644
--- a/rules-make
+++ b/rules-make
@@ -80,7 +80,7 @@ libmad;0.15.1b;libmad-0.15.1b;libmad-0.15.1b.tar.gz:libmad.diff;extract:libmad-0
libid3tag;0.15.1b;libid3tag-0.15.1b;libid3tag-0.15.1b.tar.gz:libid3tag.diff;extract:libid3tag-0.15.1b.tar.gz;patch:libid3tag.diff
libncurses;5.3;ncurses-5.3;ncurses-5.3.tar.gz;extract:ncurses-5.3.tar.gz
libpcap;0.9.4;libpcap-0.9.4;libpcap-0.9.4.tar.gz:libpcap.diff;extract:libpcap-0.9.4.tar.gz;patch:libpcap.diff
-libpng;1.2.50;libpng-1.2.50;libpng-1.2.50.tar.bz2;extract:libpng-1.2.50.tar.bz2
+libpng;1.2.51;libpng-1.2.51;libpng-1.2.51.tar.bz2;extract:libpng-1.2.51.tar.bz2
libreadline;4.3;readline-4.3;readline-4.3.tar.gz:readline.diff;extract:readline-4.3.tar.gz;patch:readline.diff
libsdl;1.2.6;SDL-1.2.6;SDL-1.2.6.tar.gz:sdl.diff;extract:SDL-1.2.6.tar.gz;patch:sdl.diff
libsigc;2.3.1;libsigc++-2.3.1;libsigc++-2.3.1.tar.gz;extract:libsigc++-2.3.1.tar.gz
commit 7a705bae8fde96084aef551eff5675a425676a8c
Author: GetAway <get...@t-...>
Date: Sat Aug 23 09:55:12 2014 +0200
Removed obsolete libungif - switched to giflib-5.1.0
Ported some code of tuxwetter and enigma
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/configure.ac b/configure.ac
index 2ae4ed3..a75a288 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1509,7 +1509,7 @@ TUXBOX_RULES_MAKE(libgmp)
TUXBOX_RULES_MAKE(libmad)
TUXBOX_RULES_MAKE(libncurses)
TUXBOX_RULES_MAKE(libjpeg)
-TUXBOX_RULES_MAKE(libungif)
+TUXBOX_RULES_MAKE(giflib)
TUXBOX_RULES_MAKE(libpcap)
TUXBOX_RULES_MAKE(libpng)
TUXBOX_RULES_MAKE(libreadline)
diff --git a/make/contrib-libs.mk b/make/contrib-libs.mk
index d0b402d..95acb47 100644
--- a/make/contrib-libs.mk
+++ b/make/contrib-libs.mk
@@ -11,7 +11,7 @@ libs: \
libs_optional: \
libffi \
libboost libgmp \
- libpcap libxml2 libungif \
+ libpcap libxml2 giflib \
libexpat libcrypto sqlite
libs_host : \
@@ -517,19 +517,19 @@ $(DEPDIR)/libglib: bootstrap @LIBGETTEXT@ @DEPENDS_libglib@
@CLEANUP_libglib@
touch $@
-$(DEPDIR)/libungif: bootstrap @DEPENDS_libungif@
- @PREPARE_libungif@
- cd @DIR_libungif@ && \
+$(DEPDIR)/giflib: bootstrap @DEPENDS_giflib@
+ @PREPARE_giflib@
+ cd @DIR_giflib@ && \
sed -i -e 's,^SUBDIRS = lib.*,SUBDIRS = lib,g' Makefile.in && \
+ export ac_cv_prog_have_xmlto=no && \
$(BUILDENV) \
./configure \
--host=$(target) \
--build=$(build) \
--prefix= \
- --without-x && \
$(MAKE) && \
- @INSTALL_libungif@
- @CLEANUP_libungif@
+ @INSTALL_giflib@
+ @CLEANUP_giflib@
touch $@
$(DEPDIR)/libiconv: bootstrap @DEPENDS_libiconv@
diff --git a/make/enigma.mk b/make/enigma.mk
index f25eeb3..b949df0 100644
--- a/make/enigma.mk
+++ b/make/enigma.mk
@@ -12,7 +12,7 @@ else
ENIGMA_DEPENDS=
endif
-$(appsdir)/tuxbox/enigma/config.status: bootstrap libfreetype libfribidi libmad libid3tag libvorbisidec libpng libsigc libjpeg libungif @LIBGETTEXT@ $(ENIGMA_DEPENDS) $(targetprefix)/lib/pkgconfig/tuxbox.pc $(targetprefix)/lib/pkgconfig/tuxbox-xmltree.pc $(targetprefix)/include/tuxbox/plugin.h
+$(appsdir)/tuxbox/enigma/config.status: bootstrap libfreetype libfribidi libmad libid3tag libvorbisidec libpng libsigc libjpeg giflib @LIBGETTEXT@ $(ENIGMA_DEPENDS) $(targetprefix)/lib/pkgconfig/tuxbox.pc $(targetprefix)/lib/pkgconfig/tuxbox-xmltree.pc $(targetprefix)/include/tuxbox/plugin.h
cd $(appsdir)/tuxbox/enigma && $(CONFIGURE_BIN) \
--with-webif=$(WEBIF) \
--with-epg=$(EPG) \
diff --git a/make/plugins.mk b/make/plugins.mk
index 489f47e..f00b57f 100644
--- a/make/plugins.mk
+++ b/make/plugins.mk
@@ -138,11 +138,11 @@ if ENABLE_TUXWETTER
endif
@FLASHROOTDIR_MODIFIED@
-tuxwetter: libungif input $(appsdir)/tuxbox/plugins/config.status
+tuxwetter: giflib input $(appsdir)/tuxbox/plugins/config.status
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxwetter all
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxwetter install
-flash-tuxwetter: libungif flash-input $(appsdir)/tuxbox/plugins/config.status | $(flashprefix)/root
+flash-tuxwetter: giflib flash-input $(appsdir)/tuxbox/plugins/config.status | $(flashprefix)/root
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxwetter all prefix=$(flashprefix)/root
$(MAKE) -C $(appsdir)/tuxbox/plugins/tuxwetter install prefix=$(flashprefix)/root
@FLASHROOTDIR_MODIFIED@
diff --git a/rules-archive b/rules-archive
index 65acb67..ad63930 100644
--- a/rules-archive
+++ b/rules-archive
@@ -97,7 +97,7 @@ gmp-4.1.2.tar.bz2;ftp://ftp.informatik.rwth-aachen.de/pub/gnu/gmp
libmad-0.15.1b.tar.gz;http://prdownloads.sourceforge.net/sourceforge/mad
libid3tag-0.15.1b.tar.gz;http://prdownloads.sourceforge.net/sourceforge/mad
glib-2.8.3.tar.gz;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.8
-libungif-4.1.4.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/giflib
+giflib-5.1.0.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/giflib
libiconv-1.9.1.tar.gz;http://ftp.gnu.org/pub/gnu/libiconv
flac-1.2.0.tar.gz;http://prdownloads.sourceforge.net/sourceforge/flac
gettext-0.17.tar.gz;http://ftp.gnu.org/pub/gnu/gettext
diff --git a/rules-install b/rules-install
index 6152137..14b6577 100644
--- a/rules-install
+++ b/rules-install
@@ -80,7 +80,7 @@ libvorbisidec;rewrite-pkgconfig:vorbisidec.pc;make:install:DESTDIR=TARGET;instal
libxml2;rewrite-pkgconfig:libxml-2.0.pc;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libxml2.la
libz;make:install:prefix=TARGET;archive:TARGET/lib/libz_pic.a:*.o
libglib;make:install
-libungif;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libungif.la
+giflib;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/giflib.la
libiconv;make:install:DESTDIR=TARGET
libFLAC;make:install: -C src/libFLAC DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libFLAC.la
libgettext;make:install: -C intl DESTDIR=TARGET
diff --git a/rules-make b/rules-make
index 62195c1..5876a9a 100644
--- a/rules-make
+++ b/rules-make
@@ -88,7 +88,7 @@ libvorbisidec;1.0.2+svn15687;libvorbisidec-1.0.2+svn15687;libvorbisidec_1.0.2+sv
libxml2;2.4.30;libxml2-2.4.30;libxml2-2.4.30.tar.gz:libxml2.diff;extract:libxml2-2.4.30.tar.gz;patch:libxml2.diff
libz;1.2.8;zlib-1.2.8;zlib-1.2.8.tar.gz;extract:zlib-1.2.8.tar.gz
libglib;2.8.3;glib-2.8.3;glib-2.8.3.tar.gz;extract:glib-2.8.3.tar.gz
-libungif;4.1.4;libungif-4.1.4;libungif-4.1.4.tar.bz2;extract:libungif-4.1.4.tar.bz2
+giflib;5.1.0;giflib-5.1.0;giflib-5.1.0.tar.bz2;extract:giflib-5.1.0.tar.bz2
libiconv;1.9.1;libiconv-1.9.1;libiconv-1.9.1.tar.gz;extract:libiconv-1.9.1.tar.gz
libFLAC;1.2.0;flac-1.2.0;flac-1.2.0.tar.gz;extract:flac-1.2.0.tar.gz;patch:flac.diff
libgettext;0.17;gettext-0.17;gettext-0.17.tar.gz:gettext.diff;extract:gettext-0.17.tar.gz;patch:gettext.diff
-----------------------------------------------------------------------
Summary of changes:
Patches/libcrypto.diff | 75 ++++++++++++++++++++++-------------------------
configure.ac | 14 ++++++++-
make/contrib-apps.mk | 16 +++++++++-
make/contrib-libs.mk | 33 +++++++++++---------
make/enigma.mk | 2 +-
make/plugins.mk | 8 ++--
rules-archive | 8 ++--
rules-install | 4 +-
rules-make | 8 ++--
9 files changed, 95 insertions(+), 73 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-08-19 22:15:57
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via d6b9cf22da9ab7ae02fdcf366fee87f396c6015c (commit)
from b2f5cf62fdf73a8299a818719bb3274ef4762adf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d6b9cf22da9ab7ae02fdcf366fee87f396c6015c
Author: GetAway <get...@t-...>
Date: Tue Aug 19 18:57:53 2014 +0200
tuxwetter: Regenradar updated
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/plugins/tuxwetter/tuxwetter.conf b/tuxbox/plugins/tuxwetter/tuxwetter.conf
index cf75321..b8e1b51 100644
--- a/tuxbox/plugins/tuxwetter/tuxwetter.conf
+++ b/tuxbox/plugins/tuxwetter/tuxwetter.conf
@@ -77,22 +77,23 @@ MENU=New-Tuxwetter
# TEXTPAGE=DWD Wochenvorhersage,http://www.wettergefahren.de/de/WundK/Warnungen/zeige.php?WL=WVHS
# ENDMENU
MENU=Regenradar
- PICTURE=Regenradar Deutschland,http://www.wetteronline.de/daten/radar/dwddg/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Baden-Württemberg,http://www.wetteronline.de/daten/radar/dbad/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Bayern,http://www.wetteronline.de/daten/radar/dbay/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Berlin,http://www.wetteronline.de/daten/radar/dber/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Brandenburg,http://www.wetteronline.de/daten/radar/dber/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Bremen,http://www.wetteronline.de/daten/radar/dnie/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Hamburg,http://www.wetteronline.de/daten/radar/dsch/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Hessen,http://www.wetteronline.de/daten/radar/dhes/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Mecklenburg-Vorpommern,http://www.wetteronline.de/daten/radar/dmec/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Nordrhein-Westfalen,http://www.wetteronline.de/daten/radar/dnrw/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Niedersachsen,http://www.wetteronline.de/daten/radar/dnie/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Rheinland-Pfalz,http://www.wetteronline.de/daten/radar/drip/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Sachsen,http://www.wetteronline.de/daten/radar/dsac/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Sachsen-Anhalt,http://www.wetteronline.de/daten/radar/dsan/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Schleswig-Holstein,http://www.wetteronline.de/daten/radar/dsch/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
- PICTURE=Regenradar Thüringen,http://www.wetteronline.de/daten/radar/dtue/|YYYY/|MM/|DD/vie_|hh|N15m|R15mm.gif
+ PICTURE=Regenradar Deutschland,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/DL/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_DL_Intensity.gif
+ PICTURE=Regenradar Österreich,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/OS/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_OS_Intensity.gif
+ PICTURE=Regenradar Baden-Württemberg,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/BWB/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_BWB_Intensity.gif
+ PICTURE=Regenradar Bayern,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/BAY/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_BAY_Intensity.gif
+ PICTURE=Regenradar Berlin,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/BRA/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_BRA_Intensity.gif
+ PICTURE=Regenradar Brandenburg,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/BRA/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_BRA_Intensity.gif
+ PICTURE=Regenradar Bremen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/NIE/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_NIE_Intensity.gif
+ PICTURE=Regenradar Hamburg,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/SHS/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_SHS_Intensity.gif
+ PICTURE=Regenradar Hessen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/HES/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_HES_Intensity.gif
+ PICTURE=Regenradar Mecklenburg-Vorpommern,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/MVP/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_MVP_Intensity.gif
+ PICTURE=Regenradar Niedersachsen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/NIE/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_NIE_Intensity.gif
+ PICTURE=Regenradar Nordrhein-Westfalen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/NRW/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_NRW_Intensity.gif
+ PICTURE=Regenradar Rheinland-Pfalz,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/RHP/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_RHP_Intensity.gif
+ PICTURE=Regenradar Sachsen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/SAC/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_SAC_Intensity.gif
+ PICTURE=Regenradar Sachsen-Anhalt,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/SAH/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_SAH_Intensity.gif
+ PICTURE=Regenradar Schleswig-Holstein,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/SHS/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_SHS_Intensity.gif
+ PICTURE=Regenradar Thüringen,http://www.wetteronline.de/?pid=p_radar_map&ireq=true&src=radar/vermarktung/p_radar_map/wom/|YYYY/|MM/|DD/Intensity/THU/grey_flat/|YYYY|MM|DD|hh|N5m|R5mm_THU_Intensity.gif
ENDMENU
# MENU=Wolken
# PICTURE=Wolkenfilm heute,http://www.wetteronline.de/daten/vorher/|YYYY/|MM/euro/wol00|DD0000.gif
-----------------------------------------------------------------------
Summary of changes:
tuxbox/plugins/tuxwetter/tuxwetter.conf | 33 ++++++++++++++++---------------
1 files changed, 17 insertions(+), 16 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-08-19 17:48:30
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via b2f5cf62fdf73a8299a818719bb3274ef4762adf (commit)
via 8dc94e8c30f1b7c0bfeab7e591b4a315ad60bbd5 (commit)
via 0f19f1b7027e830724978f7a988acfde59e1302f (commit)
via 5bf985972bc295090c2b8e6f13a64cf395aecb55 (commit)
via 8406797072f9718e6dba466bf5318c61ee7ab410 (commit)
via 3444e646493a5d0e593be208f810bfb9bf53a070 (commit)
via b173c9c9e5a79c2fba9da9d8cc71ccda2e41a21b (commit)
from c613583a8dbac3d7d39605ea76dee6003bd0fa33 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b2f5cf62fdf73a8299a818719bb3274ef4762adf
Author: Christian Schuett <Gau...@ho...>
Date: Sat Aug 16 14:32:05 2014 +0200
Neutrino moviebrowser: init 'm_pcFilter' to avoid segfault while starting
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 372f14d..1a078a9 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -442,7 +442,8 @@ void CMovieBrowser::init(void)
m_pcLastPlay = NULL;
m_pcLastRecord = NULL;
m_pcInfo = NULL;
-
+ m_pcFilter = NULL;
+
m_windowFocus = MB_FOCUS_BROWSER;
initFonts();
commit 8dc94e8c30f1b7c0bfeab7e591b4a315ad60bbd5
Author: Christian Schuett <Gau...@ho...>
Date: Fri Aug 15 19:48:38 2014 +0200
Neutrino moviebrowser: clear movie list and infos if last item deleted
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 04e36cb..372f14d 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -1330,12 +1330,13 @@ CFile* CMovieBrowser::getSelectedFile(void)
void CMovieBrowser::refreshMovieInfo(void)
{
//TRACE("[mb]->refreshMovieInfo \r\n");
- if (m_vMovieInfo.empty()) return;
- if (m_movieSelectionHandler == NULL)
+
+ if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
{
- // There is no selected element, clear LCD
+ // There is no selected element, clear info box
std::string emptytext = " ";
- m_pcInfo->setText(&emptytext);
+ if (m_pcInfo)
+ m_pcInfo->setText(&emptytext);
}
else
{
@@ -1351,10 +1352,8 @@ void CMovieBrowser::refreshMovieInfo(void)
************************************************************************/
void CMovieBrowser::refreshLCD(void)
{
- if (m_vMovieInfo.empty()) return;
-
CLCD * lcd = CLCD::getInstance();
- if(m_movieSelectionHandler == NULL)
+ if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
{
// There is no selected element, clear LCD
lcd->showMenuText(0, " ", -1, true); // UTF-8
@@ -1387,7 +1386,11 @@ void CMovieBrowser::refreshFilterList(void)
m_FilterLines.lineHeader[0]= "";
if (m_vMovieInfo.empty())
+ {
+ if (m_pcFilter)
+ m_pcFilter->setLines(&m_FilterLines);
return; // exit here if nothing else is to do
+ }
if(m_settings.filter.item == MB_INFO_MAX_NUMBER)
{
@@ -1477,7 +1480,12 @@ void CMovieBrowser::refreshLastPlayList(void) //P2
m_vHandlePlayList.clear();
if (m_vMovieInfo.empty())
+ {
+ m_currentPlaySelection = 0;
+ if (m_pcLastPlay)
+ m_pcLastPlay->setLines(&m_playListLines);
return; // exit here if nothing else is to do
+ }
MI_MOVIE_INFO* movie_handle;
// prepare Browser list for sorting and filtering
@@ -1535,7 +1543,12 @@ void CMovieBrowser::refreshLastRecordList(void) //P2
m_vHandleRecordList.clear();
if (m_vMovieInfo.empty())
+ {
+ m_currentRecordSelection = 0;
+ if (m_pcLastRecord)
+ m_pcLastRecord->setLines(&m_recordListLines);
return; // exit here if nothing else is to do
+ }
MI_MOVIE_INFO* movie_handle;
// prepare Browser list for sorting and filtering
@@ -1597,7 +1610,8 @@ void CMovieBrowser::refreshBrowserList(void) //P1
{
m_currentBrowserSelection = 0;
m_movieSelectionHandler = NULL;
- //m_pcBrowser->setLines(&m_browserListLines);
+ if (m_pcBrowser)
+ m_pcBrowser->setLines(&m_browserListLines);
return; // exit here if nothing else is to do
}
commit 0f19f1b7027e830724978f7a988acfde59e1302f
Author: martii <m4...@gm...>
Date: Mon Aug 11 17:44:56 2014 +0200
Neutrino filebrowser: don't show progressbar unless directories were added
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index 222dd6d..611bcd2 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -1047,13 +1047,16 @@ bool CFileBrowser::exec(const char * const dirname)
if(res && Multi_Select)
{
- CProgressWindow * progress = new CProgressWindow();
- progress->setTitle(LOCALE_FILEBROWSER_SCAN);
- progress->exec(NULL,"");
+ CProgressWindow * progress = NULL;
for(unsigned int i = 0; i < filelist.size();i++)
if(filelist[i].Marked)
{
if(S_ISDIR(filelist[i].Mode)) {
+ if (!progress) {
+ progress = new CProgressWindow();
+ progress->setTitle(LOCALE_FILEBROWSER_SCAN);
+ progress->exec(NULL,"");
+ }
#ifdef ENABLE_INTERNETRADIO
if (m_Mode == ModeSC)
addRecursiveDir(&selected_filelist,filelist[i].Url, true, progress);
@@ -1063,8 +1066,10 @@ bool CFileBrowser::exec(const char * const dirname)
} else
selected_filelist.push_back(filelist[i]);
}
- progress->hide();
- delete progress;
+ if (progress) {
+ progress->hide();
+ delete progress;
+ }
}
return res;
commit 5bf985972bc295090c2b8e6f13a64cf395aecb55
Author: Christian Schuett <Gau...@ho...>
Date: Mon Aug 11 17:38:13 2014 +0200
nhttpd: fix spelling mistake
based on code by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yconnection.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yconnection.cpp
index d047563..fa44582 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yconnection.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yconnection.cpp
@@ -86,10 +86,9 @@ void CWebserverConnection::HandleConnection()
if(string_tolower(Request.HeaderList["Connection"]) == "close"
|| (httprotocol != "HTTP/1.1" && string_tolower(Request.HeaderList["Connection"]) != "keep-alive")
|| !Webserver->CheckKeepAliveAllowedByIP(sock->get_client_ip()))
- keep_alive = false;
-#else
- keep_alive = false;
#endif
+ keep_alive = false;
+
// Send a response
Response.SendResponse();
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yhook.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yhook.cpp
index a2a70e2..78ff0e0 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yhook.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/yhook.cpp
@@ -243,7 +243,7 @@ std::string CyhookHandler::BuildHeader(bool cache)
}
// print Status-line
result = string_printf(HTTP_PROTOCOL " %d %s\r\nContent-Type: %s\r\n",httpStatus, responseString, ResponseMimeType.c_str());
- log_level_printf(2,"Respose: HTTP/1.1 %d %s\r\nContent-Type: %s\r\n",httpStatus, responseString, ResponseMimeType.c_str());
+ log_level_printf(2,"Response: HTTP/1.1 %d %s\r\nContent-Type: %s\r\n",httpStatus, responseString, ResponseMimeType.c_str());
switch (httpStatus)
{
@@ -282,10 +282,8 @@ std::string CyhookHandler::BuildHeader(bool cache)
if(keep_alive)
result += "Connection: keep-alive\r\n";
else
- result += "Connection: close\r\n";
-#else
- result += "Connection: close\r\n";
#endif
+ result += "Connection: close\r\n";
// gzipped ?
if(UrlData["fileext"] == "gz")
result += "Content-Encoding: gzip\r\n";
commit 8406797072f9718e6dba466bf5318c61ee7ab410
Author: GetAway <get...@t-...>
Date: Sun Aug 10 20:54:32 2014 +0200
tuxwetter: add utf8 to latin1 encoding
add encoding of HTML Ampersand Character Code
larger line spacing for textbox
fix warning of isspace
fix sizeof(int)
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/plugins/tuxwetter/parser.c b/tuxbox/plugins/tuxwetter/parser.c
index a64cd74..f6d70f2 100644
--- a/tuxbox/plugins/tuxwetter/parser.c
+++ b/tuxbox/plugins/tuxwetter/parser.c
@@ -88,7 +88,7 @@ FILE *fh;
}
}
-char *prs_translate(char *trans, char *tfile)
+char *prs_translate(char *trans, const char *tfile)
{
char *sptr;
int i,found=0;
@@ -314,7 +314,7 @@ int prs_get_dwday(int i, int what, char *out)
//*** XML File ***
-int parser(char *citycode, char *trans, int metric, int inet, int ctmo)
+int parser(char *citycode, const char *trans, int metric, int inet, int ctmo)
{
int rec=0, flag=0;
int cc=0, bc=1, exit_ind=-1;
diff --git a/tuxbox/plugins/tuxwetter/parser.h b/tuxbox/plugins/tuxwetter/parser.h
index 02e1996..a23cfdf 100644
--- a/tuxbox/plugins/tuxwetter/parser.h
+++ b/tuxbox/plugins/tuxwetter/parser.h
@@ -126,7 +126,7 @@
# define PRE_HMID 71
#endif
-int parser (char *,char *, int, int, int);
+int parser (char *, const char *, int, int, int);
int prs_get_prev_count (void);
/*void prs_get_act_int (int what, char *out);
void prs_get_act_loc (int what, char *out);
@@ -140,7 +140,7 @@ int prs_get_dbl (int i, int what, int nacht, char *out);
int prs_get_time(int i, int what, char *out, int metric);
int prs_get_dtime(int i, int what, char *out, int metric);
int prs_get_dwday(int i, int what, char *out);
-char *prs_translate(char *trans, char *tfile);
+char *prs_translate(char *trans, const char *tfile);
#endif // __wxparser__
diff --git a/tuxbox/plugins/tuxwetter/php.c b/tuxbox/plugins/tuxwetter/php.c
index d185759..edfcce2 100644
--- a/tuxbox/plugins/tuxwetter/php.c
+++ b/tuxbox/plugins/tuxwetter/php.c
@@ -81,7 +81,14 @@ FILE *fh;
}
else
{
- if((*(tptr+1)!='#') && (strstr(tptr,"uml;")!=(tptr+2)) && (strstr(tptr,"nbsp;")!=(tptr+1)) && (strstr(tptr,"gt;")!=(tptr+1)) && (strstr(tptr,"lt;")!=(tptr+1)) && (strstr(tptr,"quot;")!=(tptr+1)) && (strstr(tptr,"zlig;")!=(tptr+2)))
+ if ((*(tptr+1) != '#') &&
+ (strstr(tptr,"uml;") != (tptr+2)) &&
+ (strstr(tptr,"nbsp;")!= (tptr+1)) &&
+ (strstr(tptr,"gt;") != (tptr+1)) &&
+ (strstr(tptr,"lt;") != (tptr+1)) &&
+ (strstr(tptr,"amp;") != (tptr+1)) &&
+ (strstr(tptr,"quot;")!= (tptr+1)) &&
+ (strstr(tptr,"zlig;")!= (tptr+2)))
{
rstr[j++]=*tptr++;
}
@@ -91,7 +98,14 @@ FILE *fh;
cc=' ';
switch (*tptr)
{
- case 'a': cc='ä'; break;
+ case 'a':
+ if((tptr=strchr(tptr+1,'m'))!=NULL) {
+ cc='&';
+ }
+ else {
+ cc='ä';
+ }
+ break;
case 'A': cc='Ä'; break;
case 'o': cc='ö'; break;
case 'O': cc='Ö'; break;
@@ -164,11 +178,11 @@ FILE *fh;
*cut=(sy>=500);
if(line)
{
- RenderString("<<", 0, fy, sx, CENTER, 56, CMHT);
+ RenderString("<<", 0, fy+10, sx, CENTER, 56, CMHT);
}
if(*cut)
{
- RenderString(">>", 0, sy-dy, sx, CENTER, 56, CMHT);
+ RenderString(">>", 0, sy-dy+10, sx, CENTER, 56, CMHT);
}
}
}
diff --git a/tuxbox/plugins/tuxwetter/text.c b/tuxbox/plugins/tuxwetter/text.c
index 792d3ad..4d123ca 100644
--- a/tuxbox/plugins/tuxwetter/text.c
+++ b/tuxbox/plugins/tuxwetter/text.c
@@ -116,7 +116,7 @@ char rc,*rptr=src,*tptr=src;
++rptr;
rc=*rptr;
found=0;
- for(i=0; i<sizeof(sc) && !found; i++)
+ for(i=0; i<sizeof(sc)/sizeof(sc[0]) && !found; i++)
{
if(rc==sc[i])
{
@@ -175,7 +175,7 @@ int stringlen = 0;
else
{
found=0;
- for(i=0; i<sizeof(sc) && !found; i++)
+ for(i=0; i<sizeof(sc)/sizeof(sc[0]) && !found; i++)
{
if(*string==sc[i])
{
@@ -259,19 +259,48 @@ void RenderString(char *string, int sx, int sy, int maxwidth, int layout, int si
}
else
{
- if (*rptr==0xC3)
+ int uml = 0;
+ switch(*rptr) /* skip Umlauts */
{
- ++rptr;
- switch(*rptr)
+ case '\xc4':
+ case '\xd6':
+ case '\xdc':
+ case '\xe4':
+ case '\xf6':
+ case '\xfc':
+ case '\xdf': uml=1; break;
+ }
+ if (uml == 0)
+ {
+ // UTF8_to_Latin1 encoding
+ if (((*rptr) & 0xf0) == 0xf0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f'; // ? question mark
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xe0) == 0xe0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xc0) == 0xc0)
{
- case 0x84: *rptr='Ä'; break;
- case 0x96: *rptr='Ö'; break;
- case 0x9C: *rptr='Ü'; break;
- case 0xA4: *rptr='ä'; break;
- case 0xB6: *rptr='ö'; break;
- case 0xBC: *rptr='ü'; break;
- case 0x9F: *rptr='ß'; break;
- default : *rptr='.'; break;
+ char c = (((*rptr) & 3) << 6);
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ *rptr = (c | ((*rptr) & 0x3f));
}
}
if((charwidth = RenderChar(*rptr, sx, sy, ex, ((color!=CMCIT) && (color!=CMCST))?varcolor:color)) == -1) return; /* string > maxwidth */
diff --git a/tuxbox/plugins/tuxwetter/tuxwetter.c b/tuxbox/plugins/tuxwetter/tuxwetter.c
index cf36650..ed61faa 100644
--- a/tuxbox/plugins/tuxwetter/tuxwetter.c
+++ b/tuxbox/plugins/tuxwetter/tuxwetter.c
@@ -43,10 +43,10 @@
#include "lcd.h"
#include "color.h"
-#define P_VERSION 3.64
+#define P_VERSION 3.65
#define S_VERSION ""
-char CONVERT_LIST[]="/var/tuxbox/config/tuxwetter/convert.list";
+const char CONVERT_LIST[]="/var/tuxbox/config/tuxwetter/convert.list";
#define CFG_FILE "/var/tuxbox/config/tuxwetter/tuxwetter.conf"
#define MCF_FILE "/var/tuxbox/config/tuxwetter/tuxwetter.mcfg"
#define TIME_FILE "/var/tuxbox/config/tuxwetter/swisstime"
@@ -137,7 +137,7 @@ int Get_Menu();
void ShowInfo(MENU *m);
// Misc
-char NOMEM[]="Tuxwetter <Out of memory>\n";
+const char NOMEM[]="Tuxwetter <Out of memory>\n";
unsigned char FONT[64]= "/share/fonts/pakenham.ttf";
unsigned char *lfb = 0, *lbb = 0;
int intype=0, show_icons=0, gmodeon=0, ctmo=0, metric=1, loadalways=0, radius=0;
@@ -150,8 +150,8 @@ unsigned char nstr[BUFSIZE]="";
unsigned char *trstr;
unsigned char *htmstr;
unsigned char *proxyadress=NULL, *proxyuserpwd=NULL;
-char INST_FILE[]="/tmp/rc.locked";
-char LCDL_FILE[]="/tmp/lcd.locked";
+const char INST_FILE[]="/tmp/rc.locked";
+const char LCDL_FILE[]="/tmp/lcd.locked";
int instance=0;
int get_instance(void)
@@ -2436,20 +2436,20 @@ int col1=40,sy=70,dy=26;
{
fclose(tfh);
- RenderString("X", 0, 34, 619, LEFT, 32, CMCT);
+ RenderString("X", 0, 34, 619, LEFT, 29, CMCT);
if(fh_php_getsize(name, plain, &x1, &y1))
{
printf("Tuxwetter <invalid PHP-Format>\n");
return -1;
}
- cs=32.0*((double)(619-1.5*(double)col1)/(double)x1);
- if(cs>32)
+ cs=FSIZE_MED*((double)(619-1.6*(double)col1)/(double)x1);
+ if(cs>FSIZE_MED-2)
{
- cs=32;
- }
+ cs=FSIZE_MED-2;
+ }
+
+ dy=1.1*(double)cs;
- dy=0.8*(double)cs;
-
while(run)
{
//frame layout
@@ -2642,7 +2642,7 @@ long flength=0;
}
if(!dontsave)
{
- if((*pt4==' ') && (flength>60))
+ if((*pt4==' ') && (flength>55))
{
fprintf(fh2,"\n<br>");
flength=0;
@@ -3277,7 +3277,7 @@ PLISTENTRY pl=&epl;
cnt=0;
fprintf(fh2,"<br>");
while(*pt1)
- {
+ {
if(*pt1==' ' && cnt>50) //old 40
{
fprintf(fh2,"\n<br>");
diff --git a/tuxbox/plugins/tuxwetter/tuxwetter.conf b/tuxbox/plugins/tuxwetter/tuxwetter.conf
index 62d59bc..cf75321 100644
--- a/tuxbox/plugins/tuxwetter/tuxwetter.conf
+++ b/tuxbox/plugins/tuxwetter/tuxwetter.conf
@@ -1,5 +1,5 @@
####################################################################################
-#### New-Tuxwetter Version 3.62
+#### New-Tuxwetter Version 3.65
#### Aktuelle Wetterinfos und Wettervorhersage
####
#### Bugreport und Anregungen im Board:
diff --git a/tuxbox/plugins/tuxwetter/tuxwetter.h b/tuxbox/plugins/tuxwetter/tuxwetter.h
index b7f58ab..00cce38 100644
--- a/tuxbox/plugins/tuxwetter/tuxwetter.h
+++ b/tuxbox/plugins/tuxwetter/tuxwetter.h
@@ -30,6 +30,7 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <linux/fb.h>
commit 3444e646493a5d0e593be208f810bfb9bf53a070
Author: GetAway <get...@t-...>
Date: Wed Jul 23 12:06:45 2014 +0200
msgbox: add utf8_to_latin1 encoding inspired from Neutrino/Zapittools ;)
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/tools/msgbox/msgbox.c b/tuxbox/tools/msgbox/msgbox.c
index 615e93b..3d12b93 100644
--- a/tuxbox/tools/msgbox/msgbox.c
+++ b/tuxbox/tools/msgbox/msgbox.c
@@ -33,7 +33,7 @@
#include <dbox/fb.h>
#endif
-#define M_VERSION 1.72
+#define M_VERSION 1.80
#define FONT "/share/fonts/pakenham.ttf"
diff --git a/tuxbox/tools/msgbox/text.c b/tuxbox/tools/msgbox/text.c
index b85681f..804f72e 100644
--- a/tuxbox/tools/msgbox/text.c
+++ b/tuxbox/tools/msgbox/text.c
@@ -275,11 +275,55 @@ int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int siz
}
else
{
+ int uml = 0;
+ switch(*rptr) /* skip Umlauts */
+ {
+ case '\xc4':
+ case '\xd6':
+ case '\xdc':
+ case '\xe4':
+ case '\xf6':
+ case '\xfc':
+ case '\xdf': uml=1; break;
+ }
+ if (uml == 0)
+ {
+ // UTF8_to_Latin1 encoding
+ if (((*rptr) & 0xf0) == 0xf0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f'; // ? question mark
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xe0) == 0xe0) /* skip (can't be encoded in Latin1) */
+ {
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ }
+ else if (((*rptr) & 0xc0) == 0xc0)
+ {
+ char c = (((*rptr) & 3) << 6);
+ rptr++;
+ if ((*rptr) == 0)
+ *rptr='\x3f';
+ *rptr = (c | ((*rptr) & 0x3f));
+ }
+ }
if((charwidth = RenderChar(*rptr, sx, sy, ex, varcolor)) == -1) return sx; /* string > maxwidth */
sx += charwidth;
}
rptr++;
}
- return stringlen;
+ return stringlen;
}
commit b173c9c9e5a79c2fba9da9d8cc71ccda2e41a21b
Author: GetAway <get...@t-...>
Date: Sun Jul 13 13:36:33 2014 +0200
.gitignore expanded
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/.gitignore b/.gitignore
index 99cf5ff..aa50815 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,31 @@
*.*~
+*.a
+*.o
+*.la
+*.lo
+*.pc
+.deps
+.libs
+
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+Makefile.in
+
+COPYING
+INSTALL
+acinclude.m4
+aclocal.m4
+autom4te.cache/
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1
+
+
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 30 +++++++++++
.../daemons/nhttpd/yhttpd_core/yconnection.cpp | 5 +-
.../neutrino/daemons/nhttpd/yhttpd_core/yhook.cpp | 6 +--
tuxbox/neutrino/src/gui/filebrowser.cpp | 15 ++++--
tuxbox/neutrino/src/gui/moviebrowser.cpp | 33 +++++++++---
tuxbox/plugins/tuxwetter/parser.c | 4 +-
tuxbox/plugins/tuxwetter/parser.h | 4 +-
tuxbox/plugins/tuxwetter/php.c | 22 ++++++--
tuxbox/plugins/tuxwetter/text.c | 55 +++++++++++++++-----
tuxbox/plugins/tuxwetter/tuxwetter.c | 28 +++++-----
tuxbox/plugins/tuxwetter/tuxwetter.conf | 2 +-
tuxbox/plugins/tuxwetter/tuxwetter.h | 1 +
tuxbox/tools/msgbox/msgbox.c | 2 +-
tuxbox/tools/msgbox/text.c | 46 ++++++++++++++++-
14 files changed, 194 insertions(+), 59 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-08-19 17:46:52
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via c5ac465d346eba22f3797977d8a8e7786c7978c1 (commit)
from a8a90d223c4fb9411c4058e52b092c31e3d437a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c5ac465d346eba22f3797977d8a8e7786c7978c1
Author: GetAway <get...@t-...>
Date: Sun Jul 13 14:34:24 2014 +0200
network: update udhcpc default.script for current busybox
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/config/busybox.config.m4 b/config/busybox.config.m4
index b698dbe..483c026 100644
--- a/config/busybox.config.m4
+++ b/config/busybox.config.m4
@@ -237,8 +237,8 @@ option(`CONFIG_OD', `n', `n')
option(`CONFIG_PRINTENV', `n', `n')
option(`CONFIG_PRINTF', `n', `n')
option(`CONFIG_PWD', `y', `n')
-# CONFIG_READLINK is not set
-# CONFIG_FEATURE_READLINK_FOLLOW is not set
+option(`CONFIG_READLINK', `y', `y')
+option(`CONFIG_FEATURE_READLINK_FOLLOW', `y', `y')
option(`CONFIG_REALPATH', `n', `n')
option(`CONFIG_RM', `y', `y')
option(`CONFIG_RMDIR', `y', `y')
diff --git a/root/share/udhcpc/default.script b/root/share/udhcpc/default.script
index 6db8cf6..3b58dbf 100755
--- a/root/share/udhcpc/default.script
+++ b/root/share/udhcpc/default.script
@@ -1,37 +1,52 @@
#!/bin/sh
-
-[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
+# udhcpc script edited by Tim Riker <Ti...@Ri...>
RESOLV_CONF="/etc/resolv.conf"
+[ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; }
+
+NETMASK=""
+[ -n "$subnet" ] && NETMASK="netmask $subnet"
+BROADCAST="broadcast +"
+[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+
case "$1" in
deconfig)
- /bin/ip link set $interface up
+ echo "Setting IP address 0.0.0.0 on $interface"
+ ifconfig $interface 0.0.0.0
;;
renew|bound)
- /bin/ip addr add $ip/$mask dev $interface
+ echo "Setting IP address $ip on $interface"
+ ifconfig $interface $ip $NETMASK $BROADCAST
if [ -n "$router" ] ; then
- for i in $router ; do
- /bin/ip route add default via $i dev $interface
+ echo "Deleting routers"
+ while route del default gw 0.0.0.0 dev $interface ; do
+ :
done
- fi
- if [ -n "$hostname" ]; then
- hostname $hostname
+ metric=0
+ for i in $router ; do
+ echo "Adding router $i"
+ route add default gw $i dev $interface metric $metric
+ : metric=`expr $metric+1`
+ done
fi
- echo "# Generated by udhcpc" > $RESOLV_CONF
- echo "" >> $RESOLV_CONF
- if [ -n "$domain" ] ; then
- echo search $domain >> $RESOLV_CONF
- fi
+ echo "Recreating $RESOLV_CONF"
+ # If the file is a symlink somewhere (like /etc/resolv.conf
+ # pointing to /run/resolv.conf), make sure things work.
+ realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF")
+ tmpfile="/tmp/resolv.conf-$$"
+ > "$tmpfile"
+ [ -n "$domain" ] && echo "search $domain" >> "$tmpfile"
for i in $dns ; do
- echo nameserver $i >> $RESOLV_CONF
+ echo " Adding DNS server $i"
+ echo "nameserver $i" >> "$tmpfile"
done
+ mv "$tmpfile" "$realconf"
;;
esac
exit 0
-
-----------------------------------------------------------------------
Summary of changes:
config/busybox.config.m4 | 4 +-
root/share/udhcpc/default.script | 47 +++++++++++++++++++++++++-------------
2 files changed, 33 insertions(+), 18 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-08-19 17:12:41
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via a8a90d223c4fb9411c4058e52b092c31e3d437a0 (commit)
from de0292418da878bd005e49c649204cf01a97cb8f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a8a90d223c4fb9411c4058e52b092c31e3d437a0
Author: GetAway <get...@t-...>
Date: Sun Jul 13 14:28:01 2014 +0200
cdk/.gitignore expanded
Signed-off-by: GetAway <get...@t-...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/.gitignore b/.gitignore
index 79e8f6e..7dc4a38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,23 @@
+.deps
Archive
Makefile
Makefile.am.local
+Makefile.in
Makefile-archive
aclocal.m4
autom4te.cache
config.log
config.status
configure
+linux
linux-*
rules-downcheck.pl
config.guess
config.sub
ltmain.sh
+missing
+
+COPYING
+INSTALL
+Makefile.in
+install-sh
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-07-11 20:25:25
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via c613583a8dbac3d7d39605ea76dee6003bd0fa33 (commit)
from 37a8caceda0a043e234b974f6694f50734c5dca0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c613583a8dbac3d7d39605ea76dee6003bd0fa33
Author: GetAway <get...@t-...>
Date: Tue Dec 31 13:36:07 2013 +0100
enigma: port libsigc-1.2 to libsigc-2.0
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/enigma/boot/bootmenue/my_rc.h b/tuxbox/enigma/boot/bootmenue/my_rc.h
index d59d2d0..44a328f 100755
--- a/tuxbox/enigma/boot/bootmenue/my_rc.h
+++ b/tuxbox/enigma/boot/bootmenue/my_rc.h
@@ -68,7 +68,7 @@ class RcInput
static void* ThreadBu(void*);
public:
static RcInput *getInstance();
- Signal1<void,unsigned short> selected;
+ sigc::signal<void,unsigned short> selected;
RcInput();
~RcInput();
};
diff --git a/tuxbox/enigma/boot/bootmenue/my_timer.h b/tuxbox/enigma/boot/bootmenue/my_timer.h
index 9271f98..dceee8b 100755
--- a/tuxbox/enigma/boot/bootmenue/my_timer.h
+++ b/tuxbox/enigma/boot/bootmenue/my_timer.h
@@ -15,7 +15,7 @@ class CTimer
static void* ThreadTimer(void*);
public:
static CTimer *getInstance();
- Signal0<void>selected;
+ sigc::signal<void>selected;
static void start(int val);
~CTimer();
};
diff --git a/tuxbox/enigma/configure.ac b/tuxbox/enigma/configure.ac
index 37cdf33..7ca2e43 100644
--- a/tuxbox/enigma/configure.ac
+++ b/tuxbox/enigma/configure.ac
@@ -97,7 +97,7 @@ TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
TUXBOX_APPS_LIB_PKGCONFIG(MD5SUM,tuxbox-md5sum)
TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
-TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
+TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-2.0)
TUXBOX_APPS_LIB_PKGCONFIG(XMLTREE,tuxbox-xmltree)
TUXBOX_APPS_LIB_PKGCONFIG(TUXTXT,tuxbox-tuxtxt)
TUXBOX_APPS_LIB_PKGCONFIG(VORBISIDEC,vorbisidec)
diff --git a/tuxbox/enigma/include/lib/base/console.h b/tuxbox/enigma/include/lib/base/console.h
index 924b832..5f93b9e 100644
--- a/tuxbox/enigma/include/lib/base/console.h
+++ b/tuxbox/enigma/include/lib/base/console.h
@@ -16,7 +16,7 @@ struct queue_data
int len;
};
-class eConsoleAppContainer: public Object
+class eConsoleAppContainer: public sigc::trackable
{
int fd[3];
int pid;
@@ -36,9 +36,9 @@ public:
void sendCtrlC();
void write( const char *data, int len );
bool running() { return (fd[0]!=-1) && (fd[1]!=-1) && (fd[2]!=-1); }
- Signal1<void, eString> dataAvail;
- Signal1<void,int> dataSent;
- Signal1<void,int> appClosed;
+ sigc::signal<void, eString> dataAvail;
+ sigc::signal<void,int> dataSent;
+ sigc::signal<void,int> appClosed;
};
#endif // __LIB_BASE_CONSOLE_H__
diff --git a/tuxbox/enigma/include/lib/base/ebase.h b/tuxbox/enigma/include/lib/base/ebase.h
index e9fb143..1ddfeb1 100644
--- a/tuxbox/enigma/include/lib/base/ebase.h
+++ b/tuxbox/enigma/include/lib/base/ebase.h
@@ -162,7 +162,7 @@ public:
eSocketNotifier(eMainloop *context, int fd, int req, bool startnow=true);
~eSocketNotifier();
- Signal1<void, int> activated;
+ sigc::signal<void, int> activated;
void start();
void stop();
@@ -198,7 +198,7 @@ public:
eTimer(eMainloop *context): context(*context), bActive(false) { }
~eTimer() { if (bActive) stop(); }
- Signal0<void> timeout;
+ sigc::signal<void> timeout;
void activate();
bool isActive() { return bActive; }
diff --git a/tuxbox/enigma/include/lib/base/eerror.h b/tuxbox/enigma/include/lib/base/eerror.h
index 1e52312..e041774 100644
--- a/tuxbox/enigma/include/lib/base/eerror.h
+++ b/tuxbox/enigma/include/lib/base/eerror.h
@@ -28,7 +28,7 @@ void eFatal(const char* fmt, ...);
enum { lvlDebug=1, lvlWarning=2, lvlFatal=4 };
-extern Signal2<void, int, const eString&> logOutput;
+extern sigc::signal<void, int, const eString&> logOutput;
extern int logOutputConsole;
#ifdef ASSERT
diff --git a/tuxbox/enigma/include/lib/base/message.h b/tuxbox/enigma/include/lib/base/message.h
index 0208da3..211a2a3 100644
--- a/tuxbox/enigma/include/lib/base/message.h
+++ b/tuxbox/enigma/include/lib/base/message.h
@@ -32,7 +32,7 @@ public:
* Automatically creates a eSocketNotifier and gives you a callback.
*/
template<class T>
-class eFixedMessagePump: private eMessagePump, public Object
+class eFixedMessagePump: private eMessagePump, public sigc::trackable
{
eSocketNotifier *sn;
void do_recv(int)
@@ -42,7 +42,8 @@ class eFixedMessagePump: private eMessagePump, public Object
/*emit*/ recv_msg(msg);
}
public:
- Signal1<void,const T&> recv_msg;
+ sigc::signal<void, const T&> recv_msg;
+
void send(const T &msg)
{
eMessagePump::send(&msg, sizeof(msg));
diff --git a/tuxbox/enigma/include/lib/codecs/codec.h b/tuxbox/enigma/include/lib/codecs/codec.h
index d1308a6..dc08e7e 100644
--- a/tuxbox/enigma/include/lib/codecs/codec.h
+++ b/tuxbox/enigma/include/lib/codecs/codec.h
@@ -20,7 +20,7 @@ public:
eAudioDecoder();
virtual ~eAudioDecoder();
- virtual int decodeMore(int last, int maxsamples, Signal1<void,unsigned int>*cb=0)=0; // returns number of samples(!) written to IOBuffer (out)
+ virtual int decodeMore(int last, int maxsamples, sigc::signal<void,unsigned int>*cb=0)=0; // returns number of samples(!) written to IOBuffer (out)
virtual void resync()=0; // clear (secondary) decoder buffers
struct pcmSettings
diff --git a/tuxbox/enigma/include/lib/codecs/codecmp3.h b/tuxbox/enigma/include/lib/codecs/codecmp3.h
index de41f98..a36842a 100644
--- a/tuxbox/enigma/include/lib/codecs/codecmp3.h
+++ b/tuxbox/enigma/include/lib/codecs/codecmp3.h
@@ -26,7 +26,7 @@ public:
void resync();
int getMinimumFramelength();
- int decodeMore(int last, int maxsamples, Signal1<void, unsigned int>*cb=0);
+ int decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int>*cb=0);
int getAverageBitrate();
};
diff --git a/tuxbox/enigma/include/lib/codecs/codecmpg.h b/tuxbox/enigma/include/lib/codecs/codecmpg.h
index c0adfec..d2326e3 100644
--- a/tuxbox/enigma/include/lib/codecs/codecmpg.h
+++ b/tuxbox/enigma/include/lib/codecs/codecmpg.h
@@ -46,7 +46,7 @@ public:
void extractSequenceHeader( unsigned char *buf, unsigned int len );
eDemux(eIOBuffer &input, eIOBuffer &video, eIOBuffer &audio, int fd, int sourcefd);
~eDemux();
- virtual int decodeMore(int last, int maxsamples, Signal1<void, unsigned int>*newastreamid=0 )=0; // returns number of samples(!) written to IOBuffer (out)
+ virtual int decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int>*newastreamid=0 )=0; // returns number of samples(!) written to IOBuffer (out)
void resync(); // clear (secondary) decoder buffers
int getMinimumFramelength();
int getAverageBitrate();
@@ -60,7 +60,7 @@ public:
eMPEGDemux(eIOBuffer &input, eIOBuffer &video, eIOBuffer &audio, int fd, int sourcefd)
:eDemux(input, video, audio, fd, sourcefd)
{}
- int decodeMore(int last, int maxsamples, Signal1<void, unsigned int>*newastreamid=0 ); // returns number of samples(!) written to IOBuffer (out)
+ int decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int>*newastreamid=0 ); // returns number of samples(!) written to IOBuffer (out)
};
// PVA demuxer.
@@ -70,7 +70,7 @@ public:
ePVADemux(eIOBuffer &input, eIOBuffer &video, eIOBuffer &audio, int fd, int sourcefd)
:eDemux(input, video, audio, fd, sourcefd)
{}
- int decodeMore(int last, int maxsamples, Signal1<void, unsigned int>*newastreamid=0 ); // returns number of samples(!) written to IOBuffer (out)
+ int decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int>*newastreamid=0 ); // returns number of samples(!) written to IOBuffer (out)
};
#endif
diff --git a/tuxbox/enigma/include/lib/codecs/codecogg.h b/tuxbox/enigma/include/lib/codecs/codecogg.h
index 76e9b42..9d514ba 100644
--- a/tuxbox/enigma/include/lib/codecs/codecogg.h
+++ b/tuxbox/enigma/include/lib/codecs/codecogg.h
@@ -29,7 +29,7 @@ public:
void resync();
int getMinimumFramelength();
- int decodeMore(int last, int maxsamples, Signal1<void, unsigned int>*cb=0);
+ int decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int>*cb=0);
int getAverageBitrate();
void Init();
};
diff --git a/tuxbox/enigma/include/lib/driver/audiodynamic.h b/tuxbox/enigma/include/lib/driver/audiodynamic.h
index b355aa6..770af49 100644
--- a/tuxbox/enigma/include/lib/driver/audiodynamic.h
+++ b/tuxbox/enigma/include/lib/driver/audiodynamic.h
@@ -1,7 +1,7 @@
#ifndef __lib_driver_audiodynamic_h
#define __lib_driver_audiodynamic_h
-class eAudioDynamicCompression: public Object
+class eAudioDynamicCompression: public sigc::trackable
{
struct arg_s
{
diff --git a/tuxbox/enigma/include/lib/driver/eavswitch.h b/tuxbox/enigma/include/lib/driver/eavswitch.h
index d13339d..fbaff72 100644
--- a/tuxbox/enigma/include/lib/driver/eavswitch.h
+++ b/tuxbox/enigma/include/lib/driver/eavswitch.h
@@ -47,7 +47,7 @@ protected:
public:
eAVSwitch();
~eAVSwitch();
- Signal2<void, int, int> volumeChanged;
+ sigc::signal<void, int, int> volumeChanged;
static eAVSwitch *getInstance();
int getVolume() { return volume; }
diff --git a/tuxbox/enigma/include/lib/driver/rc.h b/tuxbox/enigma/include/lib/driver/rc.h
index 3233224..d5a135e 100644
--- a/tuxbox/enigma/include/lib/driver/rc.h
+++ b/tuxbox/enigma/include/lib/driver/rc.h
@@ -24,7 +24,7 @@ class eRCKey;
*
* Handles one remote control. Gets codes from a \ref eRCDriver. Produces events in \ref eRCInput.
*/
-class eRCDevice: public Object
+class eRCDevice: public sigc::trackable
{
protected:
eRCInput *input;
@@ -76,7 +76,7 @@ public:
/**
* Receives codes from one or more remote controls.
*/
-class eRCDriver: public Object
+class eRCDriver: public sigc::trackable
{
protected:
std::list<eRCDevice*> listeners;
@@ -222,7 +222,7 @@ public:
rrate; // repeat rate (in ms)
};
-class eRCInput: public Object
+class eRCInput: public sigc::trackable
{
int locked;
int handle;
@@ -240,7 +240,8 @@ public:
protected:
std::map<eString,eRCDevice*,lstr> devices;
public:
- Signal1<void, const eRCKey&> keyEvent;
+ //Signal1<void, const eRCKey&> keyEvent;
+ sigc::signal<void, const eRCKey&> keyEvent;
eRCInput();
~eRCInput();
diff --git a/tuxbox/enigma/include/lib/driver/streamwd.h b/tuxbox/enigma/include/lib/driver/streamwd.h
index 50dd70a..c72bbad 100644
--- a/tuxbox/enigma/include/lib/driver/streamwd.h
+++ b/tuxbox/enigma/include/lib/driver/streamwd.h
@@ -6,7 +6,7 @@
#include <lib/dvb/si.h>
#include <lib/dvb/dvb.h>
-class eStreamWatchdog: public Object
+class eStreamWatchdog: public sigc::trackable
{
eSocketNotifier* sn;
int handle;
@@ -22,8 +22,8 @@ public:
~eStreamWatchdog();
static eStreamWatchdog *getInstance();
int isAnamorph();
- Signal1<void, int> AspectRatioChanged;
- Signal1<void, int> VCRActivityChanged;
+ sigc::signal<void, int> AspectRatioChanged;
+ sigc::signal<void, int> VCRActivityChanged;
};
#endif
diff --git a/tuxbox/enigma/include/lib/dvb/dvb.h b/tuxbox/enigma/include/lib/dvb/dvb.h
index b7ef5e8..4a6797f 100644
--- a/tuxbox/enigma/include/lib/dvb/dvb.h
+++ b/tuxbox/enigma/include/lib/dvb/dvb.h
@@ -835,7 +835,7 @@ protected:
int addNetwork(tpPacket &p, XMLTreeNode *node, int type);
};
-class eTransponderList: public existNetworks, public Object
+class eTransponderList: public existNetworks, public sigc::trackable
{
public:
enum { SDT_SCAN_FREE, SDT_SCAN, SDT_SCAN_FINISHED, PAT_SCAN };
@@ -853,7 +853,7 @@ private:
eServiceReferenceDVB newService;
ePtrList<SDTEntry>::const_iterator curSDTEntry;
ePtrList<PATEntry>::const_iterator curPATEntry;
- Signal0<void> *callback;
+ sigc::signal<void> *callback;
std::set<eServiceID> newServiceIds;
std::set<eServiceID> checkedServiceIds;
int sdtscanstate;
@@ -894,11 +894,11 @@ public:
eTransponder &createTransponder(eDVBNamespace dvb_namespace,eTransportStreamID transport_stream_id, eOriginalNetworkID original_network_id);
eServiceDVB &createService(const eServiceReferenceDVB &service, int service_number=-1, bool *newService=0);
eServiceDVB &createSubService(const eServiceReferenceDVB &service, bool *newService=0);
- void startHandleSDT(const SDT *sdt, eDVBNamespace dvb_namespace, eOriginalNetworkID onid=-1, eTransportStreamID tsid=-1, Signal0<void> *callback=0, int sdtscanstate=SDT_SCAN );
- void handleSDT(const SDT *sdt, eDVBNamespace dvb_namespace, eOriginalNetworkID onid=-1, eTransportStreamID tsid=-1, Signal0<void> *callback=0 );
- Signal1<void, eTransponder*> transponder_added;
- Signal2<void, const eServiceReferenceDVB &, bool> service_found;
- Signal1<void, const eServiceReferenceDVB &> service_removed;
+ void startHandleSDT(const SDT *sdt, eDVBNamespace dvb_namespace, eOriginalNetworkID onid=-1, eTransportStreamID tsid=-1, sigc::signal<void> *callback=0, int sdtscanstate=SDT_SCAN );
+ void handleSDT(const SDT *sdt, eDVBNamespace dvb_namespace, eOriginalNetworkID onid=-1, eTransportStreamID tsid=-1, sigc::signal<void> *callback=0 );
+ sigc::signal<void, eTransponder*> transponder_added;
+ sigc::signal<void, const eServiceReferenceDVB &, bool> service_found;
+ sigc::signal<void, const eServiceReferenceDVB &> service_removed;
eTransponder *searchTransponder(const eTransponder &);
eTransponder *searchTS(eDVBNamespace dvbnamespace, eTransportStreamID transport_stream_id, eOriginalNetworkID original_network_id);
diff --git a/tuxbox/enigma/include/lib/dvb/dvbci.h b/tuxbox/enigma/include/lib/dvb/dvbci.h
index 93c37e0..65992e5 100644
--- a/tuxbox/enigma/include/lib/dvb/dvbci.h
+++ b/tuxbox/enigma/include/lib/dvb/dvbci.h
@@ -73,7 +73,7 @@ struct _lpduQueueHeader
#define CIServiceMap std::map<int, std::list<tempPMT_t> >
-class eDVBCI: private eThread, public eMainloop, public Object
+class eDVBCI: private eThread, public eMainloop, public sigc::trackable
{
static int instance_count;
std::priority_queue<queueData> sendqueue;
@@ -193,7 +193,7 @@ public:
~eDVBCI();
void thread();
- Signal1<void, const char*> ci_progress;
- Signal2<void, const char*, int> ci_mmi_progress;
+ sigc::signal<void, const char*> ci_progress;
+ sigc::signal<void, const char*, int> ci_mmi_progress;
};
#endif
diff --git a/tuxbox/enigma/include/lib/dvb/dvbscan.h b/tuxbox/enigma/include/lib/dvb/dvbscan.h
index f2237ff..eff3630 100644
--- a/tuxbox/enigma/include/lib/dvb/dvbscan.h
+++ b/tuxbox/enigma/include/lib/dvb/dvbscan.h
@@ -42,7 +42,7 @@ public:
eDVBScanState(int state): eDVBState(state) { }
};
-class eDVBScanController: public eDVBController, public Object
+class eDVBScanController: public eDVBController, public sigc::trackable
{
int flags;
@@ -65,7 +65,7 @@ class eDVBScanController: public eDVBController, public Object
void handleSDT(const SDT *sdt);
void freeCheckFinished();
- Signal0<void> freeCheckFinishedCallback;
+ sigc::signal<void> freeCheckFinishedCallback;
void init_eDVBScanController(eDVB &dvb);
public:
bool abort();
diff --git a/tuxbox/enigma/include/lib/dvb/dvbservice.h b/tuxbox/enigma/include/lib/dvb/dvbservice.h
index 412bfae..fc52cc6 100644
--- a/tuxbox/enigma/include/lib/dvb/dvbservice.h
+++ b/tuxbox/enigma/include/lib/dvb/dvbservice.h
@@ -112,9 +112,9 @@ public:
};
class eDVBServiceController
- :public eDVBController, public eDVBCaPMTClient, public Object
+ :public eDVBController, public eDVBCaPMTClient, public sigc::trackable
{
- Signal0<void> freeCheckFinishedCallback;
+ sigc::signal<void> freeCheckFinishedCallback;
void freeCheckFinished();
// for linkage handling
eServiceReferenceDVB parentservice,prevservice;
diff --git a/tuxbox/enigma/include/lib/dvb/dvbwidgets.h b/tuxbox/enigma/include/lib/dvb/dvbwidgets.h
index 658f217..bbcb0ff 100644
--- a/tuxbox/enigma/include/lib/dvb/dvbwidgets.h
+++ b/tuxbox/enigma/include/lib/dvb/dvbwidgets.h
@@ -34,7 +34,7 @@ public:
{
deliveryCable=1, deliverySatellite=2, deliveryTerrestrial=4, flagNoSat=8, flagNoInv=16
};
- Signal0<void> updated;
+ sigc::signal<void> updated;
eTransponderWidget(eWidget *parent, int edit, int type);
int load();
int setTransponder(const eTransponder *transponder);
diff --git a/tuxbox/enigma/include/lib/dvb/edvb.h b/tuxbox/enigma/include/lib/dvb/edvb.h
index 70b7e48..2101a75 100644
--- a/tuxbox/enigma/include/lib/dvb/edvb.h
+++ b/tuxbox/enigma/include/lib/dvb/edvb.h
@@ -109,7 +109,7 @@ public:
* "switchService" which can be called almost
* stateless from everywhere...
*/
-class eDVB: public Object
+class eDVB: public sigc::trackable
{
static eDVB *instance;
void init_eDVB();
@@ -129,10 +129,10 @@ public:
eAUTable<BAT> tBAT;
EIT *parentEIT;
- Signal2<void, EIT*, int> gotEIT;
- Signal1<void, SDT*> gotSDT;
- Signal1<void, PMT*> gotPMT;
- Signal1<void, int> gotContentPid;
+ sigc::signal<void, EIT*, int> gotEIT;
+ sigc::signal<void, SDT*> gotSDT;
+ sigc::signal<void, PMT*> gotPMT;
+ sigc::signal<void, int> gotContentPid;
// use from external classes to get PMT/EIT/SDT ... for refcounting
PMT *getPMT();
@@ -176,18 +176,18 @@ public:
const eDVBState &getState() const { return state; }
void setState(const eDVBState &newstate) { /*emit*/ stateChanged(state=newstate); }
void event(const eDVBEvent &event);
- Signal1<void, const eDVBState&> stateChanged;
- Signal1<void, const eDVBEvent&> eventOccured;
-
- Signal1<void, bool> scrambled;
- Signal0<void> serviceListChanged;
- Signal0<void> bouquetListChanged;
- Signal1<void, const eServiceReferenceDVB &> leaveService;
- Signal1<void, const eServiceReferenceDVB &> enterService;
- Signal1<void, eTransponder*> leaveTransponder;
- Signal1<void, eTransponder*> enterTransponder;
- Signal2<void, eTransponder*, int> switchedTransponder;
- Signal2<void, const eServiceReferenceDVB &, int> switchedService;
+ sigc::signal<void, const eDVBState&> stateChanged;
+ sigc::signal<void, const eDVBEvent&> eventOccured;
+
+ sigc::signal<void, bool> scrambled;
+ sigc::signal<void> serviceListChanged;
+ sigc::signal<void> bouquetListChanged;
+ sigc::signal<void, const eServiceReferenceDVB &> leaveService;
+ sigc::signal<void, const eServiceReferenceDVB &> enterService;
+ sigc::signal<void, eTransponder*> leaveTransponder;
+ sigc::signal<void, eTransponder*> enterTransponder;
+ sigc::signal<void, eTransponder*, int> switchedTransponder;
+ sigc::signal<void, const eServiceReferenceDVB &, int> switchedService;
/////////////////////////Scan and Service Controller////////////////////////////
public:
@@ -216,7 +216,7 @@ public:
/* container for settings */
eDVBSettings *settings;
- Signal0<void> timeUpdated;
+ sigc::signal<void> timeUpdated;
int time_difference;
};
diff --git a/tuxbox/enigma/include/lib/dvb/epgcache.h b/tuxbox/enigma/include/lib/dvb/epgcache.h
index 78e1919..06f89bd 100644
--- a/tuxbox/enigma/include/lib/dvb/epgcache.h
+++ b/tuxbox/enigma/include/lib/dvb/epgcache.h
@@ -267,7 +267,7 @@ class ePrivateContent: public eSection
};
#endif
-class eEPGCache: public eMainloop, private eThread, public Object
+class eEPGCache: public eMainloop, private eThread, public sigc::trackable
{
public:
#ifdef ENABLE_MHW_EPG
@@ -417,8 +417,8 @@ public:
bool CheckBouquets(uniqueEPGKey &key);
inline void ClearCache() { flushEPG(); }
- Signal1<void, bool> EPGAvail;
- Signal0<void> EPGUpdated;
+ sigc::signal<void, bool> EPGAvail;
+ sigc::signal<void> EPGUpdated;
};
inline const std::list<NVODReferenceEntry>* eEPGCache::getNVODRefList(const eServiceReferenceDVB &service)
diff --git a/tuxbox/enigma/include/lib/dvb/esection.h b/tuxbox/enigma/include/lib/dvb/esection.h
index 2c0c417..351cee0 100644
--- a/tuxbox/enigma/include/lib/dvb/esection.h
+++ b/tuxbox/enigma/include/lib/dvb/esection.h
@@ -35,7 +35,7 @@ public:
int read(__u8 *data);
};
-class eSection: public Object
+class eSection: public sigc::trackable
{
eMainloop *context;
eSectionReader reader;
@@ -78,7 +78,7 @@ class eTable: public eSection
protected:
virtual int data(__u8 *data)=0;
public:
- Signal1<void, int> tableReady;
+ sigc::signal<void, int> tableReady;
eTable(int pid, int tableid, int tableidext=-1, int version=-1);
eTable(int pid, int tableid, int tableidmask, int tableidext, int version);
eTable();
@@ -89,13 +89,13 @@ public:
int ready;
};
-class eAUGTable: public Object
+class eAUGTable: public sigc::trackable
{
protected:
eString dmxdev;
void slotTableReady(int);
public:
- Signal1<void, int> tableReady;
+ sigc::signal<void, int> tableReady;
virtual void getNext(int err)=0;
};
diff --git a/tuxbox/enigma/include/lib/dvb/frontend.h b/tuxbox/enigma/include/lib/dvb/frontend.h
index 5c3f695..fbdf1db 100644
--- a/tuxbox/enigma/include/lib/dvb/frontend.h
+++ b/tuxbox/enigma/include/lib/dvb/frontend.h
@@ -71,7 +71,7 @@ struct eSecCmdSequence
*
* A frontend is something like a tuner. You can tune to a transponder (or channel, as called with DVB-C).
*/
-class eFrontend: public Object
+class eFrontend: public sigc::trackable
{
int type,
fd,
@@ -99,7 +99,7 @@ class eFrontend: public Object
checkRotorLockTimer, checkLockTimer, updateTransponderTimer;
eSocketNotifier *sn;
int tries, noRotorCmd, wasLoopthrough, lostlockcount;
- Signal1<void, eTransponder*> tpChanged;
+ sigc::signal<void, eTransponder*> tpChanged;
// ROTOR INPUTPOWER
timeval rotorTimeout;
int idlePowerInput;
@@ -139,9 +139,9 @@ public:
void enableRotor() { noRotorCmd = 0, lastRotorCmd=-1; } // rotor cmd is sent when tune
int sendDiSEqCCmd( int addr, int cmd, eString params="", int frame=0xE0 );
- Signal1<void, int> s_RotorRunning;
- Signal0<void> s_RotorStopped, s_RotorTimeout;
- Signal2<void, eTransponder*, int> tunedIn;
+ sigc::signal<void, int> s_RotorRunning;
+ sigc::signal<void> s_RotorStopped, s_RotorTimeout;
+ sigc::signal<void, eTransponder*, int> tunedIn;
~eFrontend();
static int open(int type)
diff --git a/tuxbox/enigma/include/lib/dvb/record.h b/tuxbox/enigma/include/lib/dvb/record.h
index a529ca8..953d58b 100644
--- a/tuxbox/enigma/include/lib/dvb/record.h
+++ b/tuxbox/enigma/include/lib/dvb/record.h
@@ -32,7 +32,7 @@
* \todo Howto disable this warning?
*/
-class eDVBRecorder: private eThread, public Object
+class eDVBRecorder: private eThread, public sigc::trackable
{
enum { stateRunning = 1, stateStopped = 0, stateError = 2 }state;
struct eDVBRecorderMessage
@@ -174,7 +174,7 @@ public:
void validatePIDs();
enum { recWriteError };
- Signal1<void,int> recMessage;
+ sigc::signal<void,int> recMessage;
eServiceReferenceDVB recRef;
bool scrambled;
void SetSlice(int slice);
diff --git a/tuxbox/enigma/include/lib/dvb/service.h b/tuxbox/enigma/include/lib/dvb/service.h
index 7f67a5c..9f21882 100644
--- a/tuxbox/enigma/include/lib/dvb/service.h
+++ b/tuxbox/enigma/include/lib/dvb/service.h
@@ -77,7 +77,7 @@ class PMT;
class SDT;
class PMTEntry;
-class eServiceHandler: public Object
+class eServiceHandler: public sigc::trackable
{
protected:
int id;
@@ -145,10 +145,10 @@ public:
// simple "info" functions..
virtual eString getInfo(int id); // 0: status, 1+2 upper/lower line :)
- Signal1<void, const eServiceEvent &> serviceEvent;
+ sigc::signal<void, const eServiceEvent &> serviceEvent;
// service list functions
- virtual void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ virtual void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
virtual void leaveDirectory(const eServiceReference &dir);
virtual eService *addRef(const eServiceReference &service);
@@ -157,13 +157,13 @@ public:
class eService;
-class eServiceInterface: public Object
+class eServiceInterface: public sigc::trackable
{
eServiceHandler *currentServiceHandler;
std::map<int,eServiceHandler*> handlers;
int switchServiceHandler(int id, int workaround=0);
- SigC::Connection conn;
+ sigc::connection conn;
void handleServiceEvent(const eServiceEvent &event);
static eServiceInterface *instance;
@@ -180,7 +180,7 @@ public:
int play(const eServiceReference &service, int workaround );
// service related functions
- Signal1<void,const eServiceEvent &> serviceEvent;
+ sigc::signal<void,const eServiceEvent &> serviceEvent;
eServiceHandler *getService()
{
@@ -192,7 +192,7 @@ public:
eServiceReference service;
// service list functions
- void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &dir);
// stuff for modifiying ...
diff --git a/tuxbox/enigma/include/lib/dvb/servicecache.h b/tuxbox/enigma/include/lib/dvb/servicecache.h
index b80af67..14b3003 100644
--- a/tuxbox/enigma/include/lib/dvb/servicecache.h
+++ b/tuxbox/enigma/include/lib/dvb/servicecache.h
@@ -41,7 +41,7 @@ private:
public:
eServiceCacheBase(){};
virtual ~eServiceCacheBase(){};
- void enterDirectory(const eServiceReference &parent, Signal1<void, const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &parent, sigc::signal<void, const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &parent);
void addPersistentService(const eServiceReference &serviceref, eService *service);
eService *addRef(const eServiceReference &serviceref);
diff --git a/tuxbox/enigma/include/lib/dvb/servicedvb.h b/tuxbox/enigma/include/lib/dvb/servicedvb.h
index 1b0e39a..e08ae31 100644
--- a/tuxbox/enigma/include/lib/dvb/servicedvb.h
+++ b/tuxbox/enigma/include/lib/dvb/servicedvb.h
@@ -41,7 +41,7 @@ public:
eString getTimeshiftPath();
};
-class eDVRPlayerThread: public eThread, public eMainloop, public Object
+class eDVRPlayerThread: public eThread, public eMainloop, public sigc::trackable
{
eServiceHandlerDVB *handler;
eIOBuffer buffer;
@@ -199,7 +199,7 @@ public:
void addFile(void *node, const eString &filename);
#endif
- void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &dir);
eService *addRef(const eServiceReference &service);
diff --git a/tuxbox/enigma/include/lib/dvb/serviceexternal.h b/tuxbox/enigma/include/lib/dvb/serviceexternal.h
index 141e06d..9cefffc 100644
--- a/tuxbox/enigma/include/lib/dvb/serviceexternal.h
+++ b/tuxbox/enigma/include/lib/dvb/serviceexternal.h
@@ -41,7 +41,7 @@ public:
static eServiceHandlerExternal *getInstance() { return instance; }
};
-class ePlayerThread: public eThread, public Object
+class ePlayerThread: public eThread, public sigc::trackable
{
eFixedMessagePump<int> message;
eString command;
diff --git a/tuxbox/enigma/include/lib/dvb/servicefile.h b/tuxbox/enigma/include/lib/dvb/servicefile.h
index 43c77fe..db45495 100644
--- a/tuxbox/enigma/include/lib/dvb/servicefile.h
+++ b/tuxbox/enigma/include/lib/dvb/servicefile.h
@@ -12,7 +12,7 @@ class eServiceFileHandler: public eServiceHandler
eServiceReference result;
public:
- Signal2<void,void*,const eString &> fileHandlers, directoryHandlers;
+ sigc::signal<void,void*,const eString &> fileHandlers, directoryHandlers;
void addReference(void *node, const eServiceReference &ref);
static eServiceFileHandler *getInstance() { return instance; }
@@ -23,7 +23,7 @@ public:
~eServiceFileHandler();
// service list functions
- void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &dir);
int deleteService(const eServiceReference &dir, const eServiceReference &ref);
diff --git a/tuxbox/enigma/include/lib/dvb/servicemp3.h b/tuxbox/enigma/include/lib/dvb/servicemp3.h
index 0e4ea35..b947359 100644
--- a/tuxbox/enigma/include/lib/dvb/servicemp3.h
+++ b/tuxbox/enigma/include/lib/dvb/servicemp3.h
@@ -27,11 +27,11 @@ public:
eHTTPStream(eHTTPConnection *c, eIOBuffer &buffer);
~eHTTPStream();
void haveData(void *data, int len);
- Signal0<void> dataAvailable;
- Signal1<void,eString> metaDataUpdated;
+ sigc::signal<void> dataAvailable;
+ sigc::signal<void,eString> metaDataUpdated;
};
-class eMP3Decoder: public eThread, public eMainloop, public Object
+class eMP3Decoder: public eThread, public eMainloop, public sigc::trackable
{
eServiceHandlerMP3 *handler;
eAudioDecoder *audiodecoder;
diff --git a/tuxbox/enigma/include/lib/dvb/serviceplaylist.h b/tuxbox/enigma/include/lib/dvb/serviceplaylist.h
index 3e9d650..7e368a7 100644
--- a/tuxbox/enigma/include/lib/dvb/serviceplaylist.h
+++ b/tuxbox/enigma/include/lib/dvb/serviceplaylist.h
@@ -129,7 +129,7 @@ public:
~eServicePlaylistHandler();
// service list functions
- void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &dir);
eService *addRef(const eServiceReference &service);
diff --git a/tuxbox/enigma/include/lib/dvb/servicestructure.h b/tuxbox/enigma/include/lib/dvb/servicestructure.h
index 7cc6d4a..feb1357 100644
--- a/tuxbox/enigma/include/lib/dvb/servicestructure.h
+++ b/tuxbox/enigma/include/lib/dvb/servicestructure.h
@@ -16,7 +16,7 @@ public:
~eServiceStructureHandler();
// service list functions
- void enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback);
+ void enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback);
void leaveDirectory(const eServiceReference &dir);
eService* addRef(const eServiceReference&);
void removeRef(const eServiceReference&);
diff --git a/tuxbox/enigma/include/lib/dvb/settings.h b/tuxbox/enigma/include/lib/dvb/settings.h
index ea145d6..e9e5feb 100644
--- a/tuxbox/enigma/include/lib/dvb/settings.h
+++ b/tuxbox/enigma/include/lib/dvb/settings.h
@@ -6,7 +6,7 @@
class eDVB;
-class eDVBSettings: public Object
+class eDVBSettings: public sigc::trackable
{
eDVB &dvb;
std::map<eString, eBouquet*> bouquet_name_map;
diff --git a/tuxbox/enigma/include/lib/gui/actions.h b/tuxbox/enigma/include/lib/gui/actions.h
index 5053444..2c5ff47 100644
--- a/tuxbox/enigma/include/lib/gui/actions.h
+++ b/tuxbox/enigma/include/lib/gui/actions.h
@@ -62,7 +62,7 @@ public:
keys[style].insert(key);
}
eAction* setDescription(char *desc) { description = desc; return this;}
- Signal0<void> handler;
+ sigc::signal<void> handler;
// keylist &getKeyList();
int containsKey(const eRCKey &key, const eString& style ) const;
diff --git a/tuxbox/enigma/include/lib/gui/combobox.h b/tuxbox/enigma/include/lib/gui/combobox.h
index e2991b2..ffe601d 100644
--- a/tuxbox/enigma/include/lib/gui/combobox.h
+++ b/tuxbox/enigma/include/lib/gui/combobox.h
@@ -23,8 +23,8 @@ public:
~eComboBox();
void setOpenWidth( int w ) { listbox.resize( eSize(w, listbox.getSize().height()) ); }
enum { OK = 0, ERROR=1, E_ALLREADY_SELECTED = 2, E_COULDNT_FIND = 4, E_INVALID_ENTRY = 8 };
- Signal1< void, eListBoxEntryText* > selchanged;
- Signal2< void, eComboBox*, eListBoxEntryText* > selchanged_id;
+ sigc::signal< void, eListBoxEntryText* > selchanged;
+ sigc::signal< void, eComboBox*, eListBoxEntryText* > selchanged_id;
enum { /*flagVCenter=64 in eLabel*/ flagSorted=128, flagShowEntryHelp=256 };
eComboBox(eWidget* parent, int OpenEntries=5, eLabel* desc=0, int takefocus=1, const char *deco="eComboBox" );
void takeEntry( eListBoxEntryText* );
diff --git a/tuxbox/enigma/include/lib/gui/ebutton.h b/tuxbox/enigma/include/lib/gui/ebutton.h
index afcb114..d0b5ef0 100644
--- a/tuxbox/enigma/include/lib/gui/ebutton.h
+++ b/tuxbox/enigma/include/lib/gui/ebutton.h
@@ -32,8 +32,8 @@ public:
*
* This signals is emitted when OK is pressed.
*/
- Signal0<void> selected;
- Signal1<void, eButton*> selected_id;
+ sigc::signal<void> selected;
+ sigc::signal<void, eButton*> selected_id;
};
#endif
diff --git a/tuxbox/enigma/include/lib/gui/echeckbox.h b/tuxbox/enigma/include/lib/gui/echeckbox.h
index d2ecf1b..5278b29 100644
--- a/tuxbox/enigma/include/lib/gui/echeckbox.h
+++ b/tuxbox/enigma/include/lib/gui/echeckbox.h
@@ -16,7 +16,7 @@ private:
bool swapTxtPixmap;
void init_eCheckbox(int checked);
public:
- Signal1<void, int> checked;
+ sigc::signal<void, int> checked;
eCheckbox(eWidget *parent, int checked=0, int takefocus=1, bool swapTxtPixmap=false, const char *deco="eCheckBox" );
~eCheckbox();
void setCheck(int c);
diff --git a/tuxbox/enigma/include/lib/gui/enumber.h b/tuxbox/enigma/include/lib/gui/enumber.h
index 00f1cb6..165d1ed 100644
--- a/tuxbox/enigma/include/lib/gui/enumber.h
+++ b/tuxbox/enigma/include/lib/gui/enumber.h
@@ -39,8 +39,8 @@ public:
static void unpack(__u32 l, int *t);
static void pack(__u32 &l, int *t);
void invalidateNum();
- Signal1<void, int*> selected;
- Signal0<void> numberChanged;
+ sigc::signal<void, int*> selected;
+ sigc::signal<void> numberChanged;
eNumber(eWidget *parent, int len, int min, int max, int maxdigits, int *init, int isactive=0, eWidget* descr=0, int grabfocus=1, const char* deco="eNumber" );
~eNumber();
int getNumber(int f) { if ((f>=0) && (f<len)) return number[f]; return -1; }
diff --git a/tuxbox/enigma/include/lib/gui/ewidget.h b/tuxbox/enigma/include/lib/gui/ewidget.h
index 000cc30..60335d4 100644
--- a/tuxbox/enigma/include/lib/gui/ewidget.h
+++ b/tuxbox/enigma/include/lib/gui/ewidget.h
@@ -72,7 +72,7 @@ public:
/** \brief The main widget class. All widgets inherit this class.
* eWidget handles focus management.
*/
-class eWidget: public Object
+class eWidget: public sigc::trackable
{
enum
{
@@ -115,9 +115,9 @@ public:
* used from a existing statusbar.
* \sa eWidget::focusChanged
*/
- Signal1<void, const eWidget*> focusChanged;
- static Signal2< void, ePtrList<eAction>*, int > showHelp;
- static Signal1<void, const eWidget*> globalFocusChanged;
+ sigc::signal<void, const eWidget*> focusChanged;
+ static sigc::signal< void, ePtrList<eAction>*, int > showHelp;
+ static sigc::signal<void, const eWidget*> globalFocusChanged;
protected:
ePtrList<eAction> actionHelpList;
int helpID;
diff --git a/tuxbox/enigma/include/lib/gui/listbox.h b/tuxbox/enigma/include/lib/gui/listbox.h
index 6609e21..a055205 100644
--- a/tuxbox/enigma/include/lib/gui/listbox.h
+++ b/tuxbox/enigma/include/lib/gui/listbox.h
@@ -100,8 +100,8 @@ class eListBox: public eListBoxBase
/*emit*/ selchanged((T*)entry);
}
public:
- Signal1<void, T*> selected;
- Signal1<void, T*> selchanged;
+ sigc::signal<void, T*> selected;
+ sigc::signal<void, T*> selchanged;
eListBox(eWidget *parent, const eWidget* descr=0, int takefocus=1 )
:eListBoxBase( parent, descr, takefocus, T::getEntryHeight() )
{
@@ -166,8 +166,8 @@ class eListBoxExt: public eListBoxBaseExt
/*emit*/ selchanged((T*)entry);
}
public:
- Signal1<void, T*> selected;
- Signal1<void, T*> selchanged;
+ sigc::signal<void, T*> selected;
+ sigc::signal<void, T*> selchanged;
eListBoxExt(eWidget *parent, const eWidget* descr=0, int takefocus=1 )
:eListBoxBaseExt( parent, descr, takefocus, T::getEntryHeight() )
{
@@ -201,7 +201,7 @@ public:
}
};
-class eListBoxEntry: public Object
+class eListBoxEntry: public sigc::trackable
{
friend class eListBox<eListBoxEntry>;
protected:
@@ -370,19 +370,21 @@ class eListBoxEntryMenu: public eListBoxEntryText
{
friend class eListBox<eListBoxEntryMenu>;
public:
- Signal0<void> selected;
+ sigc::signal<void> selected;
eListBoxEntryMenu(eListBox<eListBoxEntryMenu>* lb, const char* txt, const eString &hlptxt="", int align=0, void *key = NULL, int keytype = value )
:eListBoxEntryText((eListBox<eListBoxEntryText>*)lb, txt, key, align, hlptxt, keytype)
{
- if (listbox)
+ if (listbox) {
CONNECT(listbox->selected, eListBoxEntryMenu::LBSelected);
+ }
}
eListBoxEntryMenu(eListBox<eListBoxEntryMenu>* lb, const eString &txt, const eString &hlptxt="", int align=0, void *key = NULL, int keytype = value )
:eListBoxEntryText((eListBox<eListBoxEntryText>*)lb, txt, key, align, hlptxt, keytype)
{
- if (listbox)
+ if (listbox) {
CONNECT(listbox->selected, eListBoxEntryMenu::LBSelected);
+ }
}
virtual void LBSelected(eListBoxEntry* t)
@@ -419,7 +421,7 @@ class eListBoxEntryCheck: public eListBoxEntryMenu
int checked;
void LBSelected(eListBoxEntry* t);
public:
- Signal1<void,bool> selected;
+ sigc::signal<void,bool> selected;
eListBoxEntryCheck( eListBox<eListBoxEntryMenu> *lb, const char* text, const char* regkey, const eString& hlptxt="" );
const eString& redraw(gPainter *rc, const eRect& rect, gColor coActiveB, gColor coActiveF, gColor coNormalB, gColor coNormalF, int state );
};
diff --git a/tuxbox/enigma/include/lib/gui/slider.h b/tuxbox/enigma/include/lib/gui/slider.h
index 892e09f..3ef3ca7 100644
--- a/tuxbox/enigma/include/lib/gui/slider.h
+++ b/tuxbox/enigma/include/lib/gui/slider.h
@@ -21,7 +21,7 @@ public:
void setIncrement( int i );
void setValue( int i );
int getValue();
- Signal1<void, int> changed;
+ sigc::signal<void, int> changed;
eSlider( eWidget *parent, const eWidget *descr=0, int min=0, int max=99 );
};
diff --git a/tuxbox/enigma/include/lib/gui/statusbar.h b/tuxbox/enigma/include/lib/gui/statusbar.h
index b16f1eb..2b6d754 100644
--- a/tuxbox/enigma/include/lib/gui/statusbar.h
+++ b/tuxbox/enigma/include/lib/gui/statusbar.h
@@ -11,7 +11,7 @@ class eStatusBar : public eLabel
int setProperty(const eString &, const eString &);
void initialize();
- Connection conn;
+ sigc::connection conn;
void init_eStatusBar();
public:
enum
diff --git a/tuxbox/enigma/include/lib/movieplayer/movieplayer.h b/tuxbox/enigma/include/lib/movieplayer/movieplayer.h
index 45e4d8d..d642304 100644
--- a/tuxbox/enigma/include/lib/movieplayer/movieplayer.h
+++ b/tuxbox/enigma/include/lib/movieplayer/movieplayer.h
@@ -38,7 +38,7 @@ struct player_value
short AC3;
};
-class eMoviePlayer: public eMainloop, private eThread, public Object
+class eMoviePlayer: public eMainloop, private eThread, public sigc::trackable
{
struct Message
{
diff --git a/tuxbox/enigma/include/lib/socket/socket.h b/tuxbox/enigma/include/lib/socket/socket.h
index 3fbf811..b35c033 100644
--- a/tuxbox/enigma/include/lib/socket/socket.h
+++ b/tuxbox/enigma/include/lib/socket/socket.h
@@ -15,7 +15,7 @@
#include <libsig_comp.h>
#include <lib/base/buffer.h>
-class eSocket: public Object
+class eSocket: public sigc::trackable
{
private:
int issocket;
@@ -53,12 +53,12 @@ public:
Listening, Connection, Closing };
int state();
- Signal0<void> connectionClosed_;
- Signal0<void> connected_;
- Signal0<void> readyRead_;
- Signal0<void> hangup;
- Signal1<void,int> bytesWritten_;
- Signal1<void,int> error_;
+ sigc::signal<void> connectionClosed_;
+ sigc::signal<void> connected_;
+ sigc::signal<void> readyRead_;
+ sigc::signal<void> hangup;
+ sigc::signal<void,int> bytesWritten_;
+ sigc::signal<void,int> error_;
};
class eUnixDomainSocket: public eSocket
diff --git a/tuxbox/enigma/include/lib/system/file_eraser.h b/tuxbox/enigma/include/lib/system/file_eraser.h
index bf2cefd..12c5443 100644
--- a/tuxbox/enigma/include/lib/system/file_eraser.h
+++ b/tuxbox/enigma/include/lib/system/file_eraser.h
@@ -4,7 +4,7 @@
#include <lib/base/thread.h>
#include <lib/base/message.h>
-class eBackgroundFileEraser: public eMainloop, private eThread, public Object
+class eBackgroundFileEraser: public eMainloop, private eThread, public sigc::trackable
{
struct Message
{
diff --git a/tuxbox/enigma/include/lib/system/httpd.h b/tuxbox/enigma/include/lib/system/httpd.h
index 52b80c8..85700b1 100644
--- a/tuxbox/enigma/include/lib/system/httpd.h
+++ b/tuxbox/enigma/include/lib/system/httpd.h
@@ -87,8 +87,8 @@ private:
void destruct();
void init_eHTTPConnection();
public:
- Signal1<void,int> transferDone;
- Signal1<eHTTPDataSource*,eHTTPConnection*> createDataSource;
+ sigc::signal<void,int> transferDone;
+ sigc::signal<eHTTPDataSource*,eHTTPConnection*> createDataSource;
enum
{
/*
diff --git a/tuxbox/enigma/include/libsig_comp.h b/tuxbox/enigma/include/libsig_comp.h
index 83550ed..decc616 100644
--- a/tuxbox/enigma/include/libsig_comp.h
+++ b/tuxbox/enigma/include/libsig_comp.h
@@ -5,29 +5,29 @@
#include <sigc++/bind.h>
#ifdef SIGC_CXX_NAMESPACES
-using namespace SigC;
+using namespace sigc;
#endif
-#define CONNECT(SENDER, EMPFAENGER) SENDER.connect(slot(*this, &EMPFAENGER))
+#define CONNECT(SENDER, EMPFAENGER) SENDER.connect( mem_fun(*this, &EMPFAENGER))
// use this Makro to connect with a method
// void bla::foo(int x);
// to an
-// Signal<void, int> testSig;
+// sigc::signal<void, int> testSig;
//
// CONNECT(testSig, bla::foo);
-// signal and method (slot) must have the same signature
+// signal and method (slot)(mem_fun) must have the same signature
-#define CONNECT_1_0(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
+#define CONNECT_1_0(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( mem_fun(*this, &EMPFAENGER) ,PARAM ) )
// use this for connect with a method
// void bla::foo(int);
// to an
-// Signal0<void> testSig;
+// sigc::signal<void> testSig;
// CONNECT_1_0(testSig, bla:foo, 0);
// here the signal has no parameter, but the slot have an int
// the last parameter of the CONNECT_1_0 makro is the value that given to the paramater of the Slot method
-#define CONNECT_2_0(SENDER, EMPFAENGER, PARAM1, PARAM2) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM1, PARAM2 ) )
+#define CONNECT_2_0(SENDER, EMPFAENGER, PARAM1, PARAM2) SENDER.connect( bind( mem_fun(*this, &EMPFAENGER) ,PARAM1, PARAM2 ) )
-#define CONNECT_2_1(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
+#define CONNECT_2_1(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( mem_fun(*this, &EMPFAENGER) ,PARAM ) )
#endif // __LIBSIG_COMP_H
diff --git a/tuxbox/enigma/lib/base/eerror.cpp b/tuxbox/enigma/lib/base/eerror.cpp
index 2926bbf..d700173 100644
--- a/tuxbox/enigma/lib/base/eerror.cpp
+++ b/tuxbox/enigma/lib/base/eerror.cpp
@@ -74,7 +74,7 @@ pthread_mutex_t signalLock =
int infatal=0;
-Signal2<void, int, const eString&> logOutput;
+sigc::signal<void, int, const eString&> logOutput;
int logOutputConsole=1;
void eFatal(const char* fmt, ...)
diff --git a/tuxbox/enigma/lib/codecs/codecmp3.cpp b/tuxbox/enigma/lib/codecs/codecmp3.cpp
index 8e0f602..294ac75 100644
--- a/tuxbox/enigma/lib/codecs/codecmp3.cpp
+++ b/tuxbox/enigma/lib/codecs/codecmp3.cpp
@@ -33,7 +33,7 @@ eAudioDecoderMP3::~eAudioDecoderMP3()
mad_stream_finish(&stream);
}
-int eAudioDecoderMP3::decodeMore(int last, int maxsamples, Signal1<void, unsigned int> *)
+int eAudioDecoderMP3::decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int> *)
{
int written = 0;
while (last || (written < maxsamples))
diff --git a/tuxbox/enigma/lib/codecs/codecmpg.cpp b/tuxbox/enigma/lib/codecs/codecmpg.cpp
index dc8f08c..8a5df51 100644
--- a/tuxbox/enigma/lib/codecs/codecmpg.cpp
+++ b/tuxbox/enigma/lib/codecs/codecmpg.cpp
@@ -191,7 +191,7 @@ eDemux::~eDemux()
delete [] sheader;
}
-int eMPEGDemux::decodeMore(int last, int maxsamples, Signal1<void,unsigned int>*newastreamid)
+int eMPEGDemux::decodeMore(int last, int maxsamples, sigc::signal<void,unsigned int>*newastreamid)
{
// eDebug("decodeMore");
int written=0;
@@ -613,7 +613,7 @@ finish:
return written;
}
-int ePVADemux::decodeMore(int last, int maxsamples, Signal1<void,unsigned int>*newastreamid )
+int ePVADemux::decodeMore(int last, int maxsamples, sigc::signal<void,unsigned int>*newastreamid )
{
// eDebug("decodeMore");
int written=0;
diff --git a/tuxbox/enigma/lib/codecs/codecogg.cpp b/tuxbox/enigma/lib/codecs/codecogg.cpp
index 09b93c5..5abc8d6 100644
--- a/tuxbox/enigma/lib/codecs/codecogg.cpp
+++ b/tuxbox/enigma/lib/codecs/codecogg.cpp
@@ -64,7 +64,7 @@ eAudioDecoderOgg::~eAudioDecoderOgg()
ov_clear(&vf);
}
-int eAudioDecoderOgg::decodeMore(int last, int maxsamples, Signal1<void, unsigned int> *)
+int eAudioDecoderOgg::decodeMore(int last, int maxsamples, sigc::signal<void, unsigned int> *)
{
//eDebug ("[OGG]decodeMore:%d,%d,%d",last,maxsamples,input.size());
int written = 0;
diff --git a/tuxbox/enigma/lib/dvb/dvb.cpp b/tuxbox/enigma/lib/dvb/dvb.cpp
index b98998a..885060e 100644
--- a/tuxbox/enigma/lib/dvb/dvb.cpp
+++ b/tuxbox/enigma/lib/dvb/dvb.cpp
@@ -959,7 +959,7 @@ void eTransponderList::leaveTransponder( eTransponder* )
this->callback=0;
}
-void eTransponderList::startHandleSDT(const SDT *sdt, eDVBNamespace dvbnamespace, eOriginalNetworkID onid, eTransportStreamID tsid, Signal0<void> *callback, int startstate )
+void eTransponderList::startHandleSDT(const SDT *sdt, eDVBNamespace dvbnamespace, eOriginalNetworkID onid, eTransportStreamID tsid, sigc::signal<void> *callback, int startstate )
{
sdtscanstate=startstate;
leaveTransponder(0);
@@ -969,7 +969,7 @@ void eTransponderList::startHandleSDT(const SDT *sdt, eDVBNamespace dvbnamespace
handleSDT(sdt, dvbnamespace, onid, tsid, callback );
}
-void eTransponderList::handleSDT(const SDT *sdt, eDVBNamespace dvbnamespace, eOriginalNetworkID onid, eTransportStreamID tsid, Signal0<void> *callback )
+void eTransponderList::handleSDT(const SDT *sdt, eDVBNamespace dvbnamespace, eOriginalNetworkID onid, eTransportStreamID tsid, sigc::signal<void> *callback )
{
if ( sdt )
{
@@ -1101,7 +1101,7 @@ void eTransponderList::handleSDT(const SDT *sdt, eDVBNamespace dvbnamespace, eOr
delete pmt;
pmt=0;
- Signal0<void> &cb = *this->callback;
+ sigc::signal<void> &cb = *this->callback;
this->callback = 0;
/*emit*/ cb();
diff --git a/tuxbox/enigma/lib/dvb/service.cpp b/tuxbox/enigma/lib/dvb/service.cpp
index a56d3ae..1c29f0f 100644
--- a/tuxbox/enigma/lib/dvb/service.cpp
+++ b/tuxbox/enigma/lib/dvb/service.cpp
@@ -88,7 +88,7 @@ void eServiceHandler::setAudioStream( unsigned int )
{
}
-void eServiceHandler::enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback)
+void eServiceHandler::enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback)
{
(void)dir;
(void)callback;
@@ -224,7 +224,7 @@ int eServiceInterface::stop(int workaround)
return res;
}
-void eServiceInterface::enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback)
+void eServiceInterface::enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback)
{
int pLockActive = eConfig::getInstance()->pLockActive();
if ( dir.isLocked() && pLockActive && !checkPin( eConfig::getInstance()->getParentalPin(), _("parental") ) )
diff --git a/tuxbox/enigma/lib/dvb/servicecache.cpp b/tuxbox/enigma/lib/dvb/servicecache.cpp
index 271bf5f..cd3c321 100644
--- a/tuxbox/enigma/lib/dvb/servicecache.cpp
+++ b/tuxbox/enigma/lib/dvb/servicecache.cpp
@@ -1,7 +1,7 @@
#include <lib/dvb/servicecache.h>
#include <lib/system/econfig.h>
-void eServiceCacheBase::enterDirectory(const eServiceReference &parent, Signal1<void, const eServiceReference&> &callback)
+void eServiceCacheBase::enterDirectory(const eServiceReference &parent, sigc::signal<void, const eServiceReference&> &callback)
{
// int pLockActive = eConfig::getInstance()->pLockActive();
std::map<eServiceReference,eNode>::iterator i=cache.find(parent);
diff --git a/tuxbox/enigma/lib/dvb/servicedvb.cpp b/tuxbox/enigma/lib/dvb/servicedvb.cpp
index a4ab1c8..a8a6041 100644
--- a/tuxbox/enigma/lib/dvb/servicedvb.cpp
+++ b/tuxbox/enigma/lib/dvb/servicedvb.cpp
@@ -1395,11 +1395,11 @@ void eServiceHandlerDVB::addFile(void *node, const eString &filename)
struct eServiceHandlerDVB_addService
{
- Signal1<void,const eServiceReference&> &callback;
+ sigc::signal<void,const eServiceReference&> &callback;
int type;
int DVBNamespace;
bool onlyNew;
- eServiceHandlerDVB_addService(Signal1<void,const eServiceReference&> &callback, int type, int DVBNamespace, bool onlyNew=false)
+ eServiceHandlerDVB_addService(sigc::signal<void,const eServiceReference&> &callback, int type, int DVBNamespace, bool onlyNew=false)
: callback(callback), type(type), DVBNamespace(DVBNamespace), onlyNew(onlyNew)
{
}
@@ -1440,7 +1440,7 @@ struct eServiceHandlerDVB_addService
}
};
-void eServiceHandlerDVB::enterDirectory(const eServiceReference &ref, Signal1<void,const eServiceReference&> &callback)
+void eServiceHandlerDVB::enterDirectory(const eServiceReference &ref, sigc::signal<void,const eServiceReference&> &callback)
{
switch (ref.type)
{
diff --git a/tuxbox/enigma/lib/dvb/servicefile.cpp b/tuxbox/enigma/lib/dvb/servicefile.cpp
index 9fdcdd4..a4d1352 100644
--- a/tuxbox/enigma/lib/dvb/servicefile.cpp
+++ b/tuxbox/enigma/lib/dvb/servicefile.cpp
@@ -143,7 +143,7 @@ eService *eServiceFileHandler::createService(const eServiceReference &node)
return handler->createService(node);
}
-void eServiceFileHandler::enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback)
+void eServiceFileHandler::enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback)
{
cache.enterDirectory(dir, callback);
}
diff --git a/tuxbox/enigma/lib/dvb/servicemp3.cpp b/tuxbox/enigma/lib/dvb/servicemp3.cpp
index 837dd4a..5f3f197 100644
--- a/tuxbox/enigma/lib/dvb/servicemp3.cpp
+++ b/tuxbox/enigma/lib/dvb/servicemp3.cpp
@@ -532,7 +532,7 @@ void eMP3Decoder::checkFlow(int last)
int samples=0;
if (last || (i >= audiodecoder->getMinimumFramelength()))
{
- Signal1<void, unsigned int> callback;
+ sigc::signal<void, unsigned int> callback;
CONNECT(callback, eMP3Decoder::newAudioStreamIdFound);
singleLock s(lock); // protect access on all eIOBuffer
samples=audiodecoder->decodeMore(last, 16384, &callback);
diff --git a/tuxbox/enigma/lib/dvb/serviceplaylist.cpp b/tuxbox/enigma/lib/dvb/serviceplaylist.cpp
index 85c8704..091c3b0 100644
--- a/tuxbox/enigma/lib/dvb/serviceplaylist.cpp
+++ b/tuxbox/enigma/lib/dvb/serviceplaylist.cpp
@@ -325,7 +325,7 @@ void eServicePlaylistHandler::removeRef(const eServiceReference &service)
return eServiceFileHandler::getInstance()->removeRef(service);
}
-void eServicePlaylistHandler::enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback)
+void eServicePlaylistHandler::enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback)
{
if (dir.type == id) // for playlists in other playlists..
{
diff --git a/tuxbox/enigma/lib/dvb/servicestructure.cpp b/tuxbox/enigma/lib/dvb/servicestructure.cpp
index 385a60e..61e2bd0 100644
--- a/tuxbox/enigma/lib/dvb/servicestructure.cpp
+++ b/tuxbox/enigma/lib/dvb/servicestructure.cpp
@@ -26,7 +26,7 @@ eServiceStructureHandler::~eServiceStructureHandler()
eServiceInterface::getInstance()->unregisterHandler(id);
}
-void eServiceStructureHandler::enterDirectory(const eServiceReference &dir, Signal1<void,const eServiceReference&> &callback)
+void eServiceStructureHandler::enterDirectory(const eServiceReference &dir, sigc::signal<void,const eServiceReference&> &callback)
{
cache.enterDirectory(dir, callback);
}
diff --git a/tuxbox/enigma/lib/dvb/subtitling.cpp b/tuxbox/enigma/lib/dvb/subtitling.cpp
index 9f00ca6..de7977a 100644
--- a/tuxbox/enigma/lib/dvb/subtitling.cpp
+++ b/tuxbox/enigma/lib/dvb/subtitling.cpp
@@ -596,4 +596,4 @@ void eSubtitleWidget::setForceHide(bool bhide)
forcehide = 0;
show();
}
-}
\ No newline at end of file
+}
diff --git a/tuxbox/enigma/lib/gui/ewidget.cpp b/tuxbox/enigma/lib/gui/ewidget.cpp
index 80e7478..723832d 100644
--- a/tuxbox/enigma/lib/gui/ewidget.cpp
+++ b/tuxbox/enigma/lib/gui/ewidget.cpp
@@ -24,8 +24,8 @@
extern eWidget *currentFocus;
eWidget *eWidget::root;
-Signal2< void, ePtrList<eAction>*, int >eWidget::showHelp;
-Signal1< void, const eWidget*>eWidget::globalFocusChanged;
+sigc::signal< void, ePtrList<eAction>*, int >eWidget::showHelp;
+sigc::signal< void, const eWidget*>eWidget::globalFocusChanged;
eWidget::actionMapList eWidget::globalActions;
eWidget::eWidget(eWidget *_parent, int takefocus)
diff --git a/tuxbox/enigma/src/engrab.h b/tuxbox/enigma/src/engrab.h
index 9c248b7..abb873c 100644
--- a/tuxbox/enigma/src/engrab.h
+++ b/tuxbox/enigma/src/engrab.h
@@ -7,7 +7,7 @@
#include <lib/gui/ewindow.h>
#include <lib/socket/socket.h>
-class ENgrab: public Object
+class ENgrab: public sigc::trackable
{
eString sendStr;
eString startxml( const char * descr=0 );
diff --git a/tuxbox/enigma/src/enigma.h b/tuxbox/enigma/src/enigma.h
index b61fa4e..41e8b3a 100644
--- a/tuxbox/enigma/src/enigma.h
+++ b/tuxbox/enigma/src/enigma.h
@@ -21,7 +21,7 @@ class eHTTPLogResolver;
extern eWidget *currentFocus;
-class eZap: public eApplication, public Object
+class eZap: public eApplication, public sigc::trackable
{
eHotplug hotplug;
static eZap *instance;
diff --git a/tuxbox/enigma/src/enigma_dyn.cpp b/tuxbox/enigma/src/enigma_dyn.cpp
index 24f6f37..879d007 100644
--- a/tuxbox/enigma/src/enigma_dyn.cpp
+++ b/tuxbox/enigma/src/enigma_dyn.cpp
@@ -949,7 +949,7 @@ void genHTMLServicesList(std::list <myService> &myList, eString &serviceRefList,
serviceList = serviceList.left(serviceList.length() - 2);
}
-class eWebNavigatorListDirectory2: public Object
+class eWebNavigatorListDirectory2: public sigc::trackable
{
std::list <myService> &myList;
eString path;
@@ -1067,9 +1067,9 @@ eString getZapContent(eString path, int depth, bool addEPG, bool sortList, bool
// first pass thru is to get all user bouquets
myList.clear();
eWebNavigatorListDirectory2 navlist(myList, path, *iface, addEPG, forceAll, addSatPos);
- Signal1<void, const eServiceReference&> signal;
- signal.connect(slot(navlist, &eWebNavigatorListDirectory2::addEntry));
- iface->enterDirectory(current_service, signal);
+ sigc::signal<void, const eServiceReference&> Signal;
+ Signal.connect(sigc::mem_fun(navlist, &eWebNavigatorListDirectory2::addEntry));
+ iface->enterDirectory(current_service, Signal);
// eDebug("entered");
iface->leaveDirectory(current_service);
// eDebug("exited");
@@ -1095,10 +1095,10 @@ eString getZapContent(eString path, int depth, bool addEPG, bool sortList, bool
myList2.clear();
eWebNavigatorListDirectory2 navlist(myList2, path, *iface, addEPG, forceAll, addSatPos);
- Signal1<void, const eServiceReference&> signal;
- signal.connect(slot(navlist, &eWebNavigatorListDirectory2::addEntry));
+ sigc::signal<void, const eServiceReference&> Signal;
+ Signal.connect(sigc::mem_fun(navlist, &eWebNavigatorListDirectory2::addEntry));
- iface->enterDirectory(current_service, signal);
+ iface->enterDirectory(current_service, Signal);
// eDebug("entered");
iface->leaveDirectory(current_service);
// eDebug("exited");
diff --git a/tuxbox/enigma/src/enigma_dyn_epg.cpp b/tuxbox/enigma/src/enigma_dyn_epg.cpp
index d389678..e3daeb3 100644
--- a/tuxbox/enigma/src/enigma_dyn_epg.cpp
+++ b/tuxbox/enigma/src/enigma_dyn_epg.cpp
@@ -287,7 +287,7 @@ eString getEITC(eString result, eString format)
#define CHANNELWIDTH 200
-class eMEPG: public Object
+class eMEPG: public sigc::trackable
{
int d_min;
eString multiEPG;
@@ -507,7 +507,7 @@ public:
,tableWidth((end - start) / 60 * d_min + channelWidth)
,channelWidth((pdaScreen == 0) ? CHANNELWIDTH : CHANNELWIDTH / 2)
{
- Signal1<void, const eServiceReference&> cbSignal;
+ sigc::signal<void, const eServiceReference&> cbSignal;
CONNECT(cbSignal, eMEPG::getcurepg);
eServiceInterface::getInstance()->enterDirectory(bouquetRef, cbSignal);
eServiceInterface::getInstance()->leaveDirectory(bouquetRef);
diff --git a/tuxbox/enigma/src/enigma_dyn_flash.h b/tuxbox/enigma/src/enigma_dyn_flash.h
index deb27b0..dcb9749 100755
--- a/tuxbox/enigma/src/enigma_dyn_flash.h
+++ b/tuxbox/enigma/src/enigma_dyn_flash.h
@@ -29,7 +29,7 @@ class eHTTPDynPathResolver;
void ezapFlashInitializeDyn(eHTTPDynPathResolver *dyn_resolver, bool lockWeb);
eString getConfigFlashMgr(void);
-class eFlashOperationsHandler: public eMainloop, private eThread, public Object
+class eFlashOperationsHandler: public eMainloop, private eThread, public sigc::trackable
{
eString progressMessage1, progressMessage2;
int progressComplete;
diff --git a/tuxbox/enigma/src/enigma_dyn_misc.cpp b/tuxbox/enigma/src/enigma_dyn_misc.cpp
index 2700487..e172c9e 100644
--- a/tuxbox/enigma/src/enigma_dyn_misc.cpp
+++ b/tuxbox/enigma/src/enigma_dyn_misc.cpp
@@ -638,7 +638,7 @@ static eString getTransponderServices(eString request, eString dirpath, eString
return "E: no DVB service is running.. or this is a playback";
}
-struct listContent: public Object
+struct listContent: public sigc::trackable
{
eString &result;
eServiceInterface *iface;
@@ -647,7 +647,7 @@ struct listContent: public Object
listContent(const eServiceReference &service, eServiceReference &bouquet, eString &result, bool listCont)
:result(result), iface(eServiceInterface::getInstance()), listCont(listCont), bouquet(bouquet)
{
- Signal1<void, const eServiceReference&> cbSignal;
+ sigc::signal<void, const eServiceReference&> cbSignal;
CONNECT(cbSignal, listContent::addToString);
iface->enterDirectory(service, cbSignal);
iface->leaveDirectory(service);
diff --git a/tuxbox/enigma/src/enigma_dyn_pda.cpp b/tuxbox/enigma/src/enigma_dyn_pda.cpp
index 5a0cdfc..07eea55 100644
--- a/tuxbox/enigma/src/enigma_dyn_pda.cpp
+++ b/tuxbox/enigma/src/enigma_dyn_pda.cpp
@@ -146,13 +146,13 @@ static eString getMute()
return result.str();
}
-struct countDVBServices: public Object
+struct countDVBServices: public sigc::trackable
{
int &count;
countDVBServices(const eServiceReference &bouquetRef, int &count)
:count(count)
{
- Signal1<void, const eServiceReference&> cbSignal;
+ sigc::signal<void, const eServiceReference&> cbSignal;
CONNECT(cbSignal, countDVBServices::countFunction);
eServiceInterface::getInstance()->enterDirectory(bouquetRef, cbSignal);
eServiceInterface::getInstance()->leaveDirectory(bouquetRef);
@@ -172,7 +172,7 @@ struct countDVBServices: public Object
}
};
-class eWebNavigatorListDirectory: public Object
+class eWebNavigatorListDirectory: public sigc::trackable
{
eString &result;
eString path;
@@ -256,10 +256,10 @@ eString getPDAZapContent(eString path)
else
{
eWebNavigatorListDirectory navlist(result, path, *iface);
- Signal1<void, const eServiceReference&> signal;
- signal.connect(slot(navlist, &eWebNavigatorListDirectory::addEntry));
+ sigc::signal<void, const eServiceReference&> Signal;
+ Signal.connect(sigc::mem_fun(navlist, &eWebNavigatorListDirectory::addEntry));
result += "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" border=\"0\">\n";
- iface->enterDirectory(current_service, signal);
+ iface->enterDirectory(current_service, Signal);
result += "</table>\n";
// eDebug("entered");
iface->leaveDirectory(current_service);
diff --git a/tuxbox/enigma/src/enigma_dyn_timer.cpp b/tuxbox/enigma/src/enigma_dyn_timer.cpp
index 8aa9470..e998059 100644
--- a/tuxbox/enigma/src/enigma_dyn_timer.cpp
+++ b/tuxbox/enigma/src/enigma_dyn_timer.cpp
@@ -116,7 +116,7 @@ static eString getAfterEvent(int type)
return result;
}
-class eWebNavigatorSearchService: public Object
+class eWebNavigatorSearchService: public sigc::trackable
{
eString &result;
eString searched_service;
@@ -408,9 +408,9 @@ static eString addTVBrowserTimerEvent(eString request, eString dirpath, eString
-2, -1, 0xFFFFFFFF);
eWebNavigatorSearchService navlist(result1, channel, *iface);
- Signal1<void, const eServiceReference&> signal;
- signal.connect(slot(navlist, &eWebNavigatorSearchService::addEntry));
- iface->enterDirectory(all_services, signal);
+ sigc::signal<void, const eServiceReference&> Signal;
+ Signal.connect(sigc::mem_fun(navlist, &eWebNavigatorSearchService::addEntry));
+ iface->enterDirectory(all_services, Signal);
eDebug("entered");
iface->leaveDirectory(all_services);
eDebug("exited");
diff --git a/tuxbox/enigma/src/enigma_dyn_wap.cpp b/tu...
[truncated message content] |
|
From: Thilo G. <tux...@ne...> - 2014-07-11 20:24:30
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via de0292418da878bd005e49c649204cf01a97cb8f (commit)
from 0f497fbae43b3176834ba22984e06b3b6dde193b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit de0292418da878bd005e49c649204cf01a97cb8f
Author: GetAway <get...@t-...>
Date: Sat Dec 28 15:38:17 2013 +0100
version bump libsigc-2.3.1
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/rules-archive b/rules-archive
index 9eaed9b..65acb67 100644
--- a/rules-archive
+++ b/rules-archive
@@ -81,7 +81,7 @@ zlib-1.2.8.tar.gz;http://zlib.net
libffi-1.20.tar.gz;ftp://sources.redhat.com/pub/libffi
SDL-1.2.6.tar.gz;http://www.libsdl.org/release
readline-4.3.tar.gz;ftp://$(gnuserver)/readline
-libsigc++-1.2.7.tar.gz;http://ftp.gnome.org/pub/GNOME/sources/libsigc++/1.2
+libsigc++-2.3.1.tar.gz;http://fossies.org/linux/misc
libpcap-0.9.4.tar.gz;http://www.tcpdump.org/release
commoncpp2-1.0.13.tar.gz;ftp://$(gnuserver)/commonc++
libdvbpsi-0.1.3.tar.bz2;http://www.videolan.org/pub/videolan/libdvbpsi/0.1.3
diff --git a/rules-install b/rules-install
index ff120ce..6152137 100644
--- a/rules-install
+++ b/rules-install
@@ -75,7 +75,7 @@ libpcap;make:install:DESTDIR=TARGET
libpng;make:install:prefix=TARGET;archive:TARGET/lib/libpng12_pic.a:*.o
libreadline;make:install:DESTDIR=TARGET
libsdl;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libSDL.la
-libsigc;rewrite-pkgconfig:sigc++-1.2.pc;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libsigc-1.2.la
+libsigc;rewrite-pkgconfig:sigc++-2.0.pc;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libsigc-2.0.la
libvorbisidec;rewrite-pkgconfig:vorbisidec.pc;make:install:DESTDIR=TARGET;install:-m644:vorbisidec.pc:TARGET/lib/pkgconfig;rewrite-libtool:TARGET/lib/libvorbisidec.la
libxml2;rewrite-pkgconfig:libxml-2.0.pc;make:install:DESTDIR=TARGET;rewrite-libtool:TARGET/lib/libxml2.la
libz;make:install:prefix=TARGET;archive:TARGET/lib/libz_pic.a:*.o
diff --git a/rules-make b/rules-make
index fd3da76..62195c1 100644
--- a/rules-make
+++ b/rules-make
@@ -83,7 +83,7 @@ libpcap;0.9.4;libpcap-0.9.4;libpcap-0.9.4.tar.gz:libpcap.diff;extract:libpcap-0.
libpng;1.2.50;libpng-1.2.50;libpng-1.2.50.tar.bz2;extract:libpng-1.2.50.tar.bz2
libreadline;4.3;readline-4.3;readline-4.3.tar.gz:readline.diff;extract:readline-4.3.tar.gz;patch:readline.diff
libsdl;1.2.6;SDL-1.2.6;SDL-1.2.6.tar.gz:sdl.diff;extract:SDL-1.2.6.tar.gz;patch:sdl.diff
-libsigc;1.2.7;libsigc++-1.2.7;libsigc++-1.2.7.tar.gz;extract:libsigc++-1.2.7.tar.gz
+libsigc;2.3.1;libsigc++-2.3.1;libsigc++-2.3.1.tar.gz;extract:libsigc++-2.3.1.tar.gz
libvorbisidec;1.0.2+svn15687;libvorbisidec-1.0.2+svn15687;libvorbisidec_1.0.2+svn15687.orig.tar.gz:tremor.diff;extract:libvorbisidec_1.0.2+svn15687.orig.tar.gz;patch:tremor.diff
libxml2;2.4.30;libxml2-2.4.30;libxml2-2.4.30.tar.gz:libxml2.diff;extract:libxml2-2.4.30.tar.gz;patch:libxml2.diff
libz;1.2.8;zlib-1.2.8;zlib-1.2.8.tar.gz;extract:zlib-1.2.8.tar.gz
-----------------------------------------------------------------------
Summary of changes:
rules-archive | 2 +-
rules-install | 2 +-
rules-make | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-07-11 19:56:28
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 37a8caceda0a043e234b974f6694f50734c5dca0 (commit)
from 4685e716e4874ac871105add130f6f1e6a77c933 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 37a8caceda0a043e234b974f6694f50734c5dca0
Author: Thilo Graf <db...@no...>
Date: Fri Jul 11 21:54:39 2014 +0200
dvb/config: use shorter satellite names to fix truncation
Contributed-by: Satsearching <tux...@ne...>
see: http://forum.tuxbox.org/forum/viewtopic.php?f=7&t=50416
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/dvb/config/satellites.xml b/dvb/config/satellites.xml
index 2ac0d25..99f4807 100644
--- a/dvb/config/satellites.xml
+++ b/dvb/config/satellites.xml
@@ -2,10 +2,11 @@
<!--
file generated on monday, 16th of july 2012, 06:54:38 [GMT]
by online satellites.xml generator @ http://satellites-xml.eu
- please let us know if you find any inconsistencies in this file
+ please let us know if you find any inconsistencies in this file
+ Shorter satellite names to fix truncation
-->
<satellites>
- <sat name="Eutelsat 3A/3C/Rascom QAF 1R (3.0E)" flags="0" position="30">
+ <sat name="Eutelsat/Rascom (3.0E)" flags="0" position="30">
<transponder frequency="3747000" symbol_rate="6111000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="3764000" symbol_rate="20330000" polarization="0" fec_inner="2" system="0" modulation="1"/>
<transponder frequency="3971000" symbol_rate="2741000" polarization="1" fec_inner="3" system="0" modulation="1"/>
@@ -309,7 +310,7 @@
<transponder frequency="12742000" symbol_rate="2700000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12744000" symbol_rate="4167000" polarization="1" fec_inner="4" system="0" modulation="1"/>
</sat>
- <sat name="Eutelsat Hot Bird 13A/13B/13C (13.0E)" flags="0" position="130">
+ <sat name="Eutelsat Hot Bird (13.0E)" flags="0" position="130">
<transponder frequency="10719000" symbol_rate="27500000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10723000" symbol_rate="29900000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10758000" symbol_rate="27500000" polarization="1" fec_inner="4" system="0" modulation="1"/>
@@ -460,7 +461,7 @@
<transponder frequency="12216000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12335000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
</sat>
- <sat name="Astra 1H/1KR/1L/1M/2C (19.2E)" flags="0" position="192">
+ <sat name="Astra 1 (19.2E)" flags="0" position="192">
<transponder frequency="10744000" symbol_rate="22000000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10758000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10788000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
@@ -547,7 +548,7 @@
<transponder frequency="4114000" symbol_rate="2988000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="4130000" symbol_rate="3889000" polarization="1" fec_inner="5" system="0" modulation="1"/>
</sat>
- <sat name="Eutelsat 21A/Intelsat 24 (21.6E)" flags="0" position="216">
+ <sat name="Eutelsat/Intelsat 24 (21.6E)" flags="0" position="216">
<transponder frequency="10952000" symbol_rate="2200000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10957000" symbol_rate="2190000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10972000" symbol_rate="2170000" polarization="1" fec_inner="3" system="0" modulation="1"/>
@@ -759,7 +760,7 @@
<transponder frequency="12736000" symbol_rate="5632000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12740000" symbol_rate="2400000" polarization="0" fec_inner="3" system="0" modulation="1"/>
</sat>
- <sat name="Astra 1N/2A/2B/2D/Eutelsat 28A (28.2E)" flags="0" position="282">
+ <sat name="Astra/Eutelsat 28A (28.2E)" flags="0" position="282">
<transponder frequency="10714000" symbol_rate="22000000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10729000" symbol_rate="22000000" polarization="1" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10744000" symbol_rate="22000000" polarization="0" fec_inner="4" system="0" modulation="1"/>
@@ -922,7 +923,7 @@
<transponder frequency="12168000" symbol_rate="27500000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12304000" symbol_rate="27500000" polarization="0" fec_inner="5" system="0" modulation="1"/>
</sat>
- <sat name="Eutelsat 33A/Intelsat New Dawn (33.0E)" flags="0" position="330">
+ <sat name="Eutelsat/Intelsat (33.0E)" flags="0" position="330">
<transponder frequency="10960000" symbol_rate="2893000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10965000" symbol_rate="2893000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="11005000" symbol_rate="6666000" polarization="1" fec_inner="5" system="0" modulation="1"/>
@@ -1147,7 +1148,7 @@
<transponder frequency="12688000" symbol_rate="30000000" polarization="0" fec_inner="5" system="0" modulation="1"/>
<transponder frequency="12729000" symbol_rate="30000000" polarization="1" fec_inner="5" system="0" modulation="1"/>
</sat>
- <sat name="Türksat 2A/3A (42.0E)" flags="0" position="420">
+ <sat name="T\FCrksat 2A/3A (42.0E)" flags="0" position="420">
<transponder frequency="10954000" symbol_rate="2960000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10964000" symbol_rate="12800000" polarization="0" fec_inner="4" system="0" modulation="1"/>
<transponder frequency="10982000" symbol_rate="9600000" polarization="0" fec_inner="4" system="0" modulation="1"/>
@@ -1337,7 +1338,7 @@
<transponder frequency="3982000" symbol_rate="4285000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="3987000" symbol_rate="2150000" polarization="0" fec_inner="3" system="0" modulation="1"/>
</sat>
- <sat name="Galaxy 26/Intelsat 26 (50.0E)" flags="0" position="500">
+ <sat name="Galaxy/Intelsat (50.0E)" flags="0" position="500">
<transponder frequency="3970000" symbol_rate="3333000" polarization="1" fec_inner="1" system="0" modulation="1"/>
<transponder frequency="12512000" symbol_rate="2222000" polarization="0" fec_inner="3" system="0" modulation="1"/>
</sat>
@@ -1401,7 +1402,7 @@
<transponder frequency="12740000" symbol_rate="2170000" polarization="0" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="12743000" symbol_rate="2170000" polarization="0" fec_inner="3" system="0" modulation="1"/>
</sat>
- <sat name="Astra 1F/G-Sat 8/Insat 3E (55.0E)" flags="0" position="550">
+ <sat name="Astra 1/Insat 3E (55.0E)" flags="0" position="550">
<transponder frequency="4147000" symbol_rate="2150000" polarization="1" fec_inner="3" system="0" modulation="1"/>
<transponder frequency="10968000" symbol_rate="10852000" polarization="1" fec_inner="1" system="0" modulation="1"/>
<transponder frequency="11301000" symbol_rate="19260000" polarization="0" fec_inner="3" system="0" modulation="1"/>
-----------------------------------------------------------------------
Summary of changes:
dvb/config/satellites.xml | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-07-03 19:17:36
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 4685e716e4874ac871105add130f6f1e6a77c933 (commit)
from e34c5ad4e29132d04bbc4ae5b0fe0aadae18b644 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4685e716e4874ac871105add130f6f1e6a77c933
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jun 21 14:43:24 2014 +0200
libconfigfile: accept booleans as int32 or int64
for compatibility if config file entry is changed from boolean to
int32 or int64
based on patch by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libconfigfile/configfile.cpp b/misc/libs/libconfigfile/configfile.cpp
index b8e154b..b92fd67 100644
--- a/misc/libs/libconfigfile/configfile.cpp
+++ b/misc/libs/libconfigfile/configfile.cpp
@@ -205,6 +205,10 @@ int32_t CConfigFile::getInt32(const std::string & key, const int32_t defaultVal)
}
}
+ if (configData[key] == "false")
+ return 0;
+ if (configData[key] == "true")
+ return 1;
return atoi(configData[key].c_str());
}
@@ -227,6 +231,10 @@ int64_t CConfigFile::getInt64(const std::string & key, const int64_t defaultVal)
}
}
+ if (configData[key] == "false")
+ return 0;
+ if (configData[key] == "true")
+ return 1;
return atoll(configData[key].c_str());
}
-----------------------------------------------------------------------
Summary of changes:
misc/libs/libconfigfile/configfile.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-07-03 18:34:30
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via e34c5ad4e29132d04bbc4ae5b0fe0aadae18b644 (commit)
via 3aea153f13360ff308e93b86b1f0af7b47e97e34 (commit)
via caf47a2488ad2f93d634defaa76ca0d6011af8aa (commit)
via a3eba28ffb2fcb6248a88e3f01dd27d11f74be01 (commit)
via e656a5ceab0bc16a5a814471456d5565b75f7816 (commit)
via bdfff6797ce8ab6c48b2a22ba4b5d8769c3291df (commit)
via 86c724eeec86e6376de85d10c2a65eef44b722a0 (commit)
via 72ea568b77248d37551e42e6e0d4608c148ea5f6 (commit)
via 7d2b13dc4f6909e9cd257701205727ef324cddd1 (commit)
via 7e87a6f9389019c7717e622de6b54fa18819f198 (commit)
via 691578491d37c66dcc45e905ba1f110ba2af9683 (commit)
via e4d3f8bb065c80a2d66dc23ba492096881568666 (commit)
via 7d5f5e9f04f38e3064d9c97a437d28bd4971e29c (commit)
via f3767d7ecde1ebeb5511bdf1659b1b5790649737 (commit)
via 2315d9e695d40a05d1c6d63fd4dd0882aacdac5e (commit)
via 2414c6c9e827d2041b3a22fcc221af3c6e5eb60d (commit)
via d6a9bf3f11c34a89ae98d9064256446de602f0ba (commit)
via a7e6b21659868746d2c5aa4e3e73e22e64b7c0ba (commit)
via 211d760fd09d9737e9d868b27c330ef9738e35b0 (commit)
via 5333d110be07709dd9e465002089ec2a9a330cf3 (commit)
via 612044f1e767b3f746c52274fe5e8a18f70061f6 (commit)
from ffea7f69cec8b47d66d4dc027371fb6b1ad32012 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e34c5ad4e29132d04bbc4ae5b0fe0aadae18b644
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jun 19 20:30:39 2014 +0200
Neutrino movieinfo: don't show epgInfo2 if it equals epgInfo1
based on patch by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/movieinfo.cpp b/tuxbox/neutrino/src/gui/movieinfo.cpp
index d995888..f004d7a 100644
--- a/tuxbox/neutrino/src/gui/movieinfo.cpp
+++ b/tuxbox/neutrino/src/gui/movieinfo.cpp
@@ -497,8 +497,11 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info)
char date_char[100];
// prepare print buffer
print_buffer = movie_info.epgInfo1;
- print_buffer += "\n";
- print_buffer += movie_info.epgInfo2;
+ if (movie_info.epgInfo1 != movie_info.epgInfo2)
+ {
+ print_buffer += "\n";
+ print_buffer += movie_info.epgInfo2;
+ }
if( !movie_info.productionCountry.empty() || movie_info.productionDate != 0)
{
commit 3aea153f13360ff308e93b86b1f0af7b47e97e34
Author: Christian Schuett <Gau...@ho...>
Date: Wed Jun 18 19:33:18 2014 +0200
Neutrino eventlist: make alphabetically sorted list case insensitive
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index 5b51751..8cbcf8e 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -69,12 +69,13 @@ bool sortById (const CChannelEvent& a, const CChannelEvent& b)
return a.eventID < b.eventID ;
}
#endif
-bool sortByDescription (const CChannelEvent& a, const CChannelEvent& b)
+static bool sortByDescription (const CChannelEvent& a, const CChannelEvent& b)
{
- if(a.description == b.description)
+ int i = strcasecmp(a.description.c_str(), b.description.c_str());
+ if (i == 0)
return a.startTime < b.startTime;
else
- return a.description < b.description ;
+ return (i < 0);
}
static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
{
commit caf47a2488ad2f93d634defaa76ca0d6011af8aa
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jun 13 23:49:47 2014 +0200
Neutrino EPG viewer: replace left/right chars with corresponding icons
based on idea by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index 588ee0b..012c502 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -128,10 +128,11 @@ void CEpgData::start()
ox = w_max (720, 70);
oy = h_max (576, 50);
+ frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_LEFT, &boticonwidth, &boticonheight);
topheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight();
topboxheight = topheight + 6;
botheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
- botboxheight = botheight + 6;
+ botboxheight = std::max(botheight, boticonheight) + 6;
buttonheight = std::max(16, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) + BUTTONBAR_FONT_OFFSET;
sx = getScreenStartX (ox);
@@ -654,16 +655,13 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
}
GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit );
- if ((prev_id != 0) && !call_fromfollowlist)
+ if (!call_fromfollowlist)
{
- frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3);
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 3);
- }
-
- if ((next_id != 0) && !call_fromfollowlist)
- {
- frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3);
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 3);
+ int iy = sy + oy - botboxheight/2 - boticonheight/2;
+ if (prev_id != 0)
+ frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + 6, iy);
+ if (next_id != 0)
+ frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - boticonwidth - 6, iy);
}
if ( doLoop )
@@ -688,9 +686,6 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
case CRCInput::RC_left:
if ((prev_id != 0) && !call_fromfollowlist)
{
- frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 1);
-
show(channel_id, prev_id, &prev_zeit, false);
showPos=0;
}
@@ -699,9 +694,6 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
case CRCInput::RC_right:
if ((next_id != 0) && !call_fromfollowlist)
{
- frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 1);
-
show(channel_id, next_id, &next_zeit, false);
showPos=0;
}
@@ -1016,7 +1008,7 @@ const struct button_label epgviewButtons[3] =
void CEpgData::showTimerEventBar(bool _show)
{
- int ButtonWidth = (ox - 16) / 4; // 4 cells
+ int ButtonWidth = (ox - 12) / 4; // 4 cells
int by = sy + oy + 2;
// hide only?
@@ -1030,14 +1022,14 @@ void CEpgData::showTimerEventBar(bool _show)
// Button: Timer Record & Channelswitch
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8, by, ButtonWidth, 1, &epgviewButtons[0]);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 6, by, ButtonWidth, 1, &epgviewButtons[0]);
// Button: Timer Channelswitch
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8 + ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[1]);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 6 + ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[1]);
// Button: more screenings
if (!followlist.empty() && !call_fromfollowlist)
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8 + 2 * ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[2], 2 * ButtonWidth - 2 * (ICON_LARGE_WIDTH + 2) - 4);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 6 + 2 * ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[2], 2 * ButtonWidth - 2 * (ICON_LARGE_WIDTH + 2) - 4);
}
diff --git a/tuxbox/neutrino/src/gui/epgview.h b/tuxbox/neutrino/src/gui/epgview.h
index dc23a5a..5e46982 100644
--- a/tuxbox/neutrino/src/gui/epgview.h
+++ b/tuxbox/neutrino/src/gui/epgview.h
@@ -83,6 +83,7 @@ class CEpgData
std::vector<epg_pair> epgText;
int topheight,topboxheight;
int botheight,botboxheight;
+ int boticonwidth,boticonheight;
int buttonheight;
int medlineheight,medlinecount;
bool bigFonts;
commit a3eba28ffb2fcb6248a88e3f01dd27d11f74be01
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jun 13 21:00:55 2014 +0200
Neutrino: remove unnecessary std::string::c_str() calls
there is no need to do this conversion when calling Font::RenderString()
or Font::getRenderWidth()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
index 4430bb5..4ba5b87 100644
--- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
+++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
@@ -128,7 +128,7 @@ void CBEChannelWidget::paint()
void CBEChannelWidget::paintHead()
{
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+2, width, caption.c_str() , COL_MENUHEAD);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+2, width, caption, COL_MENUHEAD);
}
const struct button_label CBEChannelWidgetButtons[4] =
diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
index d841168..29e0bb8 100644
--- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
+++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
@@ -159,7 +159,7 @@ void CBEChannelSelectWidget::paintHead()
{
// paint head
frameBuffer->paintBoxRel(x,y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+2, width, caption.c_str() , COL_MENUHEAD);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+2, width, caption, COL_MENUHEAD);
}
const struct button_label CBEBouquetSelectWidgetButtons[2] =
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 378d3c2..8d0ca3d 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1214,7 +1214,7 @@ void CChannelList::paintDetails(unsigned int index)
desc = desc + " (" + satpos_str + ")";
}
- g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
+ g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc, COL_MENUCONTENTDARK, 0, true);
}
else if( !displayNext && g_settings.channellist_foot == FOOT_NEXT) {
char buf[128] = {0};
diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp
index 9e52ef5..327ef95 100644
--- a/tuxbox/neutrino/src/gui/imageinfo.cpp
+++ b/tuxbox/neutrino/src/gui/imageinfo.cpp
@@ -295,7 +295,7 @@ void CImageInfo::paintLicense(int y_startposition)
int fh = ssheight+12;
for (int i = 0; i<13; i++) // paint all lines
{
- g_Font[font_small_text]->RenderString(xpos, y_startposition, width-10, LLine[i].c_str(), COL_MENUCONTENT, 0, true);
+ g_Font[font_small_text]->RenderString(xpos, y_startposition, width-10, LLine[i], COL_MENUCONTENT, 0, true);
y_startposition += (fh >>1);
}
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 759ceb9..0cf4ffb 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -1856,7 +1856,7 @@ void CInfoViewer::showInfoFile()
// text
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
- xStart + RADIUS_SMALL, BoxStartY + height, xEnd - xStart - RADIUS_SMALL*2, (std::string)infotext, COL_INFOBAR, height, false);
+ xStart + RADIUS_SMALL, BoxStartY + height, xEnd - xStart - RADIUS_SMALL*2, infotext, COL_INFOBAR, height);
}
void CInfoViewer::killTitle()
diff --git a/tuxbox/neutrino/src/gui/widget/listbox.cpp b/tuxbox/neutrino/src/gui/widget/listbox.cpp
index 7d115a8..35840f7 100644
--- a/tuxbox/neutrino/src/gui/widget/listbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/listbox.cpp
@@ -81,7 +81,7 @@ void CListBox::paint()
void CListBox::paintHead()
{
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 10, y + theight + 2, width, caption.c_str(), COL_MENUHEAD);
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 10, y + theight + 2, width, caption, COL_MENUHEAD);
}
const struct button_label CListBoxButtons[4] =
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 9c10e88..914a166 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -554,7 +554,7 @@ void CMenuWidget::paint()
height = h_max(wanted_height, 0);
- int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(nameString.c_str(), true); // UTF-8
+ int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(nameString, true); // UTF-8
if (neededWidth > width - 48)
width = w_max(neededWidth + 49, 0);
@@ -622,7 +622,7 @@ void CMenuWidget::paint()
if (!iconfile.empty())
frameBuffer->paintIcon(iconfile, x + 8, y + hheight / 2 - hiconheight / 2);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + hiconoffset + 10, y + hheight + 2, width - hiconoffset - 10, nameString.c_str(), COL_MENUHEAD, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + hiconoffset + 10, y + hheight + 2, width - hiconoffset - 10, nameString, COL_MENUHEAD, 0, true); // UTF-8
item_start_y = y+hheight;
paintItems();
commit e656a5ceab0bc16a5a814471456d5565b75f7816
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jun 1 17:35:02 2014 +0200
Neutrino filebrowser: update footer if filelist is empty now or was before
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index a2b720a..222dd6d 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -369,6 +369,8 @@ void CFileBrowser::ChangeDir(const std::string & filename, int selection)
{
newpath += '/';
}
+
+ bool filelistWasEmpty = filelist.empty();
filelist.clear();
Path = newpath;
name = newpath;
@@ -397,8 +399,11 @@ void CFileBrowser::ChangeDir(const std::string & filename, int selection)
selected = 0;
if ((selection != -1) && (selection < (int)filelist.size()))
selected = selection;
+
paintHead();
paint();
+ if (filelistWasEmpty != filelist.empty())
+ paintFoot();
}
//------------------------------------------------------------------------
@@ -761,9 +766,9 @@ bool CFileBrowser::exec(const char * const dirname)
selection = selected;
paintHead();
+ m_SMSKeyInput.resetOldKey();
ChangeDir(name, selection);
//paint();
- m_SMSKeyInput.resetOldKey();
paintFoot();
int oldselected = selected;
commit bdfff6797ce8ab6c48b2a22ba4b5d8769c3291df
Author: Christian Schuett <Gau...@ho...>
Date: Thu May 29 21:23:00 2014 +0200
Neutrino eventlist: use correct width and height when painting 1st line
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index 729023f..5b51751 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -121,11 +121,7 @@ void EventList::init()
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &iconw, &iconh);
theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getHeight());
fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->getHeight();
- {
- int h1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getHeight();
- int h2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getHeight();
- fheight2 = (h1 > h2) ? h1 : h2;
- }
+ fheight2 = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getHeight(), g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getHeight());
fheight = fheight1 + fheight2 + 2;
fwidth1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth("DDD, 00:00, ");
fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth("[999 min] ");
@@ -698,8 +694,8 @@ void EventList::paintItem(unsigned int pos)
}
// 1st line
- g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight1+3, fwidth1+5, datetime1_str, color, 0, true); // UTF-8
- g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5+fwidth1, ypos+ fheight1+3, width-fwidth1-10- 20, datetime2_str, color, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight2+3, fwidth1+5, datetime1_str, color, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5+fwidth1, ypos+ fheight2+3, width-fwidth1-10- 20, datetime2_str, color, 0, true); // UTF-8
int seit = (evtlist[curpos].startTime - time(NULL)) / 60;
if ( (seit> 0) && (seit<100) && (duration_str.length()!=0) )
@@ -708,13 +704,14 @@ void EventList::paintItem(unsigned int pos)
sprintf((char*) &beginnt, "in %d min", seit);
int w = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(beginnt) + 10;
- g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20- w, ypos+ fheight1+3, fwidth2, beginnt, color);
+ g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20- w, ypos+ fheight2+3, w, beginnt, color);
}
- g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20, ypos+ fheight1+3, fwidth2, duration_str, color, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->RenderString(x+width-fwidth2-5- 20, ypos+ fheight2+3, fwidth2, duration_str, color, 0, true); // UTF-8
// 2nd line
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->RenderString(x+ 20, ypos+ fheight, width- 25- 20, evtlist[curpos].description, color);
unsigned char is_timer = isTimer(evtlist[curpos].startTime,evtlist[curpos].duration,evtlist[curpos].get_channel_id());
+ ypos -= 3;
if(is_timer == (EventList::CONFLICT<<4))
{
commit 86c724eeec86e6376de85d10c2a65eef44b722a0
Author: Christian Schuett <Gau...@ho...>
Date: Sat May 10 20:51:25 2014 +0200
Neutrino infoviewer: check for time being set
partly based on patch by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 45aa4cd..759ceb9 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -211,6 +211,9 @@ void CInfoViewer::showSatfind()
void CInfoViewer::paintTime( bool show_dot, bool firstPaint )
{
+ if (!gotTime)
+ gotTime = g_Sectionsd->getIsTimeSet();
+
if ( gotTime )
{
ChanNameY = BoxStartY + (ChanHeight>>1) + SHADOW_OFFSET; //oberkante schatten?
@@ -358,6 +361,9 @@ void CInfoViewer::showMovieTitle(const int _playstate, const std::string &title,
BoxStartY = g_settings.screen_EndY - 20 - InfoHeightY - InfoHeightY_Info;
BoxEndY = g_settings.screen_EndY - 20 - InfoHeightY_Info;
+ if (!gotTime)
+ gotTime = g_Sectionsd->getIsTimeSet();
+
if (fadeIn)
{
frameBuffer->setAlphaFade(COL_INFOBAR, 8, convertSetupAlpha2Alpha(100));
commit 72ea568b77248d37551e42e6e0d4608c148ea5f6
Author: Christian Schuett <Gau...@ho...>
Date: Sat May 10 20:21:18 2014 +0200
Neutrino infoviewer: only show remaining time if time is set
based on patch by Stefan Seyfried <se...@tu...> in
Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 167431d..45aa4cd 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -1723,11 +1723,11 @@ void CInfoViewer::show_Data(bool calledFromEvent)
{
int seit = (abs(jetzt - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
int rest = (info_CurrentNext.current_zeit.dauer / 60) - seit;
- if (jetzt < info_CurrentNext.current_zeit.startzeit)
- {
- progressbarPos = 0;
+ progressbarPos = 0;
+ if (!gotTime)
+ sprintf((char*)&runningRest, "%d min", info_CurrentNext.current_zeit.dauer / 60);
+ else if (jetzt < info_CurrentNext.current_zeit.startzeit)
sprintf((char*)&runningRest, "in %d min", seit);
- }
else
{
progressbarPos = (jetzt - info_CurrentNext.current_zeit.startzeit) * 112 / info_CurrentNext.current_zeit.dauer;
commit 7d2b13dc4f6909e9cd257701205727ef324cddd1
Author: Christian Schuett <Gau...@ho...>
Date: Sat May 10 19:55:26 2014 +0200
Neutrino listbox: use paintButtons in foot
based on patch by Jacek Jendrzej <cra...@go...> in Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/listbox.cpp b/tuxbox/neutrino/src/gui/widget/listbox.cpp
index 79ad79f..7d115a8 100644
--- a/tuxbox/neutrino/src/gui/widget/listbox.cpp
+++ b/tuxbox/neutrino/src/gui/widget/listbox.cpp
@@ -30,6 +30,7 @@
#include <global.h>
#include <neutrino.h>
+#include <gui/widget/buttons.h>
#include <gui/widget/icons.h>
#include <driver/screen_max.h>
@@ -83,25 +84,21 @@ void CListBox::paintHead()
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 10, y + theight + 2, width, caption.c_str(), COL_MENUHEAD);
}
+const struct button_label CListBoxButtons[4] =
+{
+ { NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY },
+ { NEUTRINO_ICON_BUTTON_GREEN, LOCALE_BOUQUETEDITOR_ADD },
+ { NEUTRINO_ICON_BUTTON_RED , LOCALE_BOUQUETEDITOR_DELETE },
+ { NEUTRINO_ICON_BUTTON_HOME , LOCALE_BOUQUETEDITOR_RETURN }
+};
+
void CListBox::paintFoot()
{
int y_foot = y + height - ButtonHeight;
- int y_text = y + height - 2;
- int ButtonWidth = width / 4;
+ int ButtonWidth = (width - 16) / 4;
frameBuffer->paintBoxRel(x, y_foot, width, ButtonHeight, COL_MENUHEAD_PLUS_0);
frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0);
-
- frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x + width - 4 * ButtonWidth + 8, y_foot + 1);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 4 * ButtonWidth + 38, y_text, width, "edit", COL_INFOBAR);
-
- frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x + width - 3 * ButtonWidth + 8, y_foot + 4);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 3 * ButtonWidth + 29, y_text, width - 26, "add", COL_INFOBAR);
-
- frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x + width - 2 * ButtonWidth + 8, y_foot + 4);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 2 * ButtonWidth + 29, y_text, width - 26, "remove", COL_INFOBAR);
-
- frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HOME, x + width - ButtonWidth + 8, y_foot + 1);
- g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - ButtonWidth + 38, y_text, width, "ready", COL_INFOBAR);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 8, y_foot + 2, ButtonWidth, 4, CListBoxButtons, 0, false, COL_MENUHEAD_PLUS_0);
}
void CListBox::paintItem(int pos)
commit 7e87a6f9389019c7717e622de6b54fa18819f198
Author: Christian Schuett <Gau...@ho...>
Date: Mon May 5 21:38:40 2014 +0200
Neutrino: don't leave SCART mode when recording starts
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index c3a1a6b..cfe01ac 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -362,8 +362,10 @@ void CVCRControl::CFileAndServerDevice::RestoreNeutrino(void)
g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false);
}
- // alten mode wieder herstellen (ausser wen zwischenzeitlich auf oder aus sb geschalten wurde)
+ // alten mode wiederherstellen (ausser wenn zwischenzeitlich auf oder aus standby oder SCART geschaltet wurde)
if(CNeutrinoApp::getInstance()->getMode() != last_mode &&
+ CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_scart &&
+ last_mode != NeutrinoMessages::mode_scart &&
CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby &&
last_mode != NeutrinoMessages::mode_standby)
g_RCInput->postMsg( NeutrinoMessages::CHANGEMODE , last_mode);
@@ -392,12 +394,15 @@ void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id chann
if (channel_id != 0) // wenn ein channel angegeben ist
{
last_mode = CNeutrinoApp::getInstance()->getMode();
- if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode()))
+ if (mode != last_mode && (mode != CNeutrinoApp::getInstance()->getLastMode() ||
+ last_mode != NeutrinoMessages::mode_standby && last_mode != NeutrinoMessages::mode_scart))
{
CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap );
// Wenn wir im Standby waren, dann brauchen wir f�rs streamen nicht aufwachen...
if(last_mode == NeutrinoMessages::mode_standby)
CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_standby);
+ else if(last_mode == NeutrinoMessages::mode_scart) // possibly switch back to SCART mode
+ CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::VCR_ON, 0 );
}
if(g_Zapit->getCurrentServiceID() != channel_id) // und momentan noch nicht getuned ist
{
commit 691578491d37c66dcc45e905ba1f110ba2af9683
Author: GetAway <get...@t-...>
Date: Sun Apr 27 16:29:26 2014 +0200
Neutrino: remove deprecated USE_VBI_INTERFACE
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp
index d17d7a1..56b242f 100644
--- a/tuxbox/neutrino/src/gui/pluginlist.cpp
+++ b/tuxbox/neutrino/src/gui/pluginlist.cpp
@@ -57,16 +57,6 @@
#include <driver/screen_max.h>
#include <zapit/client/zapittools.h>
-
-/* for alexW images with old drivers:
- * #define USE_VBI_INTERFACE 1
- */
-
-#ifdef USE_VBI_INTERFACE
- #define AVIA_VBI_START_VTXT 1
- #define AVIA_VBI_STOP_VTXT 2
-#endif
-
#include <daemonc/remotecontrol.h>
CPluginList::CPluginList(const neutrino_locale_t Name, const uint listtype)
diff --git a/tuxbox/neutrino/src/gui/plugins.cpp b/tuxbox/neutrino/src/gui/plugins.cpp
index e86b8a8..2b9f36d 100644
--- a/tuxbox/neutrino/src/gui/plugins.cpp
+++ b/tuxbox/neutrino/src/gui/plugins.cpp
@@ -51,16 +51,6 @@
#include <neutrino.h>
#include <zapit/client/zapittools.h>
-
-/* for alexW images with old drivers:
- * #define USE_VBI_INTERFACE 1
- */
-
-#ifdef USE_VBI_INTERFACE
- #define AVIA_VBI_START_VTXT 1
- #define AVIA_VBI_STOP_VTXT 2
-#endif
-
#include <daemonc/remotecontrol.h>
#define PLUGINDIR_MNT "/mnt/plugins"
@@ -409,14 +399,7 @@ void CPlugins::startPlugin(int number, int param, int param2)
if (plugin_list[number].vtxtpid)
{
vtpid = g_RemoteControl->current_PIDs.PIDs.vtxtpid;
-#ifdef USE_VBI_INTERFACE
- int fd = open("/dev/dbox/vbi0", O_RDWR);
- if (fd > 0)
- {
- ioctl(fd, AVIA_VBI_STOP_VTXT, 0);
- close(fd);
- }
-#endif
+
if(param>0)
vtpid=param;
startparam = makeParam(P_ID_VTXTPID, vtpid, startparam);
@@ -529,22 +512,6 @@ void CPlugins::startPlugin(int number, int param, int param2)
frameBuffer->paletteSet();
frameBuffer->paintBackgroundBox(0,0,720,576);
}
-
-#ifdef USE_VBI_INTERFACE
- if (plugin_list[number].vtxtpid)
- {
- if (vtpid != 0)
- {
- // versuche, den gtx/enx_vbi wieder zu starten
- int fd = open("/dev/dbox/vbi0", O_RDWR);
- if (fd > 0)
- {
- ioctl(fd, AVIA_VBI_START_VTXT, vtpid);
- close(fd);
- }
- }
- }
-#endif
}
/* unload shared libs */
commit e4d3f8bb065c80a2d66dc23ba492096881568666
Author: Christian Schuett <Gau...@ho...>
Date: Wed Apr 23 22:16:11 2014 +0200
Neutrino EPG Plus: simplify page change code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp
index 21108e1..0b3fd63 100644
--- a/tuxbox/neutrino/src/gui/epgplus.cpp
+++ b/tuxbox/neutrino/src/gui/epgplus.cpp
@@ -958,69 +958,24 @@ int EpgPlus::exec(CChannelList* _channelList, int selectedChannelIndex, CBouquet
refreshAll = true;
break;
}
- if (msg == g_settings.key_channelList_pagedown || msg == CRCInput::RC_yellow)
+ if (msg == g_settings.key_channelList_pageup || msg == CRCInput::RC_green ||
+ msg == g_settings.key_channelList_pagedown || msg == CRCInput::RC_yellow)
{
if (!channelList->isEmpty())
{
- switch (currentSwapMode)
- {
- case SwapMode_ByPage:
- {
- int selectedChannelEntryIndex = selectedChannelEntry->index;
- selectedChannelEntryIndex += maxNumberOfDisplayableEntries;
-
- if (selectedChannelEntryIndex > channelList->getSize() - 1)
- selectedChannelEntryIndex = 0;
-
- createChannelEntries(selectedChannelEntryIndex);
- paint();
- break;
- }
+ int direction = (msg == g_settings.key_channelList_pageup || msg == CRCInput::RC_green) ? -1 : 1;
- case SwapMode_ByBouquet:
- {
- unsigned int currentBouquetNumber = bouquetList->getActiveBouquetNumber();
-#ifdef DEBUG_
- std::cout << "ViewMode_Bouquets " << currentBouquetNumber << std::endl;
-#endif
- ++currentBouquetNumber;
-
- if (currentBouquetNumber == bouquetList->Bouquets.size())
- currentBouquetNumber = 0;
-
- CBouquet* bouquet = bouquetList->Bouquets[currentBouquetNumber];
-#ifdef DEBUG_
- std::cout << "bouquet->unique_key " << bouquet->unique_key << " " << bouquet->channelList->getName() << std::endl;
-#endif
- if (!bouquet->channelList->isEmpty())
- {
- // select first channel of bouquet
-#ifdef DEBUG_
- std::cout << "(*bouquet->channelList)[0]->number " << (*bouquet->channelList)[0]->number << std::endl;
-#endif
- bouquetList->activateBouquet(currentBouquetNumber);
- channelListStartIndex = (*bouquet->channelList)[0]->number - 1;
- createChannelEntries(channelListStartIndex);
- paint();
- }
- break;
- }
- }
- }
- }
- else if (msg == g_settings.key_channelList_pageup || msg == CRCInput::RC_green)
- {
- if (!channelList->isEmpty())
- {
switch (currentSwapMode)
{
case SwapMode_ByPage:
{
int selectedChannelEntryIndex = selectedChannelEntry->index;
- selectedChannelEntryIndex -= maxNumberOfDisplayableEntries;
+ selectedChannelEntryIndex += maxNumberOfDisplayableEntries * direction;
if (selectedChannelEntryIndex < 0)
selectedChannelEntryIndex = channelList->getSize() - 1;
+ else if (selectedChannelEntryIndex > channelList->getSize() - 1)
+ selectedChannelEntryIndex = 0;
createChannelEntries(selectedChannelEntryIndex);
paint();
@@ -1033,10 +988,7 @@ int EpgPlus::exec(CChannelList* _channelList, int selectedChannelIndex, CBouquet
#ifdef DEBUG_
std::cout << "ViewMode_Bouquets " << currentBouquetNumber << std::endl;
#endif
- --currentBouquetNumber;
-
- if (currentBouquetNumber == unsigned(-1))
- currentBouquetNumber = bouquetList->Bouquets.size() - 1;
+ currentBouquetNumber = (currentBouquetNumber + bouquetList->Bouquets.size() + direction) % bouquetList->Bouquets.size();
CBouquet* bouquet = bouquetList->Bouquets[currentBouquetNumber];
#ifdef DEBUG_
commit 7d5f5e9f04f38e3064d9c97a437d28bd4971e29c
Author: Christian Schuett <Gau...@ho...>
Date: Wed Apr 23 20:05:14 2014 +0200
Neutrino EPG Plus: simplify channel selection code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp
index 7954d7d..21108e1 100644
--- a/tuxbox/neutrino/src/gui/epgplus.cpp
+++ b/tuxbox/neutrino/src/gui/epgplus.cpp
@@ -1135,51 +1135,14 @@ int EpgPlus::exec(CChannelList* _channelList, int selectedChannelIndex, CBouquet
paint();
}
}
- else if (msg_repeatok == CRCInput::RC_up)
+ else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == CRCInput::RC_down)
{
if (!channelList->isEmpty()) {
-#ifdef DEBUG_
- std::cout << "RC_up" << std::endl;
-#endif
int selectedChannelEntryIndex = selectedChannelEntry->index;
int prevSelectedChannelEntryIndex = selectedChannelEntryIndex;
- --selectedChannelEntryIndex;
- if (selectedChannelEntryIndex < 0)
- {
-#ifdef DEBUG_
- std::cout << "this->selectedChannelEntry->index < 0" << std::endl;
-#endif
- selectedChannelEntryIndex = channelList->getSize() - 1;
- }
-
- int oldChannelListStartIndex = channelListStartIndex;
- channelListStartIndex = (selectedChannelEntryIndex / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries;
-
- if (oldChannelListStartIndex != channelListStartIndex)
- {
-#ifdef DEBUG_
- std::cout << "oldChannelListStartIndex != this->channelListStartIndex" << std::endl;
-#endif
- createChannelEntries(selectedChannelEntryIndex);
- paint();
- g_RCInput->clearRCMsg();
- }
- else
- {
- selectedChannelEntry = displayedChannelEntries[selectedChannelEntryIndex - channelListStartIndex];
- paintChannelEntry(prevSelectedChannelEntryIndex - channelListStartIndex);
- paintChannelEntry(selectedChannelEntryIndex - channelListStartIndex);
- }
- }
- }
- else if (msg_repeatok == CRCInput::RC_down)
- {
- if (!channelList->isEmpty()) {
- int selectedChannelEntryIndex = selectedChannelEntry->index;
- int prevSelectedChannelEntryIndex = selectedChannelEntry->index;
-
- selectedChannelEntryIndex = (selectedChannelEntryIndex + 1) % channelList->getSize();
+ int direction = (msg_repeatok == CRCInput::RC_up) ? -1 : 1;
+ selectedChannelEntryIndex = (selectedChannelEntryIndex + channelList->getSize() + direction) % channelList->getSize();
int oldChannelListStartIndex = channelListStartIndex;
channelListStartIndex = (selectedChannelEntryIndex / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries;
@@ -1194,7 +1157,7 @@ int EpgPlus::exec(CChannelList* _channelList, int selectedChannelIndex, CBouquet
{
selectedChannelEntry = displayedChannelEntries[selectedChannelEntryIndex - channelListStartIndex];
paintChannelEntry(prevSelectedChannelEntryIndex - channelListStartIndex);
- paintChannelEntry(selectedChannelEntry->index - channelListStartIndex);
+ paintChannelEntry(selectedChannelEntryIndex - channelListStartIndex);
}
}
}
commit f3767d7ecde1ebeb5511bdf1659b1b5790649737
Author: Christian Schuett <Gau...@ho...>
Date: Wed Apr 23 19:11:42 2014 +0200
Neutrino pictureviewer: simplify playlist selection code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp
index fe6c0f8..1a9a514 100644
--- a/tuxbox/neutrino/src/gui/pictureviewer.cpp
+++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp
@@ -296,18 +296,13 @@ int CPictureViewerGui::show()
}
}
}
- else if (msg_repeatok == CRCInput::RC_up)
+ else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == CRCInput::RC_down)
{
if ((m_state == MENU) && (!playlist.empty()))
{
int prevselected = selected;
- if (selected == 0)
- {
- selected = playlist.size() - 1;
- }
- else
- selected--;
- paintItem(prevselected - liststart);
+ int direction = (msg_repeatok == CRCInput::RC_up) ? -1 : 1;
+ selected = (selected + playlist.size() + direction) % playlist.size();
unsigned int oldliststart = liststart;
liststart = (selected / listmaxshow) * listmaxshow;
if (oldliststart != liststart)
@@ -316,25 +311,7 @@ int CPictureViewerGui::show()
}
else
{
- paintItem(selected - liststart);
- }
- }
- }
- else if (msg_repeatok == CRCInput::RC_down)
- {
- if ((m_state == MENU) && (!playlist.empty()))
- {
- int prevselected = selected;
- selected = (selected + 1) %playlist.size();
- paintItem(prevselected - liststart);
- unsigned int oldliststart = liststart;
- liststart = (selected / listmaxshow) * listmaxshow;
- if(oldliststart != liststart)
- {
- update = true;
- }
- else
- {
+ paintItem(prevselected - liststart);
paintItem(selected - liststart);
}
}
commit 2315d9e695d40a05d1c6d63fd4dd0882aacdac5e
Author: Christian Schuett <Gau...@ho...>
Date: Wed Apr 23 19:05:23 2014 +0200
Neutrino audioplayer: simplify playlist selection code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp
index cfa3e86..fedef56 100644
--- a/tuxbox/neutrino/src/gui/audioplayer.cpp
+++ b/tuxbox/neutrino/src/gui/audioplayer.cpp
@@ -439,6 +439,7 @@ int CAudioPlayerGui::show()
paint();
}
g_RCInput->getMsg(&msg, &data, 10); // 1 sec timeout to update play/stop state display
+ neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat;
if( msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER)
{
@@ -524,39 +525,13 @@ int CAudioPlayerGui::show()
}
}
}
- else if((msg &~ CRCInput::RC_Repeat) == CRCInput::RC_up)
+ else if(msg_repeatok == CRCInput::RC_up || msg_repeatok == CRCInput::RC_down)
{
if(m_show_playlist && !m_playlist.empty() )
{
int prevselected = m_selected;
- if(m_selected == 0)
- {
- m_selected = m_playlist.size()-1;
- }
- else
- {
- m_selected--;
- }
- paintItem(prevselected - m_liststart);
- unsigned int oldliststart = m_liststart;
- m_liststart = (m_selected/m_listmaxshow)*m_listmaxshow;
- if(oldliststart != m_liststart)
- {
- update = true;
- }
- else
- {
- paintItem(m_selected - m_liststart);
- }
- }
- }
- else if((msg &~ CRCInput::RC_Repeat) == CRCInput::RC_down)
- {
- if(m_show_playlist && !m_playlist.empty() )
- {
- int prevselected = m_selected;
- m_selected = (m_selected + 1) % m_playlist.size();
- paintItem(prevselected - m_liststart);
+ int direction = (msg_repeatok == CRCInput::RC_up) ? -1 : 1;
+ m_selected = (m_selected + m_playlist.size() + direction) % m_playlist.size();
unsigned int oldliststart = m_liststart;
m_liststart = (m_selected/m_listmaxshow)*m_listmaxshow;
if(oldliststart != m_liststart)
@@ -565,6 +540,7 @@ int CAudioPlayerGui::show()
}
else
{
+ paintItem(prevselected - m_liststart);
paintItem(m_selected - m_liststart);
}
}
commit 2414c6c9e827d2041b3a22fcc221af3c6e5eb60d
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 22 21:53:38 2014 +0200
Neutrino movieplayer: add some missing play time hide calls
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp
index 61245a1..575ca8f 100644
--- a/tuxbox/neutrino/src/gui/movieplayer.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer.cpp
@@ -4237,6 +4237,7 @@ CMoviePlayerGui::PlayStream (int streamtype)
open_filebrowser = true;
aborted = false;
}
+ StreamTime.hide();
}
if(exit)
@@ -4526,6 +4527,7 @@ CMoviePlayerGui::PlayStream (int streamtype)
curl_free (tmp);
printf ("[movieplayer.cpp] Generated FILE MRL: %s\n", mrl);
+ StreamTime.hide();
update_info = true;
start_play = true;
}
diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp
index 100c0e7..d5bcd80 100644
--- a/tuxbox/neutrino/src/gui/movieplayer2.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp
@@ -2822,11 +2822,14 @@ CMoviePlayerGui::PlayStream(int streamtype)
mrl_str = filelist[selected].Name;
INFO ("Generated FILE MRL: %s\n", mrl_str.c_str());
+ if (stream) // stream time is only counting seconds...
+ StreamTime.hide();
update_info = true;
start_play = true;
}
else
{
+ StreamTime.hide();
open_filebrowser = true;
aborted = false;
}
@@ -3327,7 +3330,7 @@ CMoviePlayerGui::PlayStream(int streamtype)
if (g_playstate == CMoviePlayerGui::PLAY)
g_playstate = CMoviePlayerGui::SOFTRESET;
// g_playstate = CMoviePlayerGui::RESYNC;
- if (stream)
+ if (stream) // stream time is only counting seconds...
StreamTime.hide();
}
else if (msg == CRCInput::RC_blue)
@@ -3547,6 +3550,9 @@ CMoviePlayerGui::PlayStream(int streamtype)
else
mrl_str = filelist[selected].Name;
INFO("Generated FILE MRL: %s\n", mrl_str.c_str());
+
+ if (stream) // stream time is only counting seconds...
+ StreamTime.hide();
update_info = true;
start_play = true;
}
commit d6a9bf3f11c34a89ae98d9064256446de602f0ba
Author: Christian Schuett <Gau...@ho...>
Date: Tue Apr 22 21:39:13 2014 +0200
Neutrino movieplayer: simplify playlist selection code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp
index a089965..61245a1 100644
--- a/tuxbox/neutrino/src/gui/movieplayer.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer.cpp
@@ -4086,39 +4086,22 @@ void CMoviePlayerGui::PlayFile (int parental)
g_playstate = CMoviePlayerGui::JF;
break;
- //-- select previous item (in playlist) --
+ //-- select previous or next item (in playlist) --
case CRCInput::RC_up:
- if(isMovieBrowser == true)
- {
- int new_pos_sec = get_next_movie_info_bookmark_pos_sec(p_movie_info, g_fileposition / g_secondoffset, true);
- if(new_pos_sec >= 0)
- {
- g_jumpseconds = new_pos_sec;
- g_playstate = CMoviePlayerGui::JPOS;
- }
- }
- else
- {
- g_playstate = CMoviePlayerGui::ITEMSELECT;
- g_itno = -2;
- }
- break;
-
- //-- select next item (in playlist) --
case CRCInput::RC_down:
if(isMovieBrowser == true)
{
- int new_pos_sec = get_next_movie_info_bookmark_pos_sec(p_movie_info, g_fileposition / g_secondoffset, false);
+ int new_pos_sec = get_next_movie_info_bookmark_pos_sec(p_movie_info, g_fileposition / g_secondoffset, msg == CRCInput::RC_up);
if(new_pos_sec >= 0)
{
- g_jumpseconds = new_pos_sec ;
+ g_jumpseconds = new_pos_sec;
g_playstate = CMoviePlayerGui::JPOS;
}
}
else
{
g_playstate = CMoviePlayerGui::ITEMSELECT;
- g_itno = -1;
+ g_itno = (msg == CRCInput::RC_up) ? -2 : -1;
}
break;
@@ -4236,17 +4219,17 @@ CMoviePlayerGui::PlayStream (int streamtype)
do
{
if (g_playstate == CMoviePlayerGui::STOPPED && !cdDvd) {
- if(selected + 1 < _filelist.size() && !aborted) {
- selected++;
- filename = _filelist[selected].Name.c_str();
- sel_filename = _filelist[selected].getFileName();
- //printf ("[movieplayer.cpp] sel_filename: %s\n", filename);
- int namepos = _filelist[selected].Name.rfind("vlc://");
- std::string mrl_str = _filelist[selected].Name.substr(namepos + 6);
- char *tmp = curl_escape (mrl_str.c_str (), 0);
- strncpy (mrl, tmp, sizeof (mrl) - 1);
- curl_free (tmp);
- printf ("[movieplayer.cpp] Generated FILE MRL: %s\n", mrl);
+ if(selected + 1 < _filelist.size() && !aborted) {
+ selected++;
+ filename = _filelist[selected].Name.c_str();
+ sel_filename = _filelist[selected].getFileName();
+ //printf ("[movieplayer.cpp] sel_filename: %s\n", filename);
+ int namepos = _filelist[selected].Name.rfind("vlc://");
+ std::string mrl_str = _filelist[selected].Name.substr(namepos + 6);
+ char *tmp = curl_escape (mrl_str.c_str (), 0);
+ strncpy (mrl, tmp, sizeof (mrl) - 1);
+ curl_free (tmp);
+ printf ("[movieplayer.cpp] Generated FILE MRL: %s\n", mrl);
update_info = true;
start_play = true;
@@ -4254,8 +4237,6 @@ CMoviePlayerGui::PlayStream (int streamtype)
open_filebrowser = true;
aborted = false;
}
-
-
}
if(exit)
@@ -4401,7 +4382,8 @@ CMoviePlayerGui::PlayStream (int streamtype)
}
else if(msg == CRCInput::RC_green || msg == CRCInput::RC_0)
{
- if(g_playstate == CMoviePlayerGui::PLAY) g_playstate = CMoviePlayerGui::RESYNC;
+ if(g_playstate == CMoviePlayerGui::PLAY)
+ g_playstate = CMoviePlayerGui::RESYNC;
StreamTime.hide();
}
else if(msg == CRCInput::RC_blue)
@@ -4520,28 +4502,20 @@ CMoviePlayerGui::PlayStream (int streamtype)
static CMovieBrowser mb;
mb.showHelpVLC();
}
- else if(msg == CRCInput::RC_left)
+ else if(msg == CRCInput::RC_left || msg == CRCInput::RC_right)
{
- if(!_filelist.empty() && selected > 0 && g_playstate == CMoviePlayerGui::PLAY) {
- selected--;
- filename = _filelist[selected].Name.c_str();
- sel_filename = _filelist[selected].getFileName();
- //printf ("[movieplayer.cpp] sel_filename: %s\n", filename);
- int namepos = _filelist[selected].Name.rfind("vlc://");
- std::string mrl_str = _filelist[selected].Name.substr(namepos + 6);
- char *tmp = curl_escape (mrl_str.c_str (), 0);
- strncpy (mrl, tmp, sizeof (mrl) - 1);
- curl_free (tmp);
- printf ("[movieplayer.cpp] Generated FILE MRL: %s\n", mrl);
-
- update_info = true;
- start_play = true;
+ unsigned int new_selected = selected;
+ if(!_filelist.empty() && g_playstate == CMoviePlayerGui::PLAY)
+ {
+ if(msg == CRCInput::RC_left && selected > 0)
+ new_selected--;
+ else if(msg == CRCInput::RC_right && selected + 1 < _filelist.size())
+ new_selected++;
}
- }
- else if(msg == CRCInput::RC_right)
- {
- if(!_filelist.empty() && selected + 1 < _filelist.size() && g_playstate == CMoviePlayerGui::PLAY) {
- selected++;
+
+ if(selected != new_selected)
+ {
+ selected = new_selected;
filename = _filelist[selected].Name.c_str();
sel_filename = _filelist[selected].getFileName();
//printf ("[movieplayer.cpp] sel_filename: %s\n", filename);
commit a7e6b21659868746d2c5aa4e3e73e22e64b7c0ba
Author: Christian Schuett <Gau...@ho...>
Date: Sat Apr 19 18:56:39 2014 +0200
Neutrino movieplayer: simplify play time display code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp
index 308fe54..a089965 100644
--- a/tuxbox/neutrino/src/gui/movieplayer.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer.cpp
@@ -3359,7 +3359,6 @@ void CMoviePlayerGui::PlayFile (int parental)
}
TRACE("[mp] do jump %d sec\r\n",g_jumpseconds);
- FileTime.hide();
loop = false; // do no further bookmark checks
}
}
@@ -3722,10 +3721,14 @@ void CMoviePlayerGui::PlayFile (int parental)
//-- filetime display --
//----------------------
- if(FileTime.IsVisible() && g_playstate == CMoviePlayerGui::PLAY)
+ if(g_playstate == CMoviePlayerGui::PLAY)
{
FileTime.update();
}
+ else if(g_playstate == CMoviePlayerGui::JPOS || g_playstate == CMoviePlayerGui::JF || g_playstate == CMoviePlayerGui::JB)
+ {
+ FileTime.hide();
+ }
//-- check RC code --
//-------------------
@@ -3975,14 +3978,12 @@ void CMoviePlayerGui::PlayFile (int parental)
case CRCInput::RC_left:
g_jumpseconds = -15;
g_playstate = CMoviePlayerGui::JB;
- FileTime.hide();
break;
//-- jump 1/4 minute forward --
case CRCInput::RC_right:
g_jumpseconds = 15;
g_playstate = CMoviePlayerGui::JF;
- FileTime.hide();
break;
//-- resync A/V --
@@ -4008,28 +4009,24 @@ void CMoviePlayerGui::PlayFile (int parental)
case CRCInput::RC_1:
g_jumpseconds = -60;
g_playstate = CMoviePlayerGui::JB;
- FileTime.hide();
break;
//-- jump to start --
case CRCInput::RC_2:
g_jumpseconds = 0;
g_playstate = CMoviePlayerGui::JPOS;
- FileTime.hide();
break;
//-- jump 1 minute forward --
case CRCInput::RC_3:
g_jumpseconds = 60;
g_playstate = CMoviePlayerGui::JF;
- FileTime.hide();
break;
//-- jump 5 minutes back --
case CRCInput::RC_4:
g_jumpseconds = -5 * 60;
g_playstate = CMoviePlayerGui::JB;
- FileTime.hide();
break;
//-- jump via gui --
@@ -4061,7 +4058,6 @@ void CMoviePlayerGui::PlayFile (int parental)
g_playstate = CMoviePlayerGui::JB;
}
printf("Jump %d\n",g_jumpseconds);
- FileTime.hide();
}
}
break;
@@ -4070,28 +4066,24 @@ void CMoviePlayerGui::PlayFile (int parental)
case CRCInput::RC_6:
g_jumpseconds = 5 * 60;
g_playstate = CMoviePlayerGui::JF;
- FileTime.hide();
break;
//-- jump 10 minutes back --
case CRCInput::RC_7:
g_jumpseconds = -10 * 60;
g_playstate = CMoviePlayerGui::JB;
- FileTime.hide();
break;
//-- jump to end --
case CRCInput::RC_8:
g_jumpseconds = PF_JMP_END; // dirty hack 2
g_playstate = CMoviePlayerGui::JPOS;
- FileTime.hide();
break;
//-- jump 10 minutes forward --
case CRCInput::RC_9:
g_jumpseconds = 10 * 60;
g_playstate = CMoviePlayerGui::JF;
- FileTime.hide();
break;
//-- select previous item (in playlist) --
@@ -4380,7 +4372,7 @@ CMoviePlayerGui::PlayStream (int streamtype)
}
g_RCInput->getMsg (&msg, &data, 10); // 1 secs..
- if(StreamTime.IsVisible() && g_playstate == CMoviePlayerGui::PLAY)
+ if(g_playstate == CMoviePlayerGui::PLAY)
{
StreamTime.update();
}
@@ -4388,6 +4380,7 @@ CMoviePlayerGui::PlayStream (int streamtype)
{
if(g_playstate >= CMoviePlayerGui::PLAY)
{
+ StreamTime.hide();
g_playstate = CMoviePlayerGui::STOPPED;
aborted = true;
if (cdDvd) {
@@ -4439,37 +4432,31 @@ CMoviePlayerGui::PlayStream (int streamtype)
{
skipvalue = "-00:01:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_3)
{
skipvalue = "+00:01:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_4)
{
skipvalue = "-00:05:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_6)
{
skipvalue = "+00:05:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_7)
{
skipvalue = "-00:10:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_9)
{
skipvalue = "+00:10:00";
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
else if(msg == CRCInput::RC_down || msg == CRCInput::RC_5)
{
@@ -4484,7 +4471,6 @@ CMoviePlayerGui::PlayStream (int streamtype)
if(skipvalue[0]== '=')
skipvalue = skipvalue.substr(1);
g_playstate = CMoviePlayerGui::SKIP;
- StreamTime.hide();
}
}
else if(msg == CRCInput::RC_setup)
@@ -4589,6 +4575,10 @@ CMoviePlayerGui::PlayStream (int streamtype)
{
exit = true;
}
+ if(g_playstate == CMoviePlayerGui::SKIP)
+ {
+ StreamTime.hide();
+ }
}
while (true);
remove("/tmp/tmpts");
diff --git a/tuxbox/neutrino/src/gui/timeosd.cpp b/tuxbox/neutrino/src/gui/timeosd.cpp
index 63bf2b0..1af084e 100644
--- a/tuxbox/neutrino/src/gui/timeosd.cpp
+++ b/tuxbox/neutrino/src/gui/timeosd.cpp
@@ -91,6 +91,9 @@ void CTimeOSD::update()
void CTimeOSD::hide()
{
- frameBuffer->paintBackgroundBoxRel(m_xend - m_width -20, m_y - 10 , m_width + 40, m_height + 20);
- visible=false;
+ if(visible)
+ {
+ frameBuffer->paintBackgroundBoxRel(m_xend - m_width -20, m_y - 10 , m_width + 40, m_height + 20);
+ visible=false;
+ }
}
commit 211d760fd09d9737e9d868b27c330ef9738e35b0
Author: Christian Schuett <Gau...@ho...>
Date: Sat Apr 12 21:27:56 2014 +0200
sectionsd: don't use iterator without locking to avoid possible segfault
based on idea by Jacek Jendrzej <cra...@go...> in Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
index 0c2b602..3f9c428 100644
--- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
+++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp
@@ -876,7 +876,7 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
}
unlockEvents();
- while (! to_delete.empty())
+ while (!to_delete.empty())
{
deleteEvent(to_delete.back());
to_delete.pop_back();
@@ -900,7 +900,7 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
back = true;
}
else
- printf("[sectionsd] addevent: times.size != 1, please report\n");
+ dprintf("[sectionsd] addevent: times.size != 1, please report\n");
if (back)
{
@@ -916,8 +916,9 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false)
unlockMessaging();
}
+ event_id_t uniqueKey = (*lastEvent)->uniqueKey();
unlockEvents();
- deleteEvent((*lastEvent)->uniqueKey());
+ deleteEvent(uniqueKey);
}
else
unlockEvents();
@@ -1059,8 +1060,10 @@ static void addNVODevent(const SIevent &evt)
--lastEvent;
}
unlockMessaging();
+
+ event_id_t uniqueKey = (*lastEvent)->uniqueKey();
unlockEvents();
- deleteEvent((*lastEvent)->uniqueKey());
+ deleteEvent(uniqueKey);
}
else
unlockEvents();
@@ -1175,6 +1178,7 @@ xmlNodePtr FindTransponder(xmlNodePtr provider, const t_original_network_id onid
static void removeOldEvents(const long seconds)
{
bool goodtimefound;
+ std::vector<event_id_t> to_delete;
// Alte events loeschen
time_t zeit = time(NULL);
@@ -1184,7 +1188,6 @@ static void removeOldEvents(const long seconds)
MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey::iterator e = mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.begin();
while ((e != mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.end()) && (!messaging_zap_detected)) {
- unlockEvents();
goodtimefound = false;
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) {
if (t->startzeit + (long)t->dauer >= zeit - seconds) {
@@ -1195,13 +1198,17 @@ static void removeOldEvents(const long seconds)
}
if (false == goodtimefound)
- deleteEvent((*(e++))->uniqueKey());
- else
- ++e;
- readLockEvents();
+ to_delete.push_back((*e)->uniqueKey());
+ ++e;
}
unlockEvents();
-
+
+ while (!to_delete.empty())
+ {
+ deleteEvent(to_delete.back());
+ to_delete.pop_back();
+ }
+
return;
}
@@ -1209,6 +1216,7 @@ static void removeWasteEvents()
{
bool haslinkage;
bool validevent;
+ std::vector<event_id_t> to_delete;
xmlDocPtr service_parser = parseXmlFile(SERVICES_XML);
xmlNodePtr services_tp;
@@ -1224,7 +1232,6 @@ static void removeWasteEvents()
MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.begin();
while ((e != mySIeventsOrderUniqueKey.end()) && (!messaging_zap_detected)) {
- unlockEvents();
validevent = true;
haslinkage = false;
if ((last_original_network_id == e->second->original_network_id) &&
@@ -1281,13 +1288,17 @@ static void removeWasteEvents()
}
if (!validevent)
- deleteEvent((e++)->first);
- else
- ++e;
- readLockEvents();
+ to_delete.push_back(e->first);
+ ++e;
}
unlockEvents();
+ while (!to_delete.empty())
+ {
+ deleteEvent(to_delete.back());
+ to_delete.pop_back();
+ }
+
xmlFreeDoc(service_parser);
return;
}
commit 5333d110be07709dd9e465002089ec2a9a330cf3
Author: Christian Schuett <Gau...@ho...>
Date: Sat Apr 12 00:04:31 2014 +0200
Neutrino CMenuWidget: remove an unnecessary constructor
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/dirchooser.h b/tuxbox/neutrino/src/gui/widget/dirchooser.h
index d24215a..d829219 100755
--- a/tuxbox/neutrino/src/gui/widget/dirchooser.h
+++ b/tuxbox/neutrino/src/gui/widget/dirchooser.h
@@ -41,7 +41,7 @@ extern unsigned int getFreeDiscSpaceGB(const char * dir);
extern int getFirstFreeRecDirNr(int min_free_gb);
#define MAX_ALLOWED_PATHS 2
-class CDirChooser : public CMenuWidget
+class CDirChooser : public CMenuTarget
{
private:
std::string* dirPath;
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index f90d6ed..9c10e88 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -244,15 +244,6 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
}
}
-CMenuWidget::CMenuWidget()
-{
- name = NONEXISTANT_LOCALE;
- nameString = g_Locale->getText(NONEXISTANT_LOCALE);
- iconfile="";
- selected=-1;
- iconOffset= 0;
-}
-
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const int mheight)
{
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index 9d0a5e3..6411aff 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -322,7 +322,6 @@ class CMenuWidget : public CMenuTarget
virtual bool updateSelection(int pos);
public:
- CMenuWidget();
CMenuWidget(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
CMenuWidget(const char* Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
~CMenuWidget();
commit 612044f1e767b3f746c52274fe5e8a18f70061f6
Author: Christian Schuett <Gau...@ho...>
Date: Fri Apr 11 20:42:...
[truncated message content] |
|
From: Thilo G. <tux...@ne...> - 2014-04-11 12:40:50
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via ffea7f69cec8b47d66d4dc027371fb6b1ad32012 (commit)
from 7c16926b6522d4606d6bf20864f3f627bc2ed1c8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ffea7f69cec8b47d66d4dc027371fb6b1ad32012
Author: GetAway <get...@t-...>
Date: Fri Apr 11 08:17:31 2014 +0200
msgbox: fix truncated text fix sizeof(int) initialize some variables remove unused code bump version to 1.72
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/tools/msgbox/msgbox.c b/tuxbox/tools/msgbox/msgbox.c
index 3e83886..615e93b 100644
--- a/tuxbox/tools/msgbox/msgbox.c
+++ b/tuxbox/tools/msgbox/msgbox.c
@@ -33,7 +33,7 @@
#include <dbox/fb.h>
#endif
-#define M_VERSION 1.71
+#define M_VERSION 1.72
#define FONT "/share/fonts/pakenham.ttf"
@@ -53,7 +53,6 @@ struct fb_cmap oldcmap = {0, 256, ord, ogn, obl, otr};
char *line_buffer=NULL, *title=NULL;
int size=36, type=0, timeout=0, refresh=3, flash=0, selection=0, tbuttons=0, buttons=0, bpline=3, echo=0, absolute=0, mute=1, header=1, cyclic=1;
-char *butmsg[16];
int rbutt[16],hide=0,radius=0;
//static void ShowInfo(void);
@@ -84,10 +83,9 @@ int rval=0;
void put_instance(int pval)
{
-FILE *fh;
-
if(pval)
{
+ FILE *fh;
if((fh=fopen(INST_FILE,"w"))!=NULL)
{
fputc(pval,fh);
@@ -110,13 +108,11 @@ static void quit_signal(int sig)
int Read_Neutrino_Cfg(char *entry)
{
FILE *nfh;
-char tstr [512], *cfptr=NULL;
int rv=-1,styp=0;
if ( ( ((nfh=fopen(NCF_FILE,"r"))!=NULL) && (styp=1) ) || ( ((nfh=fopen(ECF_FILE,"r"))!=NULL) && (styp=2) ) )
{
- tstr[0]=0;
-
+ char tstr[512]={0}, *cfptr=NULL;
while((!feof(nfh)) && ((strstr(tstr,entry)==NULL) || ((cfptr=strchr(tstr,'='))==NULL)))
{
fgets(tstr,500,nfh);
@@ -296,7 +292,7 @@ int i,bx,by,x1,y1,rv=-1,run=1,line=0,action=1,cut,itmp,btns=buttons,lbtns=(butto
printf("msgbox <invalid Text-Format>\n");
return -1;
}
- x1+=10;
+ //x1+=10;
dy=0.8*(double)size;
if(pxw<x1)
@@ -465,12 +461,12 @@ void ShowUsage(void)
int main (int argc, char **argv)
{
-int index,index2,tv,found=0;
+int index=0 ,index2,tv=0,found=0;
int dloop=1, rcc=-1, flsh=0, cupd=0;
-char rstr[BUFSIZE], *rptr, *aptr;
-time_t tm1,tm2;
+char rstr[BUFSIZE]={0}, *rptr=NULL, *aptr=NULL;
+time_t tm1=0,tm2=0;
unsigned int alpha;
-clock_t tk1=0;
+//clock_t tk1=0;
FILE *fh;
if(argc<2)
@@ -986,7 +982,7 @@ return 0;
time(&tm1);
tm2=tm1;
- tk1=clock()/(CLOCKS_PER_SEC/1000);
+// tk1=clock()/(CLOCKS_PER_SEC/1000);
#ifdef HAVE_DREAMBOX_HARDWARE
ClearKeys();
#endif
@@ -1097,9 +1093,6 @@ return 0;
//cleanup
// clear Display
-// memset(lbb, TRANSP, var_screeninfo.xres*var_screeninfo.yres);
-// memcpy(lfb, lbb, var_screeninfo.xres*var_screeninfo.yres);
-
memcpy(lfb, obb, var_screeninfo.xres*var_screeninfo.yres);
munmap(lfb, fix_screeninfo.smem_len);
#ifdef HAVE_DBOX_HARDWARE
diff --git a/tuxbox/tools/msgbox/msgbox.h b/tuxbox/tools/msgbox/msgbox.h
index 8708716..c1f1729 100644
--- a/tuxbox/tools/msgbox/msgbox.h
+++ b/tuxbox/tools/msgbox/msgbox.h
@@ -187,7 +187,7 @@ struct fb_var_screeninfo var_screeninfo;
int startx, starty, sx, ex, sy, ey, debounce, rblock;
extern unsigned char sc[8], tc[8];
-extern char *butmsg[MAX_BUTTONS];
+char *butmsg[MAX_BUTTONS];
extern int buttons,selection;
extern int instance;
int get_instance(void);
diff --git a/tuxbox/tools/msgbox/text.c b/tuxbox/tools/msgbox/text.c
index 0848214..b85681f 100644
--- a/tuxbox/tools/msgbox/text.c
+++ b/tuxbox/tools/msgbox/text.c
@@ -127,7 +127,7 @@ int RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color)
int GetStringLen(int sx, char *string)
{
-int i, found;
+unsigned int i = 0;
int stringlen = 0, min_length = 0;
int count = 1, count_tilde = 0;
@@ -158,7 +158,7 @@ int count = 1, count_tilde = 0;
if(sscanf(string+1,"%3d",&i)==1)
{
string+=3;
- stringlen=i-sx;
+ stringlen = i - ((sx < 20) ? 20 : sx);
if (count_tilde == 1 && count == 1) {
min_length = ex-startx-2*i-10;
}
@@ -166,8 +166,8 @@ int count = 1, count_tilde = 0;
}
else
{
- found=0;
- for(i=0; i<sizeof(sc) && !found; i++)
+ int found=0;
+ for(i=0; i<sizeof(sc)/sizeof(sc[0]) && !found; i++)
{
if(*string==sc[i])
{
@@ -190,8 +190,9 @@ int count = 1, count_tilde = 0;
int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int size, int color)
{
- int stringlen, ex, charwidth,i,found;
- char rstr[BUFSIZE], *rptr=rstr, rc;
+ int stringlen = 0, ex = 0, charwidth = 0, found = 0;
+ unsigned int i = 0;
+ char rstr[BUFSIZE]={0}, *rptr=rstr, rc=' ';
int varcolor=color;
//set size
@@ -236,7 +237,7 @@ int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int siz
++rptr;
rc=*rptr;
found=0;
- for(i=0; i<sizeof(sc) && !found; i++)
+ for(i=0; i<sizeof(sc)/sizeof(sc[0]) && !found; i++)
{
if(rc==sc[i])
{
diff --git a/tuxbox/tools/msgbox/txtform.c b/tuxbox/tools/msgbox/txtform.c
index 3a9a4e7..0f9a059 100644
--- a/tuxbox/tools/msgbox/txtform.c
+++ b/tuxbox/tools/msgbox/txtform.c
@@ -37,13 +37,13 @@
int fh_txt_trans(const char *name, int xs, int xw, int ys, int dy, int cs, int line, int *cut, int *x, int *y, int plot)
{
char tstr[BUFSIZE],rstr[BUFSIZE],*tptr;
-int loop=1, j, first, slen, cnt=0;
+int loop=1, j, slen, cnt=0;
FILE *fh;
int just, color=CMCT;
if(!(fh=fopen(name,"rb"))) return(FH_ERROR_FILE);
- first=(line==0);
+// first=(line==0);
*x=0;
*y=0;
while((loop>0) && (fgets(tstr, sizeof(tstr), fh)))
@@ -87,18 +87,18 @@ int just, color=CMCT;
if(loop>=line)
{
RenderString(rstr, xs, ys, xw, just, cs, color);
- if(strlen(rstr))
+/* if(strlen(rstr))
{
first=0;
}
- ys+=dy;
+*/ ys+=dy;
}
}
else
{
if(strlen(rstr))
{
- slen=GetStringLen(xs,rstr)-10;
+ slen=GetStringLen(xs,rstr)+10;
if(slen>*x)
{
*x=slen;
-----------------------------------------------------------------------
Summary of changes:
tuxbox/tools/msgbox/msgbox.c | 25 +++++++++----------------
tuxbox/tools/msgbox/msgbox.h | 2 +-
tuxbox/tools/msgbox/text.c | 15 ++++++++-------
tuxbox/tools/msgbox/txtform.c | 10 +++++-----
4 files changed, 23 insertions(+), 29 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-04-06 16:38:32
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 7c16926b6522d4606d6bf20864f3f627bc2ed1c8 (commit)
via 04a3f6b028fa3e95cb8ec2691cc5c8be58249b71 (commit)
via 5af5cfb9585c9d43c512b33bd9e8d4ee871e32d8 (commit)
via 8f7c5428de4744aff65ea71a9b9d8f0e09dba82b (commit)
via fff9161ff226b1718d19db4f7a61721ef4498a0c (commit)
via 875575a763345d965cb5b67a2147c2489222396c (commit)
via e32ee733bd3d35460c7d8107e8ccd62bc19ab444 (commit)
via 88072454e59fe7db1b8e31f194fdb83dc00ad976 (commit)
via 9647ddb424b468fe0fefc7b44f2157869992991d (commit)
from 2fcfc65a1783740c2162dbd687df5cdee315e628 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7c16926b6522d4606d6bf20864f3f627bc2ed1c8
Author: Christian Schuett <Gau...@ho...>
Date: Thu Apr 3 20:02:05 2014 +0200
Neutrino EPG viewer: fix width and height calculation of lines
if font sizes of EPG info1 and info2 differ, width and height of
lines are calculated wrong
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 4609d7b..378d3c2 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1758,7 +1758,7 @@ void CChannelList::processTextToArray(std::string text) // UTF-8
{
std::string aktLine = "";
std::string aktWord = "";
- int aktWidth = 0;
+ int aktWidth = 0, aktWordWidth = 0;
text += ' ';
char* text_= (char*) text.c_str();
@@ -1769,7 +1769,7 @@ void CChannelList::processTextToArray(std::string text) // UTF-8
if (*text_!='\n')
aktWord += *text_;
- int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true);
+ aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true);
if ((aktWordWidth+aktWidth)<=(infozone_width - 20))
{//space ok, add
aktWidth += aktWordWidth;
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index 2a3bdbf..588ee0b 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -139,7 +139,7 @@ void CEpgData::start()
oy -= buttonheight;
/* this is the text box height - and the height of the scroll bar */
sb = oy - topboxheight - botboxheight;
- medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight();
+ medlineheight = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(), g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getHeight());
medlinecount = sb / medlineheight;
toph = topboxheight;
@@ -165,9 +165,10 @@ void CEpgData::addTextToArray(const std::string & text, int flag) // UTF-8
void CEpgData::processTextToArray(std::string text, int flag) // UTF-8
{
+ Font* fnt_epg = g_Font[(flag == EPG_INFO1) ? SNeutrinoSettings::FONT_TYPE_EPG_INFO1 : SNeutrinoSettings::FONT_TYPE_EPG_INFO2];
std::string aktLine = "";
std::string aktWord = "";
- int aktWidth = 0;
+ int aktWidth = 0, aktWordWidth = 0;
text += ' ';
char* text_= (char*) text.c_str();
@@ -182,7 +183,7 @@ void CEpgData::processTextToArray(std::string text, int flag) // UTF-8
aktWord += *text_;
// check the wordwidth - add to this line if size ok
- int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord, true);
+ aktWordWidth = fnt_epg->getRenderWidth(aktWord, true);
if((aktWordWidth+aktWidth)<=(ox- 15- 15))
{//space ok, add
aktWidth += aktWordWidth;
@@ -221,7 +222,7 @@ void CEpgData::processTextToArray(std::string text, int flag) // UTF-8
void CEpgData::showText( int startPos, int ypos )
{
// recalculate
- medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight();
+ medlineheight = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(), g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getHeight());
medlinecount = sb / medlineheight;
int textSize = epgText.size();
@@ -254,7 +255,7 @@ void CEpgData::showText( int startPos, int ypos )
offset += digi;
break;
}
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15,
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15- offset,
epgText[i].first.substr(pos1, pos2 - pos1),
(epgText[i].second == SCREENING_BEFORE) ? COL_MENUCONTENTINACTIVE : COL_MENUCONTENT,
0, true); // UTF-8
commit 04a3f6b028fa3e95cb8ec2691cc5c8be58249b71
Author: GetAway <get...@t-...>
Date: Tue Apr 1 17:55:46 2014 +0200
msgbox: Fix backgound, if using an absolute tab at beginning of the text. dont overwrite subsequent chars when using absolute tabs, push them! Use symbolic constant for FONT Fix warning: suggest parentheses around && within || bump version to 1.71
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/tools/msgbox/gfx.c b/tuxbox/tools/msgbox/gfx.c
index 8f5cd74..2621eea 100644
--- a/tuxbox/tools/msgbox/gfx.c
+++ b/tuxbox/tools/msgbox/gfx.c
@@ -34,7 +34,7 @@ void RenderBox(int sx, int sy, int ex, int ey, int rad, int col)
if (dxx<0)
{
- printf("[shellexec] RenderBox called with dx < 0 (%d)\n", dxx);
+ printf("[msgbox] RenderBox called with dx < 0 (%d)\n", dxx);
dxx=0;
}
diff --git a/tuxbox/tools/msgbox/io.c b/tuxbox/tools/msgbox/io.c
index 1b03b49..7e8e2c3 100644
--- a/tuxbox/tools/msgbox/io.c
+++ b/tuxbox/tools/msgbox/io.c
@@ -26,7 +26,7 @@
int rc_last_key=-1;
int lastval=-1;
int RCTranslate(int code);
-extern int rc;
+extern unsigned int rc;
time_t t1,t2;
clock_t tk1=0, tk2;
diff --git a/tuxbox/tools/msgbox/msgbox.c b/tuxbox/tools/msgbox/msgbox.c
index 3f1b1a6..3e83886 100644
--- a/tuxbox/tools/msgbox/msgbox.c
+++ b/tuxbox/tools/msgbox/msgbox.c
@@ -33,7 +33,9 @@
#include <dbox/fb.h>
#endif
-#define M_VERSION 1.70
+#define M_VERSION 1.71
+
+#define FONT "/share/fonts/pakenham.ttf"
#define NCF_FILE "/var/tuxbox/config/neutrino.conf"
#define ECF_FILE "/var/tuxbox/config/enigma/config"
@@ -57,14 +59,14 @@ int rbutt[16],hide=0,radius=0;
//static void ShowInfo(void);
// Misc
-char NOMEM[]="msgbox <Out of memory>\n";
+const char NOMEM[]="msgbox <Out of memory>\n";
char TMP_FILE[64]="/tmp/msgbox.tmp";
-unsigned char FONT[64]= "/share/fonts/pakenham.ttf";
unsigned char *lfb = 0, *lbb = 0, *obb = 0, *hbb = 0, *ibb = 0;
unsigned char nstr[BUFSIZE]="";
unsigned char *trstr;
-unsigned rc,sc[8]={'a','o','u','A','O','U','z','d'}, tc[8]={0xE4,0xF6,0xFC,0xC4,0xD6,0xDC,0xDF,0xB0};
-char INST_FILE[]="/tmp/rc.locked";
+unsigned char sc[8]={'a','o','u','A','O','U','z','d'}, tc[8]={0xE4,0xF6,0xFC,0xC4,0xD6,0xDC,0xDF,0xB0};
+unsigned int rc;
+const char INST_FILE[]="/tmp/rc.locked";
int instance=0;
int get_instance(void)
@@ -111,7 +113,7 @@ FILE *nfh;
char tstr [512], *cfptr=NULL;
int rv=-1,styp=0;
- if((((nfh=fopen(NCF_FILE,"r"))!=NULL)&&(styp=1))||(((nfh=fopen(ECF_FILE,"r"))!=NULL))&&(styp=2))
+ if ( ( ((nfh=fopen(NCF_FILE,"r"))!=NULL) && (styp=1) ) || ( ((nfh=fopen(ECF_FILE,"r"))!=NULL) && (styp=2) ) )
{
tstr[0]=0;
diff --git a/tuxbox/tools/msgbox/msgbox.h b/tuxbox/tools/msgbox/msgbox.h
index 62279e4..8708716 100644
--- a/tuxbox/tools/msgbox/msgbox.h
+++ b/tuxbox/tools/msgbox/msgbox.h
@@ -50,7 +50,6 @@
#define MAX_BUTTONS 16
#define BUFSIZE 4095
-extern unsigned char FONT[64];
enum {LEFT, CENTER, RIGHT};
enum {SMALL, MED, BIG};
@@ -187,7 +186,7 @@ struct fb_fix_screeninfo fix_screeninfo;
struct fb_var_screeninfo var_screeninfo;
int startx, starty, sx, ex, sy, ey, debounce, rblock;
-extern unsigned sc[8], tc[8];
+extern unsigned char sc[8], tc[8];
extern char *butmsg[MAX_BUTTONS];
extern int buttons,selection;
extern int instance;
diff --git a/tuxbox/tools/msgbox/text.c b/tuxbox/tools/msgbox/text.c
index cafb792..0848214 100644
--- a/tuxbox/tools/msgbox/text.c
+++ b/tuxbox/tools/msgbox/text.c
@@ -125,10 +125,11 @@ int RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color)
* GetStringLen
******************************************************************************/
-int GetStringLen(int sx, unsigned char *string)
+int GetStringLen(int sx, char *string)
{
int i, found;
-int stringlen = 0;
+int stringlen = 0, min_length = 0;
+int count = 1, count_tilde = 0;
//reset kerning
@@ -145,6 +146,7 @@ int stringlen = 0;
else
{
string++;
+ count_tilde++;
if(*string=='t')
{
stringlen=desc.width+TABULATOR*((int)(stringlen/TABULATOR)+1);
@@ -157,6 +159,9 @@ int stringlen = 0;
{
string+=3;
stringlen=i-sx;
+ if (count_tilde == 1 && count == 1) {
+ min_length = ex-startx-2*i-10;
+ }
}
}
else
@@ -174,9 +179,9 @@ int stringlen = 0;
}
}
string++;
+ count++;
}
-
- return stringlen;
+ return ((stringlen > min_length) ? stringlen : min_length);
}
/******************************************************************************
@@ -261,7 +266,7 @@ int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int siz
if(sscanf(rptr+1,"%3d",&i)==1)
{
rptr+=3;
- sx=i;
+ sx=(i<sx) ? sx : i;
}
break;
}
diff --git a/tuxbox/tools/msgbox/text.h b/tuxbox/tools/msgbox/text.h
index 2d796be..4d23f63 100644
--- a/tuxbox/tools/msgbox/text.h
+++ b/tuxbox/tools/msgbox/text.h
@@ -31,7 +31,7 @@ extern int FSIZE_SMALL;
FT_Error MyFaceRequester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface);
int RenderString(char *string, int sx, int sy, int maxwidth, int layout, int size, int color);
-int GetStringLen(int sx, unsigned char *string);
+int GetStringLen(int sx, char *string);
void CatchTabs(char *text);
#endif
diff --git a/tuxbox/tools/msgbox/txtform.c b/tuxbox/tools/msgbox/txtform.c
index 7c298b2..3a9a4e7 100644
--- a/tuxbox/tools/msgbox/txtform.c
+++ b/tuxbox/tools/msgbox/txtform.c
@@ -71,7 +71,7 @@ int just, color=CMCT;
case 'l': just=LEFT; break;
case 'r': just=RIGHT; break;
case 'c': just=CENTER; break;
- case 's':
+ case 's': // vert. line
RenderBox(xs, ys-cs/3, xs+xw, ys-cs/3+1, FILL, COL_MENUCONTENT_PLUS_3);
RenderBox(xs, ys-cs/3+1, xs+xw, ys-cs/3+2, FILL, COL_MENUCONTENT_PLUS_1);
break;
@@ -98,7 +98,7 @@ int just, color=CMCT;
{
if(strlen(rstr))
{
- slen=GetStringLen(xs,rstr);
+ slen=GetStringLen(xs,rstr)-10;
if(slen>*x)
{
*x=slen;
commit 5af5cfb9585c9d43c512b33bd9e8d4ee871e32d8
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 30 21:12:31 2014 +0200
Neutrino EPG viewer: use enums for the different EPG items
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index ee3ddb7..2a3bdbf 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -145,7 +145,7 @@ void CEpgData::start()
toph = topboxheight;
}
-void CEpgData::addTextToArray(const std::string & text, int screening) // UTF-8
+void CEpgData::addTextToArray(const std::string & text, int flag) // UTF-8
{
//printf("line: >%s<\n", text.c_str() );
if (text==" ")
@@ -153,17 +153,17 @@ void CEpgData::addTextToArray(const std::string & text, int screening) // UTF-8
emptyLineCount ++;
if(emptyLineCount<2)
{
- epgText.push_back(epg_pair(text, screening));
+ epgText.push_back(epg_pair(text, flag));
}
}
else
{
emptyLineCount = 0;
- epgText.push_back(epg_pair(text, screening));
+ epgText.push_back(epg_pair(text, flag));
}
}
-void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
+void CEpgData::processTextToArray(std::string text, int flag) // UTF-8
{
std::string aktLine = "";
std::string aktWord = "";
@@ -190,7 +190,7 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
if(*text_=='\n')
{ //enter-handler
- addTextToArray( aktLine, screening);
+ addTextToArray( aktLine, flag);
aktLine = "";
aktWidth= 0;
}
@@ -198,7 +198,7 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
}
else
{//new line needed
- addTextToArray( aktLine, screening);
+ addTextToArray( aktLine, flag);
aktLine = aktWord;
aktWidth = aktWordWidth;
aktWord = "";
@@ -215,7 +215,7 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
text_++;
}
//add the rest
- addTextToArray( aktLine + aktWord, screening );
+ addTextToArray( aktLine + aktWord, flag );
}
void CEpgData::showText( int startPos, int ypos )
@@ -239,7 +239,7 @@ void CEpgData::showText( int startPos, int ypos )
frameBuffer->paintBoxRel(sx, y, ox- 15, sb, COL_MENUCONTENT_PLUS_0); // background of the text box
for(int i = startPos; i < textSize && i < startPos + medlinecount; i++, y += medlineheight)
{
- if(epgText[i].second){
+ if(epgText[i].second == SCREENING_AFTER || epgText[i].second == SCREENING_BEFORE){
std::string::size_type pos1 = epgText[i].first.find_first_not_of(tok, 0);
std::string::size_type pos2 = epgText[i].first.find_first_of(tok, pos1);
while( pos2 != string::npos || pos1 != string::npos ){
@@ -254,7 +254,10 @@ void CEpgData::showText( int startPos, int ypos )
offset += digi;
break;
}
- g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15, epgText[i].first.substr(pos1, pos2 - pos1), (epgText[i].second==2)? COL_MENUCONTENTINACTIVE: COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15,
+ epgText[i].first.substr(pos1, pos2 - pos1),
+ (epgText[i].second == SCREENING_BEFORE) ? COL_MENUCONTENTINACTIVE : COL_MENUCONTENT,
+ 0, true); // UTF-8
count++;
pos1 = epgText[i].first.find_first_not_of(tok, pos2);
pos2 = epgText[i].first.find_first_of(tok, pos1);
@@ -263,7 +266,8 @@ void CEpgData::showText( int startPos, int ypos )
count = 0;
}
else{
- g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT, 0, true); // UTF-8
+ int font_type = (epgText[i].second == EPG_INFO1) ? SNeutrinoSettings::FONT_TYPE_EPG_INFO1 : SNeutrinoSettings::FONT_TYPE_EPG_INFO2;
+ g_Font[font_type]->RenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT, 0, true); // UTF-8
}
}
@@ -529,14 +533,12 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_
}
}
if (false == bHide) {
- processTextToArray(Latin1_to_UTF8(epgData.info1));
+ processTextToArray(Latin1_to_UTF8(epgData.info1), EPG_INFO1);
}
}
- info1_lines = epgText.size();
-
//scan epg-data - sort to list
- if ((epgData.info2.empty()) && (info1_lines == 0))
+ if (epgData.info2.empty() && epgText.empty())
processTextToArray(g_Locale->getText(LOCALE_EPGVIEWER_NODETAILED)); // UTF-8
else
processTextToArray(Latin1_to_UTF8(strEpisode + epgData.info2));
@@ -970,7 +972,7 @@ void CEpgData::FollowScreenings(const time_t startzeit)
CChannelEventList::iterator e;
struct tm *tmStartZeit;
std::string screening_dates, screening_nodual;
- int flag = 1;
+ int flag = SCREENING_AFTER;
char tmpstr[256] = {0};
screening_dates = screening_nodual = "";
@@ -990,7 +992,7 @@ void CEpgData::FollowScreenings(const time_t startzeit)
strftime(tmpstr, sizeof(tmpstr), ". %H:%M ", tmStartZeit );
screening_dates += tmpstr;
- flag = (e->startTime <= startzeit) ? 2 : 1;
+ flag = (e->startTime <= startzeit) ? SCREENING_BEFORE : SCREENING_AFTER;
if (screening_dates != screening_nodual){
screening_nodual=screening_dates;
diff --git a/tuxbox/neutrino/src/gui/epgview.h b/tuxbox/neutrino/src/gui/epgview.h
index 43356f2..dc23a5a 100644
--- a/tuxbox/neutrino/src/gui/epgview.h
+++ b/tuxbox/neutrino/src/gui/epgview.h
@@ -52,6 +52,14 @@
class CEpgData
{
private:
+ enum
+ {
+ EPG_INFO2,
+ SCREENING_AFTER,
+ SCREENING_BEFORE,
+ EPG_INFO1
+ };
+
CFrameBuffer *frameBuffer;
CChannelEventList evtlist;
CChannelEventList followlist;
@@ -69,7 +77,7 @@ class CEpgData
time_t next_zeit;
int ox, oy, sx, sy, toph, sb;
- int emptyLineCount, info1_lines;
+ int emptyLineCount;
int textCount;
typedef std::pair<std::string,int> epg_pair;
std::vector<epg_pair> epgText;
@@ -81,8 +89,8 @@ class CEpgData
void GetEPGData(const t_channel_id channel_id, unsigned long long id, time_t* startzeit );
void GetPrevNextEPGData( unsigned long long id, time_t* startzeit );
- void addTextToArray( const std::string & text, int screening );
- void processTextToArray(std::string text, int screening = 0);
+ void addTextToArray( const std::string & text, int flag );
+ void processTextToArray(std::string text, int flag = EPG_INFO2);
void showText( int startPos, int ypos );
bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title, const time_t startzeit);
void FollowScreenings(const time_t startzeit);
commit 8f7c5428de4744aff65ea71a9b9d8f0e09dba82b
Author: Christian Schuett <Gau...@ho...>
Date: Sun Mar 30 19:28:44 2014 +0200
Neutrino: rename an enum to clarify its purpose
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp
index 42ac881..1a18f61 100644
--- a/tuxbox/neutrino/src/driver/lcdd.cpp
+++ b/tuxbox/neutrino/src/driver/lcdd.cpp
@@ -570,7 +570,7 @@ void CLCD::setEPGTitle(const std::string title)
showServicename("", false);
}
-void CLCD::setMoviePlaymode(const AUDIOMODES playmode)
+void CLCD::setMoviePlaymode(const PLAYMODES playmode)
{
movie_playmode = playmode;
@@ -809,12 +809,12 @@ void CLCD::showAudioTrack(const std::string & artist, const std::string & title,
}
-void CLCD::showAudioPlayMode(AUDIOMODES m)
+void CLCD::showAudioPlayMode(const PLAYMODES m)
{
display.draw_fill_rect (-1,51,10,62, CLCDDisplay::PIXEL_OFF);
switch(m)
{
- case AUDIO_MODE_PLAY:
+ case PLAYMODE_PLAY:
{
int x=3,y=53;
display.draw_line(x ,y ,x ,y+8, CLCDDisplay::PIXEL_ON);
@@ -824,16 +824,16 @@ void CLCD::showAudioPlayMode(AUDIOMODES m)
display.draw_line(x+4,y+4,x+4,y+4, CLCDDisplay::PIXEL_ON);
break;
}
- case AUDIO_MODE_STOP:
+ case PLAYMODE_STOP:
display.draw_fill_rect (1, 53, 8 ,61, CLCDDisplay::PIXEL_ON);
break;
- case AUDIO_MODE_PAUSE:
+ case PLAYMODE_PAUSE:
display.draw_line(1,54,1,60, CLCDDisplay::PIXEL_ON);
display.draw_line(2,54,2,60, CLCDDisplay::PIXEL_ON);
display.draw_line(6,54,6,60, CLCDDisplay::PIXEL_ON);
display.draw_line(7,54,7,60, CLCDDisplay::PIXEL_ON);
break;
- case AUDIO_MODE_FF:
+ case PLAYMODE_FF:
{
int x=2,y=55;
display.draw_line(x ,y , x , y+4, CLCDDisplay::PIXEL_ON);
@@ -844,7 +844,7 @@ void CLCD::showAudioPlayMode(AUDIOMODES m)
display.draw_line(x+5 ,y+2 , x+5, y+2, CLCDDisplay::PIXEL_ON);
}
break;
- case AUDIO_MODE_REV:
+ case PLAYMODE_REV:
{
int x=2,y=55;
display.draw_line(x ,y+2 , x , y+2, CLCDDisplay::PIXEL_ON);
@@ -930,7 +930,7 @@ void CLCD::setMode(const MODES m, const char * const title)
display.load_screen(&(background[BACKGROUND_LCD]));
display.draw_fill_rect(0, 14, LCD_COLS, 48, CLCDDisplay::PIXEL_OFF);
- showAudioPlayMode(AUDIO_MODE_STOP);
+ showAudioPlayMode(PLAYMODE_STOP);
showVolume(volume, false);
showclock = true;
showTime(); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
diff --git a/tuxbox/neutrino/src/driver/lcdd.h b/tuxbox/neutrino/src/driver/lcdd.h
index 4228809..41f7f6d 100644
--- a/tuxbox/neutrino/src/driver/lcdd.h
+++ b/tuxbox/neutrino/src/driver/lcdd.h
@@ -71,13 +71,13 @@ class CLCD
MODE_INFOBOX
#endif // LCD_UPDATE
};
- enum AUDIOMODES
+ enum PLAYMODES
{
- AUDIO_MODE_PLAY,
- AUDIO_MODE_STOP,
- AUDIO_MODE_FF,
- AUDIO_MODE_PAUSE,
- AUDIO_MODE_REV
+ PLAYMODE_PLAY,
+ PLAYMODE_STOP,
+ PLAYMODE_FF,
+ PLAYMODE_PAUSE,
+ PLAYMODE_REV
};
enum STATUSLINE
{
@@ -119,7 +119,7 @@ class CLCD
raw_display_t background[LCD_NUMBER_OF_BACKGROUNDS];
MODES mode;
- AUDIOMODES movie_playmode;
+ PLAYMODES movie_playmode;
std::string servicename;
std::string epg_title;
@@ -159,7 +159,7 @@ class CLCD
void showServicename(const std::string name, const bool perform_wakeup = true); // UTF-8
void setEPGTitle(const std::string title);
- void setMoviePlaymode(const AUDIOMODES playmode);
+ void setMoviePlaymode(const PLAYMODES playmode);
void setMovieInfo(const std::string big, const std::string small);
void setMovieAudio(const bool is_ac3);
std::string getMenutitle() { return menutitle; };
@@ -170,7 +170,7 @@ class CLCD
void showPercentOver(const unsigned char perc, const bool perform_update = true, const MODES m = MODE_TVRADIO);
void showMenuText(const int position, const char * text, const int highlight = -1, const bool utf_encoded = false);
void showAudioTrack(const std::string & artist, const std::string & title, const std::string & album);
- void showAudioPlayMode(AUDIOMODES m=AUDIO_MODE_PLAY);
+ void showAudioPlayMode(const PLAYMODES m = PLAYMODE_PLAY);
void showAudioProgress(const char perc, bool isMuted);
void setBrightness(int);
int getBrightness();
diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp
index 7c000b0..cfa3e86 100644
--- a/tuxbox/neutrino/src/gui/audioplayer.cpp
+++ b/tuxbox/neutrino/src/gui/audioplayer.cpp
@@ -2245,11 +2245,11 @@ void CAudioPlayerGui::paintLCD()
switch(m_state)
{
case CAudioPlayerGui::STOP:
- CLCD::getInstance()->showAudioPlayMode(CLCD::AUDIO_MODE_STOP);
+ CLCD::getInstance()->showAudioPlayMode(CLCD::PLAYMODE_STOP);
CLCD::getInstance()->showAudioProgress(0, CNeutrinoApp::getInstance()->isMuted());
break;
case CAudioPlayerGui::PLAY:
- CLCD::getInstance()->showAudioPlayMode(CLCD::AUDIO_MODE_PLAY);
+ CLCD::getInstance()->showAudioPlayMode(CLCD::PLAYMODE_PLAY);
CLCD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
m_curr_audiofile.MetaData.album);
@@ -2262,17 +2262,17 @@ void CAudioPlayerGui::paintLCD()
#endif /* INCLUDE_UNUSED_STUFF */
break;
case CAudioPlayerGui::PAUSE:
- CLCD::getInstance()->showAudioPlayMode(CLCD::AUDIO_MODE_PAUSE);
+ CLCD::getInstance()->showAudioPlayMode(CLCD::PLAYMODE_PAUSE);
CLCD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
m_curr_audiofile.MetaData.album);
break;
case CAudioPlayerGui::FF:
- CLCD::getInstance()->showAudioPlayMode(CLCD::AUDIO_MODE_FF);
+ CLCD::getInstance()->showAudioPlayMode(CLCD::PLAYMODE_FF);
CLCD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
m_curr_audiofile.MetaData.album);
break;
case CAudioPlayerGui::REV:
- CLCD::getInstance()->showAudioPlayMode(CLCD::AUDIO_MODE_REV);
+ CLCD::getInstance()->showAudioPlayMode(CLCD::PLAYMODE_REV);
CLCD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
m_curr_audiofile.MetaData.album);
break;
diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp
index c5a30de..308fe54 100644
--- a/tuxbox/neutrino/src/gui/movieplayer.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer.cpp
@@ -1166,7 +1166,7 @@ PlayStreamThread (void *mrl)
// pause VLC
httpres = sendGetRequest(pauseurl, response);
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PAUSE);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PAUSE);
while(g_playstate == CMoviePlayerGui::PAUSE)
{
@@ -1177,7 +1177,7 @@ PlayStreamThread (void *mrl)
// unpause VLC
httpres = sendGetRequest(unpauseurl, response);
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PLAY);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PLAY);
break;
case CMoviePlayerGui::SKIP:
{
@@ -1348,26 +1348,26 @@ void updateLcd(const std::string & big, const std::string & small)
{
static int l_playstate = -1;
std::string lcd_small = small;
- CLCD::AUDIOMODES playmode;
+ CLCD::PLAYMODES playmode;
if(l_playstate == g_playstate) return;
switch(g_playstate)
{
case CMoviePlayerGui::PAUSE:
- playmode = CLCD::AUDIO_MODE_PAUSE;
+ playmode = CLCD::PLAYMODE_PAUSE;
break;
case CMoviePlayerGui::REW:
- playmode = CLCD::AUDIO_MODE_REV;
+ playmode = CLCD::PLAYMODE_REV;
break;
case CMoviePlayerGui::FF:
- playmode = CLCD::AUDIO_MODE_FF;
+ playmode = CLCD::PLAYMODE_FF;
break;
default:
- playmode = CLCD::AUDIO_MODE_PLAY;
+ playmode = CLCD::PLAYMODE_PLAY;
break;
}
StrSearchReplace(lcd_small, "_", " ");
@@ -2299,7 +2299,7 @@ static void mp_checkEvent(MP_CTX *ctx)
//-- Freeze AV --
mp_freezeAV(ctx);
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PAUSE);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PAUSE);
fprintf(stderr, "[mp] pause\n");
while(g_playstate == CMoviePlayerGui::PAUSE) usleep(10000);
@@ -2310,7 +2310,7 @@ static void mp_checkEvent(MP_CTX *ctx)
//-- but demuxer will be started later. --
//-- (refilling of input buffer not needed) --
mp_unfreezeAV(ctx);
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PLAY);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PLAY);
break;
//-- next item of program/play-list --
diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp
index b723969..100c0e7 100644
--- a/tuxbox/neutrino/src/gui/movieplayer2.cpp
+++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp
@@ -2212,7 +2212,7 @@ OutputThread(void *arg)
switch (g_playstate)
{
case CMoviePlayerGui::PAUSE:
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PAUSE);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PAUSE);
#ifdef HAVE_TRIPLEDRAGON
ioctl(adec, AUDIO_STOP);
ioctl(dmxa, DMX_STOP);
@@ -2253,7 +2253,7 @@ OutputThread(void *arg)
perror("AUDIO_SET_MUTE");
#endif
#endif
- CLCD::getInstance()->setMoviePlaymode(CLCD::AUDIO_MODE_PLAY);
+ CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PLAY);
break;
case CMoviePlayerGui::SKIP:
DBG("requesting buffer reset\n");
@@ -2479,7 +2479,7 @@ void updateLcd(const std::string &big, const std::string &small)
{
static int l_playstate = -1;
std::string lcd_small = small;
- CLCD::AUDIOMODES playmode;
+ CLCD::PLAYMODES playmode;
if (l_playstate == g_playstate)
return;
@@ -2487,10 +2487,10 @@ void updateLcd(const std::string &big, const std::string &small)
switch (g_playstate)
{
case CMoviePlayerGui::PAUSE:
- playmode = CLCD::AUDIO_MODE_PAUSE;
+ playmode = CLCD::PLAYMODE_PAUSE;
break;
default:
- playmode = CLCD::AUDIO_MODE_PLAY;
+ playmode = CLCD::PLAYMODE_PLAY;
break;
}
StrSearchReplace(lcd_small, "_", " ");
commit fff9161ff226b1718d19db4f7a61721ef4498a0c
Author: GetAway <get...@t-...>
Date: Fri Mar 28 12:43:31 2014 +0100
input: Fix invalid use of static array. The impact was only seen with newer gcc Use symbolic constant for FONT Fix warning: suggest parentheses around && within || bump version to 1.39
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/tools/input/input.c b/tuxbox/tools/input/input.c
index 3654f4a..2e227ce 100644
--- a/tuxbox/tools/input/input.c
+++ b/tuxbox/tools/input/input.c
@@ -36,7 +36,9 @@
#define NCF_FILE "/var/tuxbox/config/neutrino.conf"
#define ECF_FILE "/var/tuxbox/config/engima/config"
#define BUFSIZE 1024
-#define I_VERSION 1.38
+#define I_VERSION 1.39
+
+#define FONT "/share/fonts/pakenham.ttf"
void TrimString(char *strg);
@@ -45,11 +47,10 @@ char *buffer=NULL;
// Misc
char NOMEM[]="input <Out of memory>\n";
char TMP_FILE[]="/tmp/input.tmp";
-unsigned char FONT[]= "/share/fonts/pakenham.ttf";
unsigned char *lfb = 0, *lbb = 0, *obb = 0;
unsigned char nstr[512]="";
unsigned char *trstr;
-static unsigned rc,sc[8]={'a','o','u','A','O','U','z','d'}, tc[8]={'ä','ö','ü','Ä','Ö','Ü','ß','°'};
+unsigned char rc,sc[8]={'a','o','u','A','O','U','z','d'}, tc[8]={'ä','ö','ü','Ä','Ö','Ü','ß','°'};
int radius;
static void quit_signal(int sig)
@@ -65,7 +66,7 @@ FILE *nfh;
char tstr [512], *cfptr=NULL;
int rv=-1,styp=0;
- if((((nfh=fopen(NCF_FILE,"r"))!=NULL)&&(styp=1))||(((nfh=fopen(ECF_FILE,"r"))!=NULL))&&(styp=2))
+ if( ( ((nfh=fopen(NCF_FILE,"r"))!=NULL) && (styp=1) ) || ( ((nfh=fopen(ECF_FILE,"r"))!=NULL) && (styp=2) ) )
{
tstr[0]=0;
@@ -426,7 +427,7 @@ unsigned int alpha;
}
use_kerning = FT_HAS_KERNING(face);
- desc.face_id = (char*)FONT;
+ desc.face_id = FONT;
desc.flags = FT_LOAD_MONOCHROME;
//init backbuffer
diff --git a/tuxbox/tools/input/input.h b/tuxbox/tools/input/input.h
index 06f7b62..808d446 100644
--- a/tuxbox/tools/input/input.h
+++ b/tuxbox/tools/input/input.h
@@ -19,9 +19,9 @@
*
*/
-#ifndef __MSGBOX_H__
+#ifndef __INPUT_H__
-#define __MSGBOX_H__
+#define __INPUT_H__
#include <errno.h>
#include <fcntl.h>
@@ -43,7 +43,6 @@
#include "color.h"
//freetype stuff
-extern unsigned char FONT[64];
enum {LEFT, CENTER, RIGHT};
enum {SMALL, MED, BIG};
@@ -91,7 +90,7 @@ struct fb_fix_screeninfo fix_screeninfo;
struct fb_var_screeninfo var_screeninfo;
int startx, starty, sx, ex, sy, ey;
-static unsigned sc[8], tc[8];
+extern unsigned char sc[8], tc[8];
extern char *butmsg[3];
extern int buttons,selection;
diff --git a/tuxbox/tools/input/inputd.c b/tuxbox/tools/input/inputd.c
index 3c26382..f1b2135 100644
--- a/tuxbox/tools/input/inputd.c
+++ b/tuxbox/tools/input/inputd.c
@@ -48,7 +48,7 @@ char rstr[512],tstr[512], *format, *estr;
int epos=-1,cpos=0,kpos=0,cnt,first=1,hex=0;
char kcod[10][13]={"0 _.:,;$@()#","1-+*/", "2abcä", "3def", "4ghi", "5jkl", "6mnoö", "7pqrs", "8tuvü", "9wxyz"};
char hcod[10][13]={"0","1", "2abc", "3def", "4", "5", "6", "7", "8", "9"};
-static unsigned rc,sc[8]={'a','o','u','A','O','U','z','d'}, tc[8]={'ä','ö','ü','Ä','Ö','Ü','ß','°'};
+extern unsigned rc;
extern int radius;
char INST_FILE[]="/tmp/rc.locked";
int instance=0;
commit 875575a763345d965cb5b67a2147c2489222396c
Author: Christian Schuett <Gau...@ho...>
Date: Wed Mar 19 19:07:39 2014 +0100
Neutrino: use strncpy() when creating filename for recording
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index 797f728..c3a1a6b 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -917,12 +917,12 @@ void CVCRControl::CFileDevice::appendEPGInfo(char *buf, unsigned int size, const
else
epgInfo = "";
- if (!(epgInfo.empty()) && epgInfo.size() < size)
+ if (!epgInfo.empty())
{
#warning fixme sectionsd should deliver data in UTF-8 format
// strcpy(&(filename[pos]), Latin1_to_UTF8(epgdata.title).c_str());
// all characters with code >= 128 will be discarded anyway
- strcpy(buf, epgInfo.c_str());
+ strncpy(buf, epgInfo.c_str(), size); // buf already terminated correctly in CFileDevice::Record(...)
char * p_act = buf;
do {
p_act += strspn(p_act, FILENAME_ALLOWED_CHARS);
@@ -946,12 +946,12 @@ void CVCRControl::CFileDevice::appendEPGTitle(char *buf, unsigned int size, cons
else
epgTitle = epgTitleTimer;
- if (!(epgTitle.empty()) && epgTitle.size() < size)
+ if (!epgTitle.empty())
{
#warning fixme sectionsd should deliver data in UTF-8 format
// strcpy(&(filename[pos]), Latin1_to_UTF8(epgdata.title).c_str());
// all characters with code >= 128 will be discarded anyway
- strcpy(buf, epgTitle.c_str());
+ strncpy(buf, epgTitle.c_str(), size); // buf already terminated correctly in CFileDevice::Record(...)
char * p_act = buf;
do {
p_act += strspn(p_act, FILENAME_ALLOWED_CHARS);
@@ -967,9 +967,9 @@ void CVCRControl::CFileDevice::appendChannelName(char *buf, unsigned int size, c
if (size > 0)
buf[0] = '\0';
std::string ext_channel_name = g_Zapit->getChannelName(channel_id);
- if (ext_channel_name.size() < size)
+ if (!ext_channel_name.empty())
{
- strcpy(buf, UTF8_TO_FILESYSTEM_ENCODING(ext_channel_name.c_str()));
+ strncpy(buf, UTF8_TO_FILESYSTEM_ENCODING(ext_channel_name.c_str()), size); // buf already terminated correctly in CFileDevice::Record(...)
char * p_act = buf;
do {
commit e32ee733bd3d35460c7d8107e8ccd62bc19ab444
Author: Christian Schuett <Gau...@ho...>
Date: Mon Mar 17 18:43:44 2014 +0100
Neutrino: use StrSearchReplace() when creating filename for recording
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index 398a2a3..797f728 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -42,6 +42,8 @@
#include <driver/encoding.h>
#include <driver/stream2file.h>
+#include <system/helper.h>
+
#include <gui/widget/messagebox.h>
#ifdef ENABLE_LIRC
@@ -842,57 +844,25 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c
{
expandedTemplate = std::string(basename(FilenameTemplate.c_str()));
}
- std::string::size_type searchPos = std::string::npos;
- std::string::size_type startAt = 0;
- size_t dataLength = 0;
char buf[256];
buf[255] = '\0';
appendChannelName(buf,255,channel_id);
- dataLength = strlen(buf);
- while ((searchPos = expandedTemplate.find("%C",startAt)) != std::string::npos) {
- expandedTemplate.erase(searchPos,2);
- expandedTemplate.insert(searchPos,buf);
- startAt = searchPos + dataLength;
- }
+ StrSearchReplace(expandedTemplate, "%C", buf);
- startAt = 0;
appendEPGTitle(buf, 255, epgid, epgTitle);
- dataLength = strlen(buf);
- while ((searchPos = expandedTemplate.find("%T",startAt)) != std::string::npos) {
- expandedTemplate.erase(searchPos,2);
- expandedTemplate.insert(searchPos,buf);
- startAt = searchPos + dataLength;
- }
+ StrSearchReplace(expandedTemplate, "%T", buf);
- startAt = 0;
appendEPGInfo(buf, 255, epgid);
- dataLength = strlen(buf);
- while ((searchPos = expandedTemplate.find("%I",startAt)) != std::string::npos) {
- expandedTemplate.erase(searchPos,2);
- expandedTemplate.insert(searchPos,buf);
- startAt = searchPos + dataLength;
- }
+ StrSearchReplace(expandedTemplate, "%I", buf);
strftime(buf,11,"%Y-%m-%d",localtime(&t));
- dataLength = strlen(buf);
- startAt = 0;
- while ((searchPos = expandedTemplate.find("%d",startAt)) != std::string::npos) {
- expandedTemplate.erase(searchPos,2);
- expandedTemplate.insert(searchPos,buf);
- startAt = searchPos + dataLength;
- }
+ StrSearchReplace(expandedTemplate, "%d", buf);
strftime(buf,7,"%H%M%S",localtime(&t));
- dataLength = strlen(buf);
- startAt = 0;
- while ((searchPos = expandedTemplate.find("%t",startAt)) != std::string::npos) {
- expandedTemplate.erase(searchPos,2);
- expandedTemplate.insert(searchPos,buf);
- startAt = searchPos + dataLength;
- }
+ StrSearchReplace(expandedTemplate, "%t", buf);
+
//printf("[CFileDevice] filename: %s, expandedTemplate: %s\n",filename,expandedTemplate.c_str());
-
strncpy(&(filename[pos]),expandedTemplate.c_str(),511-pos);
stream2file_error_msg_t error_msg;
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index c698135..167431d 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -55,7 +55,6 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
#include <algorithm>
#include <string>
#include <system/settings.h>
-#include <system/helper.h>
#include <time.h>
#include <sys/param.h>
commit 88072454e59fe7db1b8e31f194fdb83dc00ad976
Author: Christian Schuett <Gau...@ho...>
Date: Sat Mar 8 20:45:21 2014 +0100
nhttpd controlapi and yParser: remove unused variables
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 088f2d1..cdaeadd 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -1019,7 +1019,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
//hh->printf("%u %s\n", (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, NeutrinoAPI->BouquetList[i].name);
bouquet = NeutrinoAPI->GetBouquet((NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, mode);
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
- for (unsigned int j = 0; channel != bouquet->end() && actual == 0; ++channel, j++)
+ for (; channel != bouquet->end() && actual == 0; ++channel)
{
if (channel->channel_id == current_channel_id)
actual = i + 1;
@@ -1037,7 +1037,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
t_channel_id current_channel_id = NeutrinoAPI->Zapit->getCurrentServiceID();
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
- for (unsigned int i = 0; channel != bouquet->end(); ++channel, i++)
+ for (; channel != bouquet->end(); ++channel)
{
hh->WriteLn("<channel>");
hh->printf("\t<number>%u</number>\n\t<id>"
@@ -1107,7 +1107,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
bouquet = NeutrinoAPI->GetBouquet(atoi(hh->ParamList["bouquet"].c_str()), mode);
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
- for (unsigned int i = 0; channel != bouquet->end(); ++channel, i++)
+ for (; channel != bouquet->end(); ++channel)
hh->printf("%u "
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
" %s\n",
@@ -1603,12 +1603,10 @@ void CControlAPI::LCDAction(CyhookHandler *hh)
//-------------------------------------------------------------------------
void CControlAPI::SendEventList(CyhookHandler *hh, t_channel_id channel_id)
{
- int pos;
-
NeutrinoAPI->eList = NeutrinoAPI->Sectionsd->getEventsServiceKey(channel_id);
CChannelEventList::iterator eventIterator;
- for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator, pos++)
+ for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator)
hh->printf("%llu %ld %d %s\n", eventIterator->eventID, eventIterator->startTime, eventIterator->duration, eventIterator->description.c_str());
}
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index 363f1c9..38542af 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -197,7 +197,7 @@ std::string CNeutrinoYParser::func_mount_set_values(CyhookHandler *hh, std::str
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler */*hh*/, std::string para)
{
- std::string ynr, yresult, sel, nr_str, do_show_hidden;
+ std::string yresult, sel, nr_str, do_show_hidden;
unsigned int nr=1;
ySplitString(para," ",nr_str, do_show_hidden);
@@ -247,7 +247,7 @@ std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler */*h
{
bouquet = NeutrinoAPI->GetBouquet((NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, mode);
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
- for (unsigned int j = 0; channel != bouquet->end() && actual == 0; ++channel, j++)
+ for (; channel != bouquet->end() && actual == 0; ++channel)
{
if (channel->channel_id == current_channel_id)
actual = i + 1;
@@ -277,7 +277,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler */*hh
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
CEPGData epg;
- for (unsigned int i = 0; channel != bouquet->end(); ++channel, i++)
+ for (; channel != bouquet->end(); ++channel)
{
sid = string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS,channel->channel_id);
sel = (sid == achannel_id) ? "selected=\"selected\"" : "";
@@ -322,8 +322,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
CZapitClient::BouquetChannelList::iterator channel = channellist->begin();
for (; channel != channellist->end(); ++channel)
{
- CChannelEvent *event;
- event = NeutrinoAPI->ChannelListEvents[channel->channel_id];
+ CChannelEvent *event = NeutrinoAPI->ChannelListEvents[channel->channel_id];
classname = (i++ & 1) ? 'a' : 'b';
if (channel->channel_id == current_channel)
@@ -602,7 +601,7 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler */*
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler */*hh*/, std::string /*para*/)
{
- std::string ysel, ymount, ylocal_dir, yfstype, ynr, yresult, mounts;
+ std::string ysel, ymount, ylocal_dir, yfstype, yresult, mounts;
std::ifstream in;
in.open("/proc/mounts", std::ifstream::in);
@@ -800,7 +799,6 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler */*hh*/, std::s
{
sAddData += separator;
sAddData += "AC3";
- separator = "/";
}
sAddData += ')';
}
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 88aed8e..2d40b99 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -645,7 +645,6 @@ void CTimerList::paintItem(int pos)
{
zAddData += sep;
zAddData += "AC3";
- sep = "/";
}
zAddData += ')';
}
commit 9647ddb424b468fe0fefc7b44f2157869992991d
Author: Christian Schuett <Gau...@ho...>
Date: Sat Mar 8 20:43:21 2014 +0100
Neutrino CMenuWidget: remove an unnecessary if statement
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 6b62684..f90d6ed 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -716,17 +716,16 @@ void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_
addItem(GenericMenuSeparator);
- if (buttontype != BTN_TYPE_NO)
+ switch (buttontype)
{
- switch (buttontype)
- {
- case BTN_TYPE_BACK:
- addItem(GenericMenuBack);
- break;
- case BTN_TYPE_CANCEL:
- addItem(GenericMenuCancel);
- break;
- }
+ case BTN_TYPE_BACK:
+ addItem(GenericMenuBack);
+ break;
+ case BTN_TYPE_CANCEL:
+ addItem(GenericMenuCancel);
+ break;
+ default:
+ break;
}
if (section_text != NONEXISTANT_LOCALE)
@@ -1194,14 +1193,9 @@ void CMenuForwarder::setText(const char * const Text)
int CMenuForwarder::exec(CMenuTarget* parent)
{
- if(jumpTarget)
- {
+ if (jumpTarget)
return jumpTarget->exec(parent, actionKey);
- }
- else
- {
- return menu_return::RETURN_EXIT;
- }
+ return menu_return::RETURN_EXIT;
}
const char * CMenuForwarder::getOption(void)
@@ -1254,16 +1248,14 @@ int CMenuSeparator::getHeight(void) const
{
if (separator_text.empty() && text == NONEXISTANT_LOCALE)
return 10;
- else
- return g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
+ return g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
}
const char * CMenuSeparator::getString(void)
{
if (!separator_text.empty())
return separator_text.c_str();
- else
- return g_Locale->getText(text);
+ return g_Locale->getText(text);
}
void CMenuSeparator::setString(const std::string& s_text)
-----------------------------------------------------------------------
Summary of changes:
.../daemons/nhttpd/tuxboxapi/controlapi.cpp | 10 ++--
.../daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp | 12 ++---
tuxbox/neutrino/src/driver/lcdd.cpp | 16 +++---
tuxbox/neutrino/src/driver/lcdd.h | 18 +++---
tuxbox/neutrino/src/driver/vcrcontrol.cpp | 58 +++++---------------
tuxbox/neutrino/src/gui/audioplayer.cpp | 10 ++--
tuxbox/neutrino/src/gui/channellist.cpp | 4 +-
tuxbox/neutrino/src/gui/epgview.cpp | 43 ++++++++-------
tuxbox/neutrino/src/gui/epgview.h | 14 ++++-
tuxbox/neutrino/src/gui/infoviewer.cpp | 1 -
tuxbox/neutrino/src/gui/movieplayer.cpp | 18 +++---
tuxbox/neutrino/src/gui/movieplayer2.cpp | 10 ++--
tuxbox/neutrino/src/gui/timerlist.cpp | 1 -
tuxbox/neutrino/src/gui/widget/menue.cpp | 34 +++++-------
tuxbox/tools/input/input.c | 11 ++--
tuxbox/tools/input/input.h | 7 +--
tuxbox/tools/input/inputd.c | 2 +-
tuxbox/tools/msgbox/gfx.c | 2 +-
tuxbox/tools/msgbox/io.c | 2 +-
tuxbox/tools/msgbox/msgbox.c | 14 +++--
tuxbox/tools/msgbox/msgbox.h | 3 +-
tuxbox/tools/msgbox/text.c | 15 ++++--
tuxbox/tools/msgbox/text.h | 2 +-
tuxbox/tools/msgbox/txtform.c | 4 +-
24 files changed, 142 insertions(+), 169 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-04-06 16:36:04
|
Project "Tuxbox-GIT: cdk":
The branch, master has been updated
via 0f497fbae43b3176834ba22984e06b3b6dde193b (commit)
from ccb8308380f4620e5ff0bad120cb44f130f7ced3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f497fbae43b3176834ba22984e06b3b6dde193b
Author: GetAway <get...@t-...>
Date: Wed Mar 26 12:58:35 2014 +0100
bump version binutils-2.24.51.0.3
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/rules-archive b/rules-archive
index c68e143..9eaed9b 100644
--- a/rules-archive
+++ b/rules-archive
@@ -15,7 +15,7 @@ linux-2.6.26.8.tar.bz2;http://sources.buildroot.net
cifs-1.20c-2.4.tar.gz;http://us1.samba.org/samba/ftp/cifs-cvs
linux-2.4.34-dbox2-mtd0305.diff.bz2
autofs4-2.4-module-20050404.tar.gz;http://www.kernel.org/pub/linux/daemons/autofs/v4
-binutils-2.24.51.0.1.tar.bz2;http://www.kernel.org/pub/linux/devel/binutils/
+binutils-2.24.51.0.3.tar.gz;http://www.kernel.org/pub/linux/devel/binutils/
300-001_ld_makefile_patch.patch;http://crosstool-ng.org/hg/crosstool-ng/raw-file/c7fa97debb36/patches/binutils/2.22
300-012_check_ldrunpath_length.patch;http://crosstool-ng.org/hg/crosstool-ng/raw-file/c7fa97debb36/patches/binutils/2.22
gcc-core-3.4.6.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-3.4.6
diff --git a/rules-make b/rules-make
index 17f86b1..fd3da76 100644
--- a/rules-make
+++ b/rules-make
@@ -15,7 +15,7 @@
uboot;2012.04;u-boot-2012.04;u-boot-2012.04.tar.bz2:u-boot-2011.06.diff;extract:u-boot-2012.04.tar.bz2
linux24;2.4.37.11-dbox2;linux-2.4.37.11;linux-2.4.37.11.tar.bz2:linux-2.4-dbox2.diff:linux-2.4.34-dbox2-mtd0305.diff.bz2:linux-2.4-jffs2_lzma.diff:linux-2.4.git.diff;remove:linux;extract:linux-2.4.37.11.tar.bz2;patch:linux-2.4-dbox2.diff;patch:squashfs3.0-patch;patch:squashfs3.0_lzma-patch;patch:linux-2.4.git.diff;link:linux-2.4.37.11:linux
linux;2.6.26.8-dbox2;linux-2.6.26.8;linux-2.6.26.8.tar.bz2:squashfs3.0.tar.gz:linux-2.6.26.4-dbox2.diff:linux-2.6.25-create-console.diff:linux-2.6.25-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0_lzma.diff:linux-2.6-jffs2_lzma.diff;remove:linux;extract:linux-2.6.26.8.tar.bz2;extract:squashfs3.0.tar.gz;move:squashfs3.0/linux-2.6.15/squashfs3.0-patch:Patches/squashfs3.0_2.6-patch;remove:squashfs3.0;patch:linux-2.6.26.4-dbox2.diff;patch:linux-2.6.25-create-console.diff;patch:linux-2.6.25-squashfs3.0.diff;patch:squashfs3.0_2.6-patch;patch:linux-2.6.25.6-squashfs3.0.diff;patch:linux-2.6.25.6-squashfs3.0_lzma.diff;patch:linux-2.6.26.8-new-make.patch;link:linux-2.6.26.8:linux
-binutils;2.24.51.0.1;binutils-2.24.51.0.1;binutils-2.24.51.0.1.tar.bz2:binutils.diff;extract:binutils-2.24.51.0.1.tar.bz2;patch:binutils.diff;apatch:300-001_ld_makefile_patch.patch;apatch:300-012_check_ldrunpath_length.patch
+binutils;2.24.51.0.3;binutils-2.24.51.0.3;binutils-2.24.51.0.3.tar.gz:binutils.diff;extract:binutils-2.24.51.0.3.tar.gz;patch:binutils.diff;apatch:300-001_ld_makefile_patch.patch;apatch:300-012_check_ldrunpath_length.patch
bootstrap_gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-core.diff;extract:gcc-core-3.4.6.tar.bz2;patch:gcc-core.diff
bootstrap_gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-4.1.2-patches-1.3.tar.bz2;extract:gcc-core-4.1.2.tar.bz2
gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-g++-3.4.6.tar.bz2:gcc-core.diff:gcc-binutils.diff;extract:gcc-core-3.4.6.tar.bz2;extract:gcc-g++-3.4.6.tar.bz2;patch:gcc-core.diff;patch:gcc-binutils.diff
-----------------------------------------------------------------------
Summary of changes:
rules-archive | 2 +-
rules-make | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
Tuxbox-GIT: cdk
|
|
From: Thilo G. <tux...@ne...> - 2014-03-06 07:26:05
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 2fcfc65a1783740c2162dbd687df5cdee315e628 (commit)
from b5711dc641865e24f8381b9632e9ce92228af68f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2fcfc65a1783740c2162dbd687df5cdee315e628
Author: GetAway <get...@t-...>
Date: Wed Mar 5 20:17:44 2014 +0100
fix broken build of menue.cpp with newer compiler since introduced std::sort
use braces to avoid ambiguous 'else'
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 2e07e8d..6b62684 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -53,6 +53,7 @@
#include <neutrino.h>
#include <cctype>
+#include <algorithm>
/* the following generic menu items are integrated into multiple menus at the same time */
CMenuSeparator CGenericMenuSeparator;
@@ -184,11 +185,13 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
}
#endif
- if (selected && offx > 0)
+ if (selected && offx > 0)
+ {
if (!selected_iconName.empty())
icon_name = selected_iconName;
else if (icon_name.empty() && !CRCInput::isNumeric(directKey))
icon_name = icon_Name;
+ }
//paint icon
//get data for marker icon
-----------------------------------------------------------------------
Summary of changes:
tuxbox/neutrino/src/gui/widget/menue.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-03-04 09:43:16
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via b5711dc641865e24f8381b9632e9ce92228af68f (commit)
via 4a0d356e55e56e6cc71489b8b20fc9ccae9c3706 (commit)
via 9f6735f7cf93127d69a9f4f51e754b72c0e019ff (commit)
via 86b347fb8e205b563b64ee41da476b1899a12ecc (commit)
via 6340058662208a74f94e86228264f3a8cff6684b (commit)
via 234acc6d94e5598314864a934c9f7f4a7925b11a (commit)
via ebcd8c97ac19215a5d0cebd18fd9a92f713cf5dd (commit)
via bbeb8e5bb6fc97a758cace0adc8abac12d77ec72 (commit)
via 373e3fe36cec5e20a53afc0e81003e2f07c5fd1d (commit)
via 89ef14238214bccf4c278d92d2ed87b45ccb1d1f (commit)
via 92f81a956343d3c44921f7d267af3469fcd9a2d0 (commit)
via c1530a295d7e2e4835cb9d3d1d14aa335ff7d7e7 (commit)
via 23ed5c6affb1ca6f5f6290420a3cd843d17d56ac (commit)
from cf8cb2930a77a63080cdd0af93e711702a5526fa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b5711dc641865e24f8381b9632e9ce92228af68f
Author: Christian Schuett <Gau...@ho...>
Date: Tue Feb 25 19:49:41 2014 +0100
Neutrino LIRC documentation: make valid HTML
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/doc/ir.html b/tuxbox/neutrino/doc/ir.html
index f5b35a6..bf7c9fa 100644
--- a/tuxbox/neutrino/doc/ir.html
+++ b/tuxbox/neutrino/doc/ir.html
@@ -12,23 +12,23 @@
<br>
<B>Setup</B><BR>
-<DL>
+<UL>
<LI>Von <a href="http://www.lirc.org/remotes/" target="_blank">http://www.lirc.org/remotes/</a>
eine zur Fernbedienung passende Datei ziehen und diese als
/var/tuxbox/config/lirc/lircd.conf in die Box packen.<br>
Sollte keine zur Fernbedienung passende Datei dabei sein, kann man sie auch
selber erstellen, in dem man die Codes aufnimmt. Siehe
-<a href="http://www.lirc.org/" target="_blank">http://www.lirc.org/</a><br>
+<a href="http://www.lirc.org/" target="_blank">http://www.lirc.org/</a></LI>
<LI>Die Dateien aus record.lirc, stop.lirc, sleep.lirc, sbon.lirc, sboff.lirc,
volplus.lirc, volminus.lirc, mute.lirc in /var/tuxbox/config/lirc anlegen
(bzw. nur die Dateien für die gewüschten Funktionalitäten).
<a href="#syntax">Syntax</a> und <a href="#bedeutung">Bedeutung</a>
-siehe unten.<br>
-<LI>Box neu starten<br>
-<br>
+siehe unten.</LI>
+<LI>Box neu starten</LI>
+</UL>
Bei Fragen oder Problemen: <a HREF="https://tuxbox.org/forum/viewforum.php?f=2" target="_blank">Neutrino Forum</a> oder im #dbox2 Channel<br>
<p>
-<B><a name="syntax">Syntax der Lirc-Kommando Dateien:</B><BR>
+<B><a name="syntax"></a>Syntax der Lirc-Kommando Dateien:</B><BR>
Es können in einer Kommando-Datei beliebig viele Befehle der Form<BR>
<PRE><device> <command> (<duration>)
oder
@@ -41,7 +41,7 @@ Wenn nicht angegeben wird das Signal genau ein mal gesendet.
Werte zwischen 50ms und 500ms sind ein guter Anfang<BR>
Das <b>wait</b> Kommando erzeugt eine Pause der angegeben Zeit in ms.<BR>
<P>
-<a name="bedeutung">Folgende Neutrino-Aktionen können mit IR-Signalen
+<a name="bedeutung"></a>Folgende Neutrino-Aktionen können mit IR-Signalen
versehen werden:<br>
(ist die entsprechende Kommando-Datei vorhanden, werden die Kommandos gesendet,
existiert die Datei nicht, passiert nichts.)
commit 4a0d356e55e56e6cc71489b8b20fc9ccae9c3706
Author: Christian Schuett <Gau...@ho...>
Date: Mon Feb 24 21:04:27 2014 +0100
timerd documentation: make valid HTML
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/timerd/doku.html b/tuxbox/neutrino/daemons/timerd/doku.html
index 8f4df66..4b34af8 100644
--- a/tuxbox/neutrino/daemons/timerd/doku.html
+++ b/tuxbox/neutrino/daemons/timerd/doku.html
@@ -68,7 +68,7 @@ Existiert die Datei /var/tuxbox/config/sleep.lirc so werden die darin enthaltene
lirc-Kommandos gesendet (z.B. zum Auschalten des TV). Dazu muss lirc gestartet
und konfiguriert sein (siehe VCR Recording doku).
Syntax der sleep.lirc Datei (pro Zeile ein Kommando, es sind mehrere Kommandos möglich):
-<PRE><device_name> <ir_code> (<dauer_in_ms>)
+<pre><device_name> <ir_code> (<dauer_in_ms>)
device_name: Name der Fernsteuerung im lirc-config file
ir_code: Name der Taste im lirc-config file
dauer_in_ms: Dauer in ms (1/1000 sec), die das Signal gesendet werden soll, optional,
@@ -78,7 +78,8 @@ Bsp.: sony_tv standby 500
<br>
<b>REMINDER </b>(Erinnerung)<b>:</b><br>
Dieser Timer blendet einen frei wählbaren Hinweistext auf dem Bildschirm
-ein. Ein Zeilenvorschub kann mittels des Zeichens "/" erreicht werden.
+ein. Ein Zeilenvorschub kann mittels des Zeichens "/" erreicht werden.<br>
+<br>
<b>EXEC_PLUGIN </b>(Erinnerung)<b>:</b><br>
Mit diesem Timer ist es möglich, ein Plugin ausführen zu lassen. Im Webinterface muss z.Zt. der Name
von Hand eingegeben werden, er entspricht dem Dateinamen des Plugins ohne Erweiterung.<br>
commit 9f6735f7cf93127d69a9f4f51e754b72c0e019ff
Author: Christian Schuett <Gau...@ho...>
Date: Sat Feb 22 21:42:06 2014 +0100
nhttpd NeutrinoAPI: use AllChannelList directly in ChannelNameToChannelId()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
index 3540359..13710ca 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
@@ -186,9 +186,8 @@ t_channel_id CNeutrinoAPI::ChannelNameToChannelId(const std::string& search_chan
{
t_channel_id channel_id = (t_channel_id)-1;
CStringArray channel_names = ySplitStringVector(search_channel_name, ",");
- CZapitClient::BouquetChannelList *channellist = GetChannelList(CZapitClient::MODE_ALL);
- CZapitClient::BouquetChannelList::iterator channel = channellist->begin();
- for(; channel != channellist->end(); ++channel)
+ CZapitClient::BouquetChannelList::iterator channel = AllChannelList.begin();
+ for(; channel != AllChannelList.end(); ++channel)
{
std::string channel_name = channel->name;
for(unsigned int j=0;j<channel_names.size();j++)
commit 86b347fb8e205b563b64ee41da476b1899a12ecc
Author: Christian Schuett <Gau...@ho...>
Date: Sat Feb 22 19:42:04 2014 +0100
nhttpd NeutrinoAPI: only try to change channel if mode matches
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
index 80fc9bc..3540359 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
@@ -158,7 +158,13 @@ void CNeutrinoAPI::ZapToChannelId(t_channel_id channel_id)
//printf("Kanal ist aktuell\n");
return;
}
-
+
+ int mode = Zapit->getMode();
+ bool isTVChannel = Zapit->isChannelTVChannel(channel_id);
+ if (!isTVChannel && mode != CZapitClient::MODE_RADIO ||
+ isTVChannel && mode != CZapitClient::MODE_TV)
+ return;
+
if (Zapit->zapTo_serviceID(channel_id) != CZapitClient::ZAP_INVALID_PARAM)
Sectionsd->setServiceChanged(channel_id, false);
}
commit 6340058662208a74f94e86228264f3a8cff6684b
Author: Christian Schuett <Gau...@ho...>
Date: Sat Feb 22 15:08:46 2014 +0100
nhttpd NeutrinoAPI: return first found channel when converting name to ID
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
index 5c3c746..80fc9bc 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
@@ -195,6 +195,8 @@ t_channel_id CNeutrinoAPI::ChannelNameToChannelId(const std::string& search_chan
break;
}
}
+ if(channel_id != (t_channel_id)-1)
+ break;
}
return channel_id;
}
commit 234acc6d94e5598314864a934c9f7f4a7925b11a
Author: Christian Schuett <Gau...@ho...>
Date: Fri Feb 21 22:42:28 2014 +0100
nhttpd documentation: correct services.xml and bouquets.xml examples
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 648f905..62cdf55 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -786,7 +786,6 @@ Beispiel:<br>
>>>http://dbox/control/zapto?16dcb<br>
ok <br>
</div>
-
<b>Parameter:</b> channel_name oder channel_names (Ein oder mehrere durch Komma
getrente Sendernamen; URI encoded)<br>
<b>Rueckgabe:</b><br>
@@ -840,7 +839,6 @@ Beispiel:<br>
>>>http://dbox/control/setmode?tv<br>
ok<br>
</div>
-
<br>
<b>Parameter:</b> record<br>
<b>Rückgabe:</b><br>
@@ -1026,11 +1024,11 @@ Beispiel:<br>
<br>
>>>http://dbox/control/getservicesxml<br>
<br>
-<?xml version="1.0" encoding="iso-8859-1"?><br>
+<?xml version="1.0" encoding="UTF-8"?><br>
<zapit><br>
- <cable><br>
- <transponder transportID="00001" networkID="0"><br>
- <cable frequency="04020" symbolRate="06900" fec="0" polarity="0"/><br>
+ <cable name="provider"><br>
+ <transponder id="0437" onid="0001" frequency="450000000" inversion="2" symbol_rate="6900000" fec_inner="0" modulation="5"><br>
+ <channel service_id="6d67" name="3sat" service_type="01"/><br>
...<br>
</div>
@@ -1048,10 +1046,10 @@ Beispiel:<br>
<br>
>>>http://dbox/control/getbouquetsxml<br>
<br>
-<?xml version="1.0" encoding="iso-8859-1"?><br>
+<?xml version="1.0" encoding="UTF-8"?><br>
<zapit><br>
- <Bouquet name="beispielbouquet" hidden="0" locked="0"><br>
- <channel serviceID="6d67" name="3sat" onid="0001"/><br>
+ <Bouquet type="0" bouquet_id="0000" name="beispielbouquet" hidden="0" locked="0"><br>
+ <channel serviceID="6d67" name="3sat" tsid="0437" onid="0001"/><br>
...<br>
</div>
@@ -2092,7 +2090,7 @@ Es wird f
Beispiel:<br>
<br>
>>>http://dbox/control/build_live_url<br>
-http://192.168.0.15:31339/0,0x0069,0x03ff,0x0400<br>
+http://dbox:31339/0,0x0069,0x03ff,0x0400<br>
</div>
<br>
commit ebcd8c97ac19215a5d0cebd18fd9a92f713cf5dd
Author: Christian Schuett <Gau...@ho...>
Date: Fri Feb 21 19:38:34 2014 +0100
nhttpd documentation: reformat XML examples
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index d1efd36..648f905 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -363,38 +363,38 @@ stoptime f
werden.<br>
<div class="example">
Beispiel:<br>
+<br>
>>>http://dbox/control/epg?xml=true&channelid=44d00016dca&details=true&max=2<br>
+<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
<epglist><br>
<channel_id>44d00016dca</channel_id><br>
<channel_name><![CDATA[Das Erste]]></channel_name><br>
<prog><br>
-<eventid>309903955495411052</eventid><br>
-<eventid_hex>44d00016dcadd6c</eventid_hex><br>
-<start_sec>1148314800</start_sec><br>
-<start_t>18:20</start_t><br>
-<date>02.10.2006</date><br>
-<stop_sec>1148316600</stop_sec><br>
-<stop_t>18:50</stop_t><br>
-<duration_min>30</duration_min><br>
-<description><![CDATA[Marienhof]]></description><br>
-<info1><![CDATA[(Folge 2868)]]></info1><br>
-<info2><![CDATA[Sülo verachtet Constanze wegen ihrer Intrige. Luigi plündert das
+ <eventid>309903955495411052</eventid><br>
+ <eventid_hex>44d00016dcadd6c</eventid_hex><br>
+ <start_sec>1148314800</start_sec><br>
+ <start_t>18:20</start_t><br>
+ <date>02.10.2006</date><br>
+ <stop_sec>1148316600</stop_sec><br>
+ <stop_t>18:50</stop_t><br>
+ <duration_min>30</duration_min><br>
+ <description><![CDATA[Marienhof]]></description><br>
+ <info1><![CDATA[(Folge 2868)]]></info1><br>
+ <info2><![CDATA[Sülo verachtet Constanze wegen ihrer Intrige. Luigi plündert das
Konto und haut ab. Jessy will Carlos über ihre Chats aufklären.]]></info2><br>
</prog><br>
<prog><br>
-<br>
-<eventid>309903955495411054</eventid><br>
-<eventid_hex>44d00016dcadd6e</eventid_hex><br>
-<start_sec>1148316600</start_sec><br>
-<start_t>18:50</start_t><br>
-<stop_sec>1148320200</stop_sec><br>
-<stop_t>19:50</stop_t><br>
-<br>
-<duration_min>60</duration_min><br>
-<description><![CDATA[Großstadtrevier]]></description><br>
-<info1><![CDATA[239. Fenstergespenster]]></info1><br>
-<info2><![CDATA[Pech für Dirk Matthies: Da steigt er auf eine Leiter, weil ihn
+ <eventid>309903955495411054</eventid><br>
+ <eventid_hex>44d00016dcadd6e</eventid_hex><br>
+ <start_sec>1148316600</start_sec><br>
+ <start_t>18:50</start_t><br>
+ <stop_sec>1148320200</stop_sec><br>
+ <stop_t>19:50</stop_t><br>
+ <duration_min>60</duration_min><br>
+ <description><![CDATA[Großstadtrevier]]></description><br>
+ <info1><![CDATA[239. Fenstergespenster]]></info1><br>
+ <info2><![CDATA[Pech für Dirk Matthies: Da steigt er auf eine Leiter, weil ihn
mal der Putzfimmel überkommt, und - knacks! - bricht eine Sprosse. Das Bein ist
gebrochen, mehrere Rippen geprellt. Katja Metz versorgt ihn mit dem
Nötigsten.]]></info2><br>
@@ -1025,11 +1025,12 @@ zur
Beispiel:<br>
<br>
>>>http://dbox/control/getservicesxml<br>
+<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
-<ZAPIT><br>
-<cable><br>
-<transponder transportID="00001" networkID="0"><br>
-<cable frequency="04020" symbolRate="06900" fec="0" polarity="0"/><br>
+<zapit><br>
+ <cable><br>
+ <transponder transportID="00001" networkID="0"><br>
+ <cable frequency="04020" symbolRate="06900" fec="0" polarity="0"/><br>
...<br>
</div>
@@ -1048,9 +1049,9 @@ Beispiel:<br>
>>>http://dbox/control/getbouquetsxml<br>
<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
-<ZAPIT><br>
-<Bouquet name="beispielbouquet" hidden="0" locked="0"><br>
-<channel serviceID="6d67" name="3sat" onid="0001"/><br>
+<zapit><br>
+ <Bouquet name="beispielbouquet" hidden="0" locked="0"><br>
+ <channel serviceID="6d67" name="3sat" onid="0001"/><br>
...<br>
</div>
@@ -1086,6 +1087,7 @@ Sender als erstes enth
Nummer_des_Kanals channel_id Name_des_Senders<br>
<div class="example">
Beispiel:<br>
+<br>
>>>http://dbox/control/getbouquet?bouquet=2&mode=TV<br>
20 12ee3 RTL Television<br>
21 85002e SAT.1<br>
@@ -1093,23 +1095,25 @@ Beispiel:<br>
23 12ef4 RTL2<br>
24 12f1c VOX<br>
<br>
+<br>
Wird xml=1 angegeben, dann wird die Liste im XML-Format zurückgegeben:<br>
-Beispiel:<br>
+<br>
>>>http://dbox/control/getbouquet?bouquet=3&xml=true<br>
+<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
<bouquetlist><br>
<bouquet><br>
-<bnumber>3</bnumber><br>
+ <bnumber>3</bnumber><br>
</bouquet><br>
<channel><br>
-<number>33</number><br>
-<id>44d00016dca</id><br>
-<name><![CDATA[Das Erste]]></name><br>
+ <number>33</number><br>
+ <id>44d00016dca</id><br>
+ <name><![CDATA[Das Erste]]></name><br>
</channel><br>
<channel><br>
-<number>34</number><br>
-<id>44d00016dcd</id><br>
-<name><![CDATA[arte]]></name><br>
+ <number>34</number><br>
+ <id>44d00016dcd</id><br>
+ <name><![CDATA[arte]]></name><br>
</channel><br>
</bouquetlist><br>
</div>
@@ -1556,6 +1560,7 @@ Beispiel:<br>
<br>
>>>http://dbox/control/timer?action=new&alarm=1034309576&stop=1034284376&announce=1034309576&type=1&rep=1&channel_id=16dcb<br>
ok<br>
+<br>
>>>http://dbox/control/timer?action=new&alDate=24.01.2006&alTime=20.00&stTime=20.15&channel_name=Das%20Erste&update=1<br>
ok<br>
</div>
@@ -1696,6 +1701,7 @@ http://dbox/cgi-bin/exec?buli<br>
1 = Iec aktiviert<br>
<div class="example">
Beispiel:<br>
+<br>
http://dbox/control/system?getAViAExtIec<br>
1<br>
</div>
commit bbeb8e5bb6fc97a758cace0adc8abac12d77ec72
Author: Christian Schuett <Gau...@ho...>
Date: Fri Feb 21 18:27:34 2014 +0100
nhttpd documentation: add information how to get timers in XML format
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 31430d5..d1efd36 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -1278,6 +1278,215 @@ d.h. event 1, SHUTDOWN, DAILY, nach 4 Timerausf
Timer gelöscht, announcezeit, alarm/startzeit, stopzeit,<br>
kanal/daten die zeiten sind time_t (Unix Zeitstempel)<br>
</div>
+<b>Parameter:</b> [format=xml]<br>
+<b>Rückgabe:</b><br>
+<br>
+Zeigt die Liste aller Timer im XML-Format<br>
+<div class="example">
+Beispiel:<br>
+<br>
+>>>http://dbox/control/timer?format=xml<br>
+<br>
+<?xml version="1.0" encoding="iso-8859-1"?><br>
+<timer><br>
+ <config><br>
+ <pre_delay>0</pre_delay><br>
+ <post_delay>0</post_delay><br>
+ </config><br>
+ <timer_list><br>
+ <timer><br>
+ <type>Aufnahme</type><br>
+ <id>27</id><br>
+ <state>0</state><br>
+ <type_number>5</type_number><br>
+ <alarm><br>
+ <normal><br>
+ <text>21.02.2014 20:10</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:10</time><br>
+ <digits>1393009800</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>10</min><br>
+ </normal><br>
+ <safety><br>
+ <text>21.02.2014 20:10</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:10</time><br>
+ <digits>1393009800</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>10</min><br>
+ </safety><br>
+ </alarm><br>
+ <announce><br>
+ <normal><br>
+ <text>21.02.2014 20:07</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:07</time><br>
+ <digits>1393009620</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>7</min><br>
+ </normal><br>
+ <safety><br>
+ <text>21.02.2014 20:07</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:07</time><br>
+ <digits>1393009620</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>7</min><br>
+ </safety><br>
+ </announce><br>
+ <stop><br>
+ <normal><br>
+ <text>21.02.2014 20:15</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:15</time><br>
+ <digits>1393010100</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>15</min><br>
+ </normal><br>
+ <safety><br>
+ <text>21.02.2014 20:15</text><br>
+ <date>21.02.2014</date><br>
+ <time>20:15</time><br>
+ <digits>1393010100</digits><br>
+ <day>21</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>15</min><br>
+ </safety><br>
+ </stop><br>
+ <repeat><br>
+ <count>&#x221E;</count><br>
+ <number>16128</number><br>
+ <text>Mo Di Mi Do Fr </text><br>
+ <weekdays>XXXXX--</weekdays><br>
+ </repeat><br>
+ <channel_id>20085000a</channel_id><br>
+ <channel_name><![CDATA[Sky Cinema]]></channel_name><br>
+ <title><![CDATA[Zapping]]></title><br>
+ <audio><br>
+ <apids_conf>true</apids_conf><br>
+ <apids_std>false</apids_std><br>
+ <apids_alt>false</apids_alt><br>
+ <apids_ac3>false</apids_ac3><br>
+ </audio><br>
+ <recording_dir>/mnt/filme</recording_dir><br>
+ <epg_id>684279</epg_id><br>
+ </timer><br>
+ <timer><br>
+ <type>Aufnahme</type><br>
+ <id>28</id><br>
+ <state>0</state><br>
+ <type_number>5</type_number><br>
+ <alarm><br>
+ <normal><br>
+ <text>22.02.2014 20:10</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:10</time><br>
+ <digits>1393096200</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>10</min><br>
+ </normal><br>
+ <safety><br>
+ <text>22.02.2014 20:10</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:10</time><br>
+ <digits>1393096200</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>10</min><br>
+ </safety><br>
+ </alarm><br>
+ <announce><br>
+ <normal><br>
+ <text>22.02.2014 20:07</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:07</time><br>
+ <digits>1393096020</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>7</min><br>
+ </normal><br>
+ <safety><br>
+ <text>22.02.2014 20:07</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:07</time><br>
+ <digits>1393096020</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>7</min><br>
+ </safety><br>
+ </announce><br>
+ <stop><br>
+ <normal><br>
+ <text>22.02.2014 20:15</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:15</time><br>
+ <digits>1393096500</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>15</min><br>
+ </normal><br>
+ <safety><br>
+ <text>22.02.2014 20:15</text><br>
+ <date>22.02.2014</date><br>
+ <time>20:15</time><br>
+ <digits>1393096500</digits><br>
+ <day>22</day><br>
+ <month>2</month><br>
+ <year>2014</year><br>
+ <hour>20</hour><br>
+ <min>15</min><br>
+ </safety><br>
+ </stop><br>
+ <repeat><br>
+ <count>&#x221E;</count><br>
+ <number>2</number><br>
+ <text>w&#xF6;chentlich</text><br>
+ <weekdays>-------</weekdays><br>
+ </repeat><br>
+ <channel_id>20085000a</channel_id><br>
+ <channel_name><![CDATA[Sky Cinema]]></channel_name><br>
+ <title><![CDATA[Zapping der Woche]]></title><br>
+ <audio><br>
+ <apids_conf>true</apids_conf><br>
+ <apids_std>false</apids_std><br>
+ <apids_alt>false</apids_alt><br>
+ <apids_ac3>false</apids_ac3><br>
+ </audio><br>
+ <recording_dir>/mnt/filme</recording_dir><br>
+ <epg_id>684294</epg_id><br>
+ </timer><br>
+ </timer_list><br>
+</timer><br>
+</div>
<b>Parameter:</b> get=pre | post<br>
<b>Rückgabe:</b> <br>
<br>
@@ -1286,7 +1495,7 @@ aus.<p><b>Rueckgabe-Format:</b> Sekunden</p>
<div class="example">
Beispiel:<br>
<br>
->>>http://dbox/control/timer&get=pre<br>
+>>>http://dbox/control/timer?get=pre<br>
120<br>
</div>
<p><b>Parameter:</b><br>
commit 373e3fe36cec5e20a53afc0e81003e2f07c5fd1d
Author: Christian Schuett <Gau...@ho...>
Date: Thu Feb 20 20:35:04 2014 +0100
nhttpd documentation: make valid HTML
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/index.html b/tuxbox/neutrino/daemons/nhttpd/doc/index.html
index 32c6a92..4929882 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/index.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/index.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" type="text/css" href="yhttpd.css"/>
+<link rel="STYLESHEET" type="text/css" href="yhttpd.css">
<title>Neutrino Webserver</title>
</head>
<body>
@@ -10,13 +10,12 @@
<h2>Documentation</h2>
<ul>
<li><a href="nhttpd_controlapi.html">ControlAPI Documentation</a></li>
-<li>Software architecture</li>
+<li>Software architecture
<ul>
<li><a href="nhttpd_implementation.html">Neutrino Implementation</a></li>
<li><a href="yhttpd_documentation.html">yhttpd Base-Webserver</a></li>
</ul>
+</li>
</ul>
-
-
</body>
</html>
\ No newline at end of file
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 94eeb44..31430d5 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" type="text/css" href="yhttpd.css"/>
+<link rel="STYLESHEET" type="text/css" href="yhttpd.css">
<title>ControlAPI</title>
</head>
<body>
@@ -10,7 +10,7 @@
<h1>control-API Dokumentation</h1><hr>
<br>
-<b>API-Aufrufe</b><table border="0">
+<b>API-Aufrufe</b><table border="0" summary="API-Aufrufe">
<tr>
<td>1. <a href="#channellist">Die Kanalliste </a> </td>
<td><a href="http://dbox/control/channellist">http://dbox/control/channellist</a></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td>8. <a href="#getmode">Radio/TV Mode Abfrage</a></td>
- <td>http://dbox/control/getmode</td>
+ <td><a href="http://dbox/control/getmode">http://dbox/control/getmode</a></td>
</tr>
<tr>
<td>9. <a href="#getdate">Datum von der Box abfragen</a></td>
@@ -204,9 +204,9 @@
<td> </td>
</tr>
</table>
-<p>
+<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="channellist"></a>1. Die Kanalliste</div>
<div class="URL">Handler: http://dbox/control/channellist</div>
<br>
@@ -232,8 +232,8 @@ Beispiel:<br>
16d66 ZDF<br>
</div>
-<!-- ----------------------------------------------------------- -->
-<div class="title1">2. <a name="epg"></a>EPG-Abfrage</div>
+<!-- *********************************************************** -->
+<div class="title1"><a name="epg"></a>2. EPG-Abfrage</div>
<div class="URL">Handler: http://dbox/control/epg</div>
<br>
<b>Parameter:</b> keine<br>
@@ -363,7 +363,7 @@ stoptime f
werden.<br>
<div class="example">
Beispiel:<br>
->>>http://192.168.0.15/control/epg?xml=true&channelid=44d00016dca&details=true&max=2<br>
+>>>http://dbox/control/epg?xml=true&channelid=44d00016dca&details=true&max=2<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
<epglist><br>
<channel_id>44d00016dca</channel_id><br>
@@ -473,7 +473,7 @@ Zapping<br>
</neutrino><br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="shutdown"></a>3. Die DBox herunterfahren</div>
<div class="URL">Handler: http://dbox/control/shutdown</div>
<br>
@@ -491,7 +491,7 @@ Beispiel:<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="standby"></a>4. Standby Mode</div>
<div class="URL">Handler: http://dbox/control/standby</div>
<br>
@@ -532,9 +532,8 @@ Beispiel:<br>
>>>http://dbox/control/standby<br>
on<br>
</div>
-<p>
-<!-- ----------------------------------------------------------- -->
-</p>
+
+<!-- *********************************************************** -->
<div class="title1"><a name="volume"></a>5. Lautstärke-Steuerung</div>
<div class="URL">Handler: http://dbox/control/volume</div>
<br>
@@ -609,7 +608,8 @@ Beispiel:<br>
>>>http://dbox/control/volume?status<br>
1<br>
</div>
-<!-- ----------------------------------------------------------- -->
+
+<!-- *********************************************************** -->
<div class="title1"><a name="zapto"></a>6. Programm umschalten</div>
<div class="URL">Handler: http://dbox/control/zapto</div>
<br>
@@ -802,8 +802,7 @@ Beispiel:<br>
ok <br>
</div>
-
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="setmode"></a>7. Radio/TV, Record Mode</div>
<div class="URL">Handler: http://dbox/control/setmode</div>
<br>
@@ -864,7 +863,7 @@ ok<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getmode"></a>8. Radio/TV Mode Abfrage</div>
<div class="URL">Handler: http://dbox/control/getmode</div>
<br>
@@ -879,7 +878,7 @@ Beispiel:<br>
tv<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getdate"></a>9. Datum von der Box abfragen</div>
<div class="URL">Handler: http://dbox/control/getdate</div>
<br>
@@ -896,7 +895,7 @@ Beispiel:<br>
11.01.2002<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="gettime"></a>10. Zeit von der Box abfragen</div>
<div class="URL">Handler: http://dbox/control/gettime</div>
<br>
@@ -925,7 +924,7 @@ Beispiel:<br>
1046804654<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="info"></a>11. Allgemeine Informationen abfragen</div>
<div class="URL">Handler: http://dbox/control/info</div>
<br>
@@ -992,7 +991,7 @@ Beispiel:<br>
2.2.1<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getonidsid"></a>12. Aktuellen Kanal abfragen</div>
<div class="URL">Handler: http://dbox/control/getonidsid</div>
<br>
@@ -1013,7 +1012,7 @@ Beispiel:<br>
44d00016dca<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getservicesxml"></a>13. services.xml lesen</div>
<div class="URL">Handler: http://dbox/control/getservicesxml</div>
<br>
@@ -1034,7 +1033,7 @@ Beispiel:<br>
...<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getbouquetsxml"></a>14. bouquets.xml auslesen</div>
<div class="URL">Handler: http://dbox/control/getbouquetsxml</div>
<br>
@@ -1055,7 +1054,7 @@ Beispiel:<br>
...<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getbouquets"></a>15. Bouquetlist abfragen</div>
<div class="URL">Handler: http://dbox/control/getbouquets</div>
<br>
@@ -1073,7 +1072,7 @@ Beispiel:<br>
5 ZDFvision<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="getbouquet"></a>16. Bouquet abfragen</div>
<div class="URL">Handler: http://dbox/control/getbouquet</div>
<br>
@@ -1096,7 +1095,7 @@ Beispiel:<br>
<br>
Wird xml=1 angegeben, dann wird die Liste im XML-Format zurückgegeben:<br>
Beispiel:<br>
->>>http://192.168.0.15/control/getbouquet?bouquet=3&xml=true<br>
+>>>http://dbox/control/getbouquet?bouquet=3&xml=true<br>
<?xml version="1.0" encoding="iso-8859-1"?><br>
<bouquetlist><br>
<bouquet><br>
@@ -1115,7 +1114,7 @@ Beispiel:<br>
</bouquetlist><br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="message"></a>17. Open popup window</div>
<div class="URL">Handler: http://dbox/control/message</div>
<br>
@@ -1157,7 +1156,7 @@ UTF-8 help sponsored by google:<br>
http://www.google.com/search?q=%C3%A4%20%C3%B6%20%C3%BC%20%C3%84%20%C3%96%20%C3%9C%20%C3%9F&ie=UTF-8&oe=UTF-8<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1">17. Popup-Fenster oeffnen</div>
<div class="URL">Handler: http://dbox/control/message</div>
<br>
@@ -1181,7 +1180,7 @@ Beispiele:<br>
öffnet ein Message-Fenster auf dem Fernseher, in dem "Hallo Welt" steht<br>
</div>
KDE Konqueror Benutzer koennen folgendes Verfahren benutzen:<br>
-------------------------------------------------------------<br>
+***********************************************************-<br>
Mit Hilfe von "Settings -> Web Shortcuts -> Add" einen neuen Search<br>
Provider hinzufuegen. z.B.:<br>
- Search Provider Name: DBox Popup<br>
@@ -1199,8 +1198,7 @@ Google's UTF-8 Tutorial:<br>
http://www.google.com/search?q=%C3%A4%20%C3%B6%20%C3%BC%20%C3%84%20%C3%96%20%C3%9C%20%C3%9F&ie=UTF-8&oe=UTF-8<br>
<br>
-
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="timer"></a>18. Timerd Interface</div>
<div class="URL">Handler: http://dbox/control/timer</div>
<br>
@@ -1225,7 +1223,7 @@ eventID eventType eventRepeat repcount announceTime alarmTime stopTime data<br>
8 = EXEC_PLUGIN<br>
<br>
siehe dazu auch:<br>
-<a href="http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/apps/tuxbox/neutrino/daemons/timerd/doku.html?rev=1.3&content-type=text/plain">http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/apps/tuxbox/neutrino/daemons/timerd/doku.html?rev=1.3&content-type=text/plain</a><br>
+<a href="http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/apps/tuxbox/neutrino/daemons/timerd/doku.html?rev=1.3&content-type=text/plain">http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/apps/tuxbox/neutrino/daemons/timerd/doku.html?rev=1.3&content-type=text/plain</a><br>
<br>
<i>eventRepeat</i> ist die Angabe der timerwiderholung, die kann sein:<br>
<br>
@@ -1353,7 +1351,7 @@ ok<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="lcd"></a>19. LCD Interface</div>
<div class="URL">Handler: http://dbox/control/lcd</div>
<br>
@@ -1461,9 +1459,9 @@ wget -O /tmp/nhttpd.res 'http://localhost/control/lcd?lock=0'<br>
ausgeführt werden.<br>
</div>
-<!-- ----------------------------------------------------------- -->
-<div class="URL"><div class="title1"><a name="exec"></a>20. Shellscript ausführen</div>
-Handler: http://dbox/cgi-bin/exec</div>
+<!-- *********************************************************** -->
+<div class="title1"><a name="exec"></a>20. Shellscript ausführen</div>
+<div class="URL">Handler: http://dbox/cgi-bin/exec</div>
<br>
<b>Parameter:</b> <Scriptname> (ohne .sh!)<br>
<b>Rückgabe: </b>Ausgabe des Scripts<br>
@@ -1478,7 +1476,7 @@ wird. In newsticker.list muss dann der Aufruf folgendermassen aussehen:<br>
http://dbox/cgi-bin/exec?buli<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="system"></a>21. System-/Treiberfunktionen</div>
<div class="URL">Handler: http://dbox/control/system</div>
<br>
@@ -1544,7 +1542,7 @@ http://dbox/control/system?setAViAExtPlayBack=spts<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="rc"></a>21. Fernbedienung</div>
<div class="URL">Handler: http://dbox/control/rc</div>
<br>
@@ -1569,7 +1567,7 @@ http://dbox/control/rc?unlock<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="reboot"></a>23. Die DBox neu starten</div>
<div class="URL">Handler: http://dbox/control/reboot</div>
<br>
@@ -1588,7 +1586,7 @@ Beispiel:<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="settings"></a>24. Einige Einstellungen lesen</div>
<div class="URL">Handler: http://dbox/control/settings</div>
<br>
@@ -1597,7 +1595,7 @@ ok<br>
Videooutputs und Videoformats.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="version"></a>25. Die /.versions-File lesen</div>
<div class="URL">Handler: http://dbox/control/version</div>
<br>
@@ -1607,7 +1605,7 @@ Videooutputs und Videoformats.<br>
Die gleiche Funktionalität bietet http://dbox/control/info?version.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="startplugin"></a>26. Plugin ausführen</div>
<div class="URL">Handler: http://dbox/control/startplugin</div>
<br>
@@ -1622,7 +1620,7 @@ Beispiel:<br>
ok<br>
</div>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="yweb"></a>27. Support für yweb</div>
<div class="URL">Handler: http://dbox/control/yweb</div>
<br>
@@ -1633,7 +1631,7 @@ Supportfunktionen f
ausserhalb von yweb zu benutzen.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="aspectratio"></a>28. Aspektratio lesen</div>
<div class="URL">Handler: http://dbox/control/aspectratio</div>
<br>
@@ -1641,7 +1639,7 @@ ausserhalb von yweb zu benutzen.<br>
<b>Rückgabe:</b> 4:3/16:9<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="videoformat"></a>29. Videoformat lesen/setzen</div>
<div class="URL">Handler: http://dbox/control/videoformat</div>
<br>
@@ -1654,7 +1652,7 @@ ausserhalb von yweb zu benutzen.<br>
Setzt aktuelles Videoformat.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="videooutput"></a>30. Videooutput lesen/setzen</div>
<div class="URL">Handler: http://dbox/control/videooutput</div>
<br>
@@ -1667,9 +1665,9 @@ Setzt aktuelles Videoformat.<br>
Setzt Videooutputtyp. <br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="vcroutput"></a>31. VCR-output lesen/setzen</div>
-vHandler: http://dbox/control/vcroutput</div>
+<div class="URL">Handler: http://dbox/control/vcroutput</div>
<br>
<b>Parameter:</b> keine/status<br>
<b>Rückgabe:</b> CVBS/S-Video<br>
@@ -1681,7 +1679,7 @@ Setzt VCRoutputtyp. S-Video ist m
und S-Video.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="scartmode"></a>32. Scartmode lesen/setzen</div>
<div class="URL">Handler: http://dbox/control/scartmode</div>
<br>
@@ -1694,7 +1692,7 @@ und S-Video.<br>
Schaltet Scartmode ein oder aus.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="rcem"></a>33. Fernbedienungstasten emulieren</div>
<div class="URL">Handler: http://dbox/control/rcem</div>
<br>
@@ -1726,7 +1724,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="setbouquet"></a>34. Bouquet-Editor: Attribute setzen</div>
<div class="URL">Handler: http://dbox/control/setbouquet</div>
<br>
@@ -1745,7 +1743,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="savebouquet"></a>35. Bouquet-Editor: Bouquet-Liste
speichern</div>
<div class="URL">Handler: http://dbox/control/savebouquet</div>
@@ -1760,7 +1758,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="movebouquet"></a>36. Bouquet-Editor: Bouquet verschieben</div>
<div class="URL">Handler: http://dbox/control/movebouquet</div>
<br>
@@ -1779,7 +1777,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="deletebouquet"></a>37. Bouquet-Editor: Bouquet löschen</div>
<div class="URL">Handler: http://dbox/control/deletebouquet</div>
<br>
@@ -1796,12 +1794,9 @@ Beispiel:<br>
>>>http://dbox/control/deletebouquet?selected=2<br>
ok<br>
</div>
- </p>
-
-
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="addbouquet"></a>38. Bouquet-Editor: Bouquet hinzufügen</div>
<div class="URL">Handler: http://dbox/control/addbouquet</div>
<br>
@@ -1817,11 +1812,9 @@ Beispiel:<br>
>>>http://dbox/control/addbouquet?name=neuer%20sender<br>
ok<br>
</div>
-
-
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="renamebouquet"></a>39. Bouquet-Editor: Bouquet umbenennen</div>
<div class="URL">Handler: http://dbox/control/renamebouquet</div>
<br>
@@ -1839,7 +1832,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="changebouquet"></a>40. Bouquet-Editor: Bouquet Channels
ändern</div>
<div class="URL">Handler: http://dbox/control/changebouquet</div>
@@ -1860,7 +1853,7 @@ ok<br>
</div>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="updatebouquet"></a>41. Bouquet-Editor: Bouquet Channels
aktualisieren</div>
<div class="URL">Handler: http://dbox/control/updatebouquet</div>
@@ -1868,15 +1861,15 @@ ok<br>
<b>Parameter:</b><br>
<b>Rückgabe</b>: ok<br>
<br>
- </div>
+Aktualisiert Bouquet Channels.<br>
<br>
-<!-- ----------------------------------------------------------- -->
+<!-- *********************************************************** -->
<div class="title1"><a name="build_live_url"></a>42. URL für Live-Streaming (VLC) erstellen
ändern</div>
<div class="URL">Handler: http://dbox/control/build_live_url</div>
<br>
-<b>Parameter:</b> [audio_no=<audio-track>][&host=<dbox-ip>][&vlc_link=true]<br>
+<b>Parameter:</b> [audio_no=<audio-track>][&host=<dbox-ip>][&vlc_link=true]<br>
<b>Rückgabe</b>: live-URL oder redirection Link auf vlc.m3u-Datei<br>
<br>
Es wird für den aktuellen Sender eine Live-URL erzeugt. Sie dient für den Streaming-Aufruf von VLC. <br>
@@ -1889,6 +1882,5 @@ http://192.168.0.15:31339/0,0x0069,0x03ff,0x0400<br>
<br>
-
</body>
</html>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_implementation.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_implementation.html
index 5d64c51..7969d41 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_implementation.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_implementation.html
@@ -2,18 +2,18 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" type="text/css" href="yhttpd.css"/>
+<link rel="STYLESHEET" type="text/css" href="yhttpd.css">
<title>Implementation of Neutrino-Webserver (nhttpd)</title>
</head>
<body>
<h1>Implementation of Neutrino-Webserver (nhttpd)</h1>
<h2>Neutrino Classes</h2>
-<img class="picture" src="design/nhttpdNeutrinoAPI.gif"/>
-<br/>
+<img class="picture" src="design/nhttpdNeutrinoAPI.gif" alt="Class aggragation and composition by NeutrinoAPI">
+<br>
[Class aggragation and composition by NeutrinoAPI]
<h2>Relations to yhttpd</h2>
-<img class="picture" src="design/nhttpd.gif"/>
-<br/>
+<img class="picture" src="design/nhttpd.gif" alt="Relations to yhttpd and Overview of Hook-Methods">
+<br>
[Relations to yhttpd and Overview of Hook-Methods]
</body>
</html>
\ No newline at end of file
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/yhttpd_documentation.html b/tuxbox/neutrino/daemons/nhttpd/doc/yhttpd_documentation.html
index 9848166..491fe3a 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/yhttpd_documentation.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/yhttpd_documentation.html
@@ -2,14 +2,14 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" type="text/css" href="yhttpd.css"/>
+<link rel="STYLESHEET" type="text/css" href="yhttpd.css">
<title>Implementation of yhttpd-Webserver (yhttpd)</title>
</head>
<body>
<h1>Implementation of yhttpd-Webserver (yhttpd)</h1>
<h2>Classes</h2>
-<img class="picture" src="design/Webserver.gif"/>
-<br/>
+<img class="picture" src="design/Webserver.gif" alt="Main Classes of yhttpd-Webserver">
+<br>
[Main Classes of yhttpd-Webserver]
</body>
</html>
\ No newline at end of file
commit 89ef14238214bccf4c278d92d2ed87b45ccb1d1f
Author: Christian Schuett <Gau...@ho...>
Date: Thu Feb ...
[truncated message content] |
|
From: Thilo G. <tux...@ne...> - 2014-02-10 18:57:12
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via cf8cb2930a77a63080cdd0af93e711702a5526fa (commit)
from 62e610549182843a26c04ed04e5fd6b9cbd807f6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cf8cb2930a77a63080cdd0af93e711702a5526fa
Author: Christian Schuett <Gau...@ho...>
Date: Mon Feb 10 19:43:58 2014 +0100
Neutrino plugin list: only show full window if necessary
just to be conform with bookmark and timer list
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
index 51bb9bf..002a001 100644
--- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
+++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
@@ -240,12 +240,11 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent)
height = h_max(576, 50);
listmaxshow = (height-theight-footHeight-0)/(fheight*2);
- height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
if(bookmarks.size() < listmaxshow)
{
listmaxshow=bookmarks.size();
- height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
}
+ height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
if (!bookmarks.empty() && selected==bookmarks.size())
{
selected=bookmarks.size()-1;
diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp
index f1d4818..d17d7a1 100644
--- a/tuxbox/neutrino/src/gui/pluginlist.cpp
+++ b/tuxbox/neutrino/src/gui/pluginlist.cpp
@@ -289,6 +289,8 @@ void CPluginList::paint()
fheight = fheight1 + fheight2 + 2;
//
listmaxshow = (height-theight-0)/fheight;
+ if (pluginlist.size() < listmaxshow)
+ listmaxshow = pluginlist.size();
height = theight+0+listmaxshow*fheight; // recalc height
sb_width = (pluginlist.size() > listmaxshow) ? 15 : 0;
x = getScreenStartX(width + sb_width);
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 7e2d2e5..d567998 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -401,12 +401,11 @@ void CTimerList::updateEvents(void)
width = w_max(600, 50);
height = h_max(576, 50);
listmaxshow = (height-theight-footHeight-0)/(fheight*2);
- height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
if(timerlist.size() < listmaxshow)
{
listmaxshow=timerlist.size();
- height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
}
+ height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height
if (!timerlist.empty() && selected >= timerlist.size())
{
selected=timerlist.size()-1;
-----------------------------------------------------------------------
Summary of changes:
tuxbox/neutrino/src/gui/bookmarkmanager.cpp | 3 +--
tuxbox/neutrino/src/gui/pluginlist.cpp | 2 ++
tuxbox/neutrino/src/gui/timerlist.cpp | 3 +--
3 files changed, 4 insertions(+), 4 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-02-10 18:09:14
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 62e610549182843a26c04ed04e5fd6b9cbd807f6 (commit)
via 84b24096d52cd105cdc2b8206675dc36acdff91f (commit)
via 1de4361b414701cca1115a97209cde79e28a1e7e (commit)
via c38c2baf0a7a599b0f3954ac422c8b1c54d69b27 (commit)
via 108db7191980288ae0913f74ac6a631099e8e4aa (commit)
via 02b79fbde6123b2c91c54e3064959766e2b0b418 (commit)
via 689aa7ef274825fe3172b39698c18a5bae0dc754 (commit)
via d1b8bc02894a76f0445e493b2d2c557f95984d39 (commit)
via da04fabe85065c3d88c4bae3b73fa2710991a8d8 (commit)
via 45971173f59debd02fcac74107b4a1c4d2506e28 (commit)
via 47eea8f986f868c062d24a483877cb59a89461ca (commit)
via 23ebc31d506f7f64e7c72ba30d43bb62050ec202 (commit)
via b8eab431be06215d2b69b6980dca2221587d3a91 (commit)
via 637f72c2b0d0a88f79212174b25ee4b9577ae17c (commit)
via f054482507a28ab8bdb40118364403629abbe8e5 (commit)
via 616b1b309489fef1848f1b976b1837ecd5ab2a99 (commit)
via 244ac84bed746f4da84f7761a2ca4633d7d8851e (commit)
via 92dbcbfe0db2303c31c600d6de3a11fdb4cf2f34 (commit)
via b3386eae7c5eea9cda4567f9cd3895bade97c56b (commit)
from a6db6293464565ac79c5e52a1358fbea51353e7d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 62e610549182843a26c04ed04e5fd6b9cbd807f6
Author: Christian Schuett <Gau...@ho...>
Date: Sat Feb 8 19:38:55 2014 +0100
Neutrino event list: consider announce time instead of start time ...
.. when asking user on timer conflict
just to be conform with EPG Viewer, EPG Plus and timer list
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index a276c66..729023f 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -438,7 +438,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
evtlist[selected].startTime - (ANNOUNCETIME + 120),
TIMERD_APIDS_CONF, true, recDir,false) == -1)
{
- if(askUserOnTimerConflict(evtlist[selected].startTime,
+ if(askUserOnTimerConflict(evtlist[selected].startTime - (ANNOUNCETIME + 120),
evtlist[selected].startTime + evtlist[selected].duration))
{
// Timer.addRecordTimerEvent(channel_id,
commit 84b24096d52cd105cdc2b8206675dc36acdff91f
Author: Christian Schuett <Gau...@ho...>
Date: Sat Feb 8 18:48:07 2014 +0100
Neutrino: don't get full EPG data if not needed
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index b7c9da4..814eaf1 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -1946,8 +1946,8 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
std::string title = timer->epgTitle;
if (timer->epgID != 0)
{
- CEPGData epgdata;
- if (NeutrinoAPI->Sectionsd->getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
+ CShortEPGData epgdata;
+ if (NeutrinoAPI->Sectionsd->getEPGidShort(timer->epgID, &epgdata))
title = epgdata.title;
}
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index ab8e6ad..363f1c9 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -806,8 +806,8 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler */*hh*/, std::s
}
if(timer->epgID!=0)
{
- CEPGData epgdata;
- if (NeutrinoAPI->Sectionsd->getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
+ CShortEPGData epgdata;
+ if (NeutrinoAPI->Sectionsd->getEPGidShort(timer->epgID, &epgdata))
sAddData+="<br/>" + epgdata.title;
else
sAddData+=std::string("<br/>")+timer->epgTitle;
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index eb68fab..4609d7b 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1717,7 +1717,7 @@ void CChannelList::showdescription(int index)
{
ffheight = g_Font[eventFont]->getHeight();
CChannelEvent *p_event = &chanlist[index]->currentEvent;
- g_Sectionsd->getEPGid(p_event->eventID, p_event->startTime, &epgData);
+ g_Sectionsd->getEPGidShort(p_event->eventID, &epgData);
#warning fixme sectionsd should deliver data in UTF-8 format
if (!(epgData.info2.empty()))
diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h
index c94b252..8a6f051 100644
--- a/tuxbox/neutrino/src/gui/channellist.h
+++ b/tuxbox/neutrino/src/gui/channellist.h
@@ -103,7 +103,7 @@ class CChannelList
int infozone_width;
int infozone_height;
- CEPGData epgData;
+ CShortEPGData epgData;
bool historyMode;
bool usedInBouquet;
bool displayNext;
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index e7fb080..7e2d2e5 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -664,8 +664,8 @@ void CTimerList::paintItem(int pos)
}
if(timer.epgID!=0)
{
- CEPGData epgdata;
- if (g_Sectionsd->getEPGid(timer.epgID, timer.epg_starttime, &epgdata))
+ CShortEPGData epgdata;
+ if (g_Sectionsd->getEPGidShort(timer.epgID, &epgdata))
{
#warning fixme sectionsd should deliver data in UTF-8 format
zAddData += " : ";
@@ -1288,9 +1288,9 @@ bool askUserOnTimerConflict(time_t announceTime, time_t stopTime)
timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8
if(it->epgID != 0)
{
- CEPGData epgdata;
+ CShortEPGData epgdata;
timerbuf += ": ";
- if (g_Sectionsd->getEPGid(it->epgID, it->epg_starttime, &epgdata))
+ if (g_Sectionsd->getEPGidShort(it->epgID, &epgdata))
{
#warning fixme sectionsd should deliver data in UTF-8 format
timerbuf += Latin1_to_UTF8(epgdata.title);
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index ed2684b..ec360d9 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -3046,10 +3046,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t m, neutrino_msg_data_t data)
if (eventinfo->epgID != 0)
{
- CEPGData epgdata;
+ CShortEPGData epgdata;
#warning fixme sectionsd should deliver data in UTF-8 format
zAddData += " :\n";
- if (g_Sectionsd->getEPGid(eventinfo->epgID, eventinfo->epg_starttime, &epgdata))
+ if (g_Sectionsd->getEPGidShort(eventinfo->epgID, &epgdata))
zAddData += Latin1_to_UTF8(epgdata.title);
else if (strlen(eventinfo->epgTitle) != 0)
zAddData += Latin1_to_UTF8(eventinfo->epgTitle);
@@ -3120,10 +3120,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t m, neutrino_msg_data_t data)
if (eventinfo->epgID != 0)
{
- CEPGData epgdata;
+ CShortEPGData epgdata;
#warning fixme sectionsd should deliver data in UTF-8 format
zAddData += " :\n";
- if (g_Sectionsd->getEPGid(eventinfo->epgID, eventinfo->epg_starttime, &epgdata))
+ if (g_Sectionsd->getEPGidShort(eventinfo->epgID, &epgdata))
zAddData += Latin1_to_UTF8(epgdata.title);
else if (strlen(eventinfo->epgTitle) != 0)
zAddData += Latin1_to_UTF8(eventinfo->epgTitle);
commit 1de4361b414701cca1115a97209cde79e28a1e7e
Author: Christian Schuett <Gau...@ho...>
Date: Wed Jan 29 18:31:05 2014 +0100
nhttpd controlapi and yParser: avoid unnecessary socket communication ...
... if current EPG is not available
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index e1b7cb9..b7c9da4 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -1409,8 +1409,8 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID();
CSectionsdClient::LinkageDescriptorList desc;
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
- NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
- if (NeutrinoAPI->Sectionsd->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey,desc))
+ bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
+ if (has_current_next && NeutrinoAPI->Sectionsd->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey, desc))
{
for(unsigned int i=0;i< desc.size();i++)
{
@@ -1677,8 +1677,8 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh)
t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID();
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
- NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
- if (NeutrinoAPI->Sectionsd->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags))
+ bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
+ if (has_current_next && NeutrinoAPI->Sectionsd->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey, tags))
{
for (unsigned short j=0; j< pids.APIDs.size(); j++)
{
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index ec636f2..ab8e6ad 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -537,8 +537,8 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler */*
t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID();
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
- NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
- if (NeutrinoAPI->Sectionsd->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags))
+ bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(current_channel, currentNextInfo);
+ if (has_current_next && NeutrinoAPI->Sectionsd->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey, tags))
{
for (unsigned short j=0; j< pids.APIDs.size(); j++)
{
commit c38c2baf0a7a599b0f3954ac422c8b1c54d69b27
Author: Christian Schuett <Gau...@ho...>
Date: Tue Jan 28 21:41:54 2014 +0100
nhttpd NeutrinoAPI: fix getting channel events if sections scan is active
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
index 18abee9..e128e60 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
@@ -241,7 +241,7 @@ bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
bool CNeutrinoAPI::GetChannelEvents(void)
{
- eList = Sectionsd->getChannelEvents();
+ eList = Sectionsd->getChannelEvents(Zapit->getMode() != CZapitClient::MODE_RADIO);
CChannelEventList::iterator eventIterator;
ChannelListEvents.clear();
commit 108db7191980288ae0913f74ac6a631099e8e4aa
Author: Christian Schuett <Gau...@ho...>
Date: Mon Jan 27 19:08:14 2014 +0100
Neutrino SHTDCNT: init shutdown_cnt
also remove undefined method 'setlcdparameter'
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/shutdown_count.cpp b/tuxbox/neutrino/src/driver/shutdown_count.cpp
index 688bd85..8c4b6d6 100644
--- a/tuxbox/neutrino/src/driver/shutdown_count.cpp
+++ b/tuxbox/neutrino/src/driver/shutdown_count.cpp
@@ -62,6 +62,7 @@ void* SHTDCNT::TimeThread(void *)
void SHTDCNT::init()
{
+ shutdown_cnt = atoi(g_settings.shutdown_count) * 60;
if (pthread_create (&thrTime, NULL, TimeThread, NULL) != 0 )
{
perror("[SHTDCNT]: pthread_create(TimeThread)");
diff --git a/tuxbox/neutrino/src/driver/shutdown_count.h b/tuxbox/neutrino/src/driver/shutdown_count.h
index 81a68a2..7eb350f 100644
--- a/tuxbox/neutrino/src/driver/shutdown_count.h
+++ b/tuxbox/neutrino/src/driver/shutdown_count.h
@@ -42,8 +42,6 @@ class SHTDCNT
public:
- void setlcdparameter(void);
-
static SHTDCNT* getInstance();
void init();
};
commit 02b79fbde6123b2c91c54e3064959766e2b0b418
Author: Thilo Graf <db...@no...>
Date: Mon Jan 27 18:27:28 2014 +0100
Neutrino CBookmarkManager: init bookmarksmodified in constructor
var bookmarksmodified was not intitialized
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
index 4b5e41c..51bb9bf 100644
--- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
+++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp
@@ -185,6 +185,7 @@ void CBookmarkManager::writeBookmarkFile() {
CBookmarkManager::CBookmarkManager() : bookmarkfile ('\t')
{
+ bookmarksmodified = false;
readBookmarkFile();
}
commit 689aa7ef274825fe3172b39698c18a5bae0dc754
Author: martii <m4...@gm...>
Date: Sun Jan 26 17:53:44 2014 +0100
nhttpd yParser: fix apparent typo
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index 9312c06..ec636f2 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -613,7 +613,7 @@ std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler */*hh*/, std:
in >> ymount >> ylocal_dir >> yfstype;
in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
yfstype = trim(yfstype);
- if( (yfstype == "nfs") << (yfstype == "ftp") || (yfstype == "lufsd") )
+ if( (yfstype == "nfs") || (yfstype == "ftp") || (yfstype == "lufsd") )
{
mounts=ylocal_dir +" on "+ ymount + " ("+yfstype+")";
ysel = ((j==0) ? "checked=\"checked\"" : "");
commit d1b8bc02894a76f0445e493b2d2c557f95984d39
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 25 14:46:53 2014 +0100
yWeb: bump version to 2.7.0.31
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt
index a8e3b95..d98bacb 100644
--- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt
+++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt
@@ -1,5 +1,5 @@
-version=2.7.0.30
-date=23.10.2013
+version=2.7.0.31
+date=11.01.2014
type=Release
info=
commit da04fabe85065c3d88c4bae3b73fa2710991a8d8
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jan 19 19:33:57 2014 +0100
timerd: reset EPG ID when modifying record or zapto timer
this ensures an up-to-date EPG ID if no EPG infos available for the
modified event during modification
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/timerd/timermanager.cpp b/tuxbox/neutrino/daemons/timerd/timermanager.cpp
index 14a8b69..3dbc6da 100644
--- a/tuxbox/neutrino/daemons/timerd/timermanager.cpp
+++ b/tuxbox/neutrino/daemons/timerd/timermanager.cpp
@@ -360,13 +360,19 @@ int CTimerManager::modifyEvent(int ev_ID, time_t announceTime, time_t alarmTime,
break;
case CTimerd::TIMER_RECORD:
{
- (static_cast<CTimerEvent_Record*>(event))->recordingDir = data.recordingDir;
- (static_cast<CTimerEvent_Record*>(event))->getEpgId();
+ CTimerEvent_Record *event_record = static_cast<CTimerEvent_Record*>(event);
+ event_record->recordingDir = data.recordingDir;
+ event_record->eventInfo.epgID = 0;
+ event_record->eventInfo.epg_starttime = 0;
+ event_record->getEpgId();
break;
}
case CTimerd::TIMER_ZAPTO:
{
- (static_cast<CTimerEvent_Zapto*>(event))->getEpgId();
+ CTimerEvent_Zapto *event_zapto = static_cast<CTimerEvent_Zapto*>(event);
+ event_zapto->eventInfo.epgID = 0;
+ event_zapto->eventInfo.epg_starttime = 0;
+ event_zapto->getEpgId();
break;
}
default:
commit 45971173f59debd02fcac74107b4a1c4d2506e28
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jan 19 14:38:59 2014 +0100
Neutrino timerlist: sort timer type chooser alphabetically
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index 835ebe3..8d6f200 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -1475,7 +1475,7 @@ timerlist.standby SB mode
timerlist.standby.off Leave standby
timerlist.standby.on Enter standby
timerlist.stoptime Stop time
-timerlist.type Timer typ
+timerlist.type Timer type
timerlist.type.execplugin Execute plugin
timerlist.type.nextprogram Next program
timerlist.type.record Record
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 41cff0f..e7fb080 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -1138,7 +1138,7 @@ int CTimerList::newTimer()
CTimerListNewNotifier notifier2((int *)&timerNew.eventType,
&timerNew.stopTime,m2,m6,m8,m9,m10,m7,
timerSettings_stopTime.getValue());
- CMenuOptionChooser* m0 = new CMenuOptionChooser(LOCALE_TIMERLIST_TYPE, (int *)&timerNew.eventType, TIMERLIST_TYPE_OPTIONS, TIMERLIST_TYPE_OPTION_COUNT, true, ¬ifier2);
+ CMenuOptionChooser* m0 = new CMenuOptionChooser(LOCALE_TIMERLIST_TYPE, (int *)&timerNew.eventType, TIMERLIST_TYPE_OPTIONS, TIMERLIST_TYPE_OPTION_COUNT, true, ¬ifier2, CRCInput::RC_nokey, "", false, true);
timerSettings.addItem( m0);
timerSettings.addItem( m1);
commit 47eea8f986f868c062d24a483877cb59a89461ca
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 18 22:37:04 2014 +0100
Neutrino CVCRControl: always use correct EPG ID when filling movie infos
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index a61a967..398a2a3 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -441,6 +441,7 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
CMovieInfo cMovieInfo;
MI_MOVIE_INFO movieInfo;
std::string info1, info2;
+ event_id_t epg_id = epgid;
cMovieInfo.clearMovieInfo(&movieInfo);
CZapitClient::responseGetPIDs pids;
@@ -454,12 +455,12 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
movieInfo.epgChannel = tmpstring;
tmpstring = (epgTitle.empty()) ? "not available" : Latin1_to_UTF8(epgTitle);
- if (epgid != 0)
+ if (epg_id != 0)
{
//#define SHORT_EPG
#ifdef SHORT_EPG
CShortEPGData epgdata;
- if (g_Sectionsd->getEPGidShort(epgid, &epgdata))
+ if (g_Sectionsd->getEPGidShort(epg_id, &epgdata))
{
#warning fixme sectionsd should deliver data in UTF-8 format
tmpstring = Latin1_to_UTF8(epgdata.title);
@@ -468,12 +469,14 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
}
#else
CEPGData epgdata;
- bool has_epgdata = g_Sectionsd->getEPGid(epgid, epg_time, &epgdata);
+ bool has_epgdata = g_Sectionsd->getEPGid(epg_id, epg_time, &epgdata);
if (!has_epgdata)
{
has_epgdata = g_Sectionsd->getActualEPGServiceKey(channel_id, &epgdata);
if (has_epgdata && !epgTitle.empty() && epgTitle != epgdata.title)
has_epgdata = false;
+ if (has_epgdata)
+ epg_id = epgdata.eventID;
}
if (has_epgdata)
{
@@ -496,13 +499,13 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
movieInfo.epgId = channel_id;
movieInfo.epgInfo1 = info1;
movieInfo.epgInfo2 = info2;
- movieInfo.epgEpgId = epgid ;
+ movieInfo.epgEpgId = epg_id;
movieInfo.epgMode = g_Zapit->getMode();
movieInfo.epgVideoPid = si.vpid;
EPG_AUDIO_PIDS audio_pids;
// super hack :-), der einfachste weg an die apid descriptions ranzukommen
- g_RemoteControl->current_EPGid = epgid;
+ g_RemoteControl->current_EPGid = epg_id;
g_RemoteControl->current_PIDs = pids;
g_RemoteControl->processAPIDnames();
APIDList apid_list;
commit 23ebc31d506f7f64e7c72ba30d43bb62050ec202
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 18 21:19:47 2014 +0100
Neutrino CVCRControl: only use current EPG if it has wanted EPG title
based on patch by Jacek Jendrzej <cra...@go...> in Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index 0247d2d..a61a967 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -469,8 +469,12 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
#else
CEPGData epgdata;
bool has_epgdata = g_Sectionsd->getEPGid(epgid, epg_time, &epgdata);
- if (!has_epgdata && epgTitle.empty())
+ if (!has_epgdata)
+ {
has_epgdata = g_Sectionsd->getActualEPGServiceKey(channel_id, &epgdata);
+ if (has_epgdata && !epgTitle.empty() && epgTitle != epgdata.title)
+ has_epgdata = false;
+ }
if (has_epgdata)
{
#warning fixme sectionsd should deliver data in UTF-8 format
commit b8eab431be06215d2b69b6980dca2221587d3a91
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 18 19:25:45 2014 +0100
Neutrino timerlist: skip repeated timer event with blue key
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index e959463..459ef9b 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -1432,7 +1432,6 @@ timerlist.apids_dflt Voreingestellte Tonspuren aufnehmen
timerlist.bouquetselect Bouquet wählen
timerlist.channel Kanal
timerlist.channelselect Kanal wählen
-timerlist.close SchlieÃen
timerlist.delete Löschen
timerlist.menumodify Timer bearbeiten
timerlist.menunew Neuer Timer
@@ -1471,6 +1470,7 @@ timerlist.repeatcount Wiederholungen
timerlist.repeatcount.help1 Anzahl der Timerausführungen
timerlist.repeatcount.help2 0 für unbegrenzte Anzahl
timerlist.save Timer speichern
+timerlist.skip Aussetzen
timerlist.standby SB Modus
timerlist.standby.off Aufwachen aus Standby
timerlist.standby.on Auf Standby gehen
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index d03aa0f..835ebe3 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -1432,7 +1432,6 @@ timerlist.apids_dflt record default audio streams
timerlist.bouquetselect choose bouquet
timerlist.channel Channel
timerlist.channelselect choose channel
-timerlist.close Exit
timerlist.delete Delete
timerlist.menumodify Modify timer
timerlist.menunew New timer
@@ -1471,6 +1470,7 @@ timerlist.repeatcount repeats
timerlist.repeatcount.help1 amount of timer repeats
timerlist.repeatcount.help2 0 for unlimited repeats
timerlist.save Save timer
+timerlist.skip Skip
timerlist.standby SB mode
timerlist.standby.off Leave standby
timerlist.standby.on Enter standby
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 52b1181..41cff0f 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -515,7 +515,11 @@ int CTimerList::show()
{
update=true;
}
- else if ( msg == CRCInput::RC_blue || CRCInput::isNumeric(msg) )
+ else if (msg == CRCInput::RC_blue && !timerlist.empty())
+ {
+ update = skipTimer();
+ }
+ else if (CRCInput::isNumeric(msg))
{
//Ignore
}
@@ -751,8 +755,8 @@ const struct button_label TimerListButtons[5] =
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE },
{ NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERLIST_RELOAD },
- { NEUTRINO_ICON_BUTTON_HOME , LOCALE_TIMERLIST_CLOSE },
- { NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY }
+ { NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY },
+ { NEUTRINO_ICON_BUTTON_BLUE , LOCALE_TIMERLIST_SKIP }
};
void CTimerList::paintFoot()
@@ -761,9 +765,13 @@ void CTimerList::paintFoot()
int ButtonWidth = (width - 20) / 5;
frameBuffer->paintBoxRel(x, y_foot, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
if (timerlist.empty())
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y_foot, ButtonWidth, 3, &(TimerListButtons[1]));
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y_foot, ButtonWidth, 2, &(TimerListButtons[1]));
else
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y_foot, ButtonWidth, 5, TimerListButtons);
+ {
+ CTimerd::responseGetTimer* timer = &timerlist[selected];
+ unsigned int buttonsCount = (timer->eventRepeat != CTimerd::TIMERREPEAT_ONCE && timer->repeatCount != 1) ? 5 : 4;
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y_foot, ButtonWidth, buttonsCount, TimerListButtons);
+ }
}
void CTimerList::paint()
@@ -810,6 +818,8 @@ void CTimerList::updateSelection(unsigned int newpos)
paintItem(prev_selected - liststart);
paintItem(selected - liststart);
}
+
+ paintFoot();
}
}
@@ -1153,6 +1163,89 @@ int CTimerList::newTimer()
return ret;
}
+bool CTimerList::skipTimer()
+{
+ CTimerd::responseGetTimer* timer = &timerlist[selected];
+ if (timer->eventRepeat != CTimerd::TIMERREPEAT_ONCE && timer->repeatCount != 1)
+ {
+ struct tm *t = localtime(&timer->alarmTime);
+ int isdst1 = t->tm_isdst;
+ switch (timer->eventRepeat)
+ {
+ case CTimerd::TIMERREPEAT_DAILY:
+ t->tm_mday++;
+ break;
+ case CTimerd::TIMERREPEAT_WEEKLY:
+ t->tm_mday += 7;
+ break;
+ case CTimerd::TIMERREPEAT_BIWEEKLY:
+ t->tm_mday += 14;
+ break;
+ case CTimerd::TIMERREPEAT_FOURWEEKLY:
+ t->tm_mday += 28;
+ break;
+ case CTimerd::TIMERREPEAT_MONTHLY:
+ t->tm_mon++;
+ break;
+ default:
+ if (timer->eventRepeat >= CTimerd::TIMERREPEAT_WEEKDAYS)
+ {
+ int weekdays = ((int)timer->eventRepeat) >> 9;
+ if (weekdays > 0)
+ {
+ bool weekday_arr[7];
+ weekday_arr[0] = ((weekdays & 0x40) > 0); //So
+ weekday_arr[1] = ((weekdays & 0x1) > 0); //Mo
+ weekday_arr[2] = ((weekdays & 0x2) > 0); //Di
+ weekday_arr[3] = ((weekdays & 0x4) > 0); //Mi
+ weekday_arr[4] = ((weekdays & 0x8) > 0); //Do
+ weekday_arr[5] = ((weekdays & 0x10) > 0); //Fr
+ weekday_arr[6] = ((weekdays & 0x20) > 0); //Sa
+ struct tm *t2 = localtime(&timer->alarmTime);
+ int day = 1;
+ for (; !weekday_arr[(t2->tm_wday + day) % 7]; day++);
+ t2->tm_mday += day;
+ }
+ }
+ }
+ time_t diff = mktime(t) - timer->alarmTime;
+ timer->alarmTime += diff;
+ t = localtime(&timer->alarmTime);
+ int isdst2 = t->tm_isdst;
+ if (isdst2 > isdst1) //change from winter to summer
+ {
+ diff -= 3600;
+ timer->alarmTime -= 3600;
+ }
+ else if (isdst1 > isdst2) //change from summer to winter
+ {
+ diff += 3600;
+ timer->alarmTime += 3600;
+ }
+ if (timer->announceTime > 0)
+ timer->announceTime += diff;
+ if (timer->stopTime > 0)
+ timer->stopTime += diff;
+ if (timer->repeatCount > 0)
+ timer->repeatCount--;
+
+ if (timer->eventType == CTimerd::TIMER_RECORD)
+ {
+ Timer->modifyRecordTimerEvent(timer->eventID, timer->announceTime, timer->alarmTime,
+ timer->stopTime, timer->eventRepeat, timer->repeatCount, timer->recordingDir);
+ }
+ else
+ {
+ Timer->modifyTimerEvent(timer->eventID, timer->announceTime, timer->alarmTime,
+ timer->stopTime, timer->eventRepeat, timer->repeatCount);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
bool askUserOnTimerConflict(time_t announceTime, time_t stopTime)
{
CTimerdClient Timer;
diff --git a/tuxbox/neutrino/src/gui/timerlist.h b/tuxbox/neutrino/src/gui/timerlist.h
index 6317150..5d29c5e 100644
--- a/tuxbox/neutrino/src/gui/timerlist.h
+++ b/tuxbox/neutrino/src/gui/timerlist.h
@@ -84,6 +84,7 @@ class CTimerList : public CMenuTarget
void updateSelection(unsigned int newpos);
int modifyTimer();
int newTimer();
+ bool skipTimer();
public:
CTimerList();
diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h
index 48c2862..bd6891e 100644
--- a/tuxbox/neutrino/src/system/locals.h
+++ b/tuxbox/neutrino/src/system/locals.h
@@ -1459,7 +1459,6 @@ typedef enum
LOCALE_TIMERLIST_BOUQUETSELECT,
LOCALE_TIMERLIST_CHANNEL,
LOCALE_TIMERLIST_CHANNELSELECT,
- LOCALE_TIMERLIST_CLOSE,
LOCALE_TIMERLIST_DELETE,
LOCALE_TIMERLIST_MENUMODIFY,
LOCALE_TIMERLIST_MENUNEW,
@@ -1498,6 +1497,7 @@ typedef enum
LOCALE_TIMERLIST_REPEATCOUNT_HELP1,
LOCALE_TIMERLIST_REPEATCOUNT_HELP2,
LOCALE_TIMERLIST_SAVE,
+ LOCALE_TIMERLIST_SKIP,
LOCALE_TIMERLIST_STANDBY,
LOCALE_TIMERLIST_STANDBY_OFF,
LOCALE_TIMERLIST_STANDBY_ON,
diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h
index f179574..a19ea99 100644
--- a/tuxbox/neutrino/src/system/locals_intern.h
+++ b/tuxbox/neutrino/src/system/locals_intern.h
@@ -1459,7 +1459,6 @@ const char * locale_real_names[] =
"timerlist.bouquetselect",
"timerlist.channel",
"timerlist.channelselect",
- "timerlist.close",
"timerlist.delete",
"timerlist.menumodify",
"timerlist.menunew",
@@ -1498,6 +1497,7 @@ const char * locale_real_names[] =
"timerlist.repeatcount.help1",
"timerlist.repeatcount.help2",
"timerlist.save",
+ "timerlist.skip",
"timerlist.standby",
"timerlist.standby.off",
"timerlist.standby.on",
commit 637f72c2b0d0a88f79212174b25ee4b9577ae17c
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jan 17 20:01:52 2014 +0100
Neutrino CVCRControl: use EPG title of timer if EPG entry missing
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
index 6252261..0247d2d 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp
@@ -434,8 +434,8 @@ void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id chann
std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channel_id channel_id,
const event_id_t epgid, const time_t epg_time,
- unsigned char apids, const bool save_vtxt_pid,
- const bool save_sub_pids)
+ const std::string& epgTitle, unsigned char apids,
+ const bool save_vtxt_pid, const bool save_sub_pids)
{
std::string extMessage;
CMovieInfo cMovieInfo;
@@ -453,7 +453,7 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
else
movieInfo.epgChannel = tmpstring;
- tmpstring = "not available";
+ tmpstring = (epgTitle.empty()) ? "not available" : Latin1_to_UTF8(epgTitle);
if (epgid != 0)
{
//#define SHORT_EPG
@@ -468,7 +468,10 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe
}
#else
CEPGData epgdata;
- if (g_Sectionsd->getEPGid(epgid, epg_time, &epgdata))
+ bool has_epgdata = g_Sectionsd->getEPGid(epgid, epg_time, &epgdata);
+ if (!has_epgdata && epgTitle.empty())
+ has_epgdata = g_Sectionsd->getActualEPGServiceKey(channel_id, &epgdata);
+ if (has_epgdata)
{
#warning fixme sectionsd should deliver data in UTF-8 format
tmpstring = Latin1_to_UTF8(epgdata.title);
@@ -587,7 +590,7 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman
extMessage += "</channelname>\n\t\t<epgtitle>";
// CSectionsdClient::responseGetCurrentNextInfoChannelID current_next;
- tmpstring = "not available";
+ tmpstring = (epgTitle.empty()) ? "not available" : Latin1_to_UTF8(epgTitle);
if (epgid != 0)
{
CShortEPGData epgdata;
@@ -598,14 +601,6 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman
info1 = Latin1_to_UTF8(epgdata.info1);
info2 = Latin1_to_UTF8(epgdata.info2);
}
- else if (!epgTitle.empty())
- {
- tmpstring = epgTitle;
- }
- }
- else if (!epgTitle.empty())
- {
- tmpstring = epgTitle;
}
extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str());
@@ -900,7 +895,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c
} else
{
error_msg = ::start_recording(filename,
- getMovieInfoString(channel_id, epgid, epg_time, apids, save_vtxt_pid, save_sub_pids).c_str(),
+ getMovieInfoString(channel_id, epgid, epg_time, epgTitle, apids, save_vtxt_pid, save_sub_pids).c_str(),
mode,
Use_O_Sync,
Use_Fdatasync,
diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.h b/tuxbox/neutrino/src/driver/vcrcontrol.h
index 33da351..3e50c01 100644
--- a/tuxbox/neutrino/src/driver/vcrcontrol.h
+++ b/tuxbox/neutrino/src/driver/vcrcontrol.h
@@ -110,7 +110,7 @@ class CVCRControl
void RestoreNeutrino(void);
void CutBackNeutrino(const t_channel_id channel_id, const int mode);
std::string getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apids);
- std::string getMovieInfoString(const t_channel_id channel_id, const event_id_t epgid, const time_t epg_time, unsigned char apids, const bool save_vtxt_pid, const bool save_sub_pids);
+ std::string getMovieInfoString(const t_channel_id channel_id, const event_id_t epgid, const time_t epg_time, const std::string& epgTitle, unsigned char apids, const bool save_vtxt_pid, const bool save_sub_pids);
public:
bool StopPlayBack;
commit f054482507a28ab8bdb40118364403629abbe8e5
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jan 17 18:27:12 2014 +0100
timerd: also init recording and zapto safety if config file doesn't exist
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/timerd/timermanager.cpp b/tuxbox/neutrino/daemons/timerd/timermanager.cpp
index 22e2568..14a8b69 100644
--- a/tuxbox/neutrino/daemons/timerd/timermanager.cpp
+++ b/tuxbox/neutrino/daemons/timerd/timermanager.cpp
@@ -648,11 +648,9 @@ void CTimerManager::loadRecordingSafety()
/* set defaults if no configuration file exists */
dprintf("%s not found\n", config_file_name);
}
- else
- {
- m_extraTimeStart = config.getInt32 ("EXTRA_TIME_START",0);
- m_extraTimeEnd = config.getInt32 ("EXTRA_TIME_END",0);
- }
+
+ m_extraTimeStart = config.getInt32("EXTRA_TIME_START", 0);
+ m_extraTimeEnd = config.getInt32("EXTRA_TIME_END", 0);
}
// -------------------------------------------------------------------------------------
void CTimerManager::loadZaptoSafety()
@@ -664,10 +662,8 @@ void CTimerManager::loadZaptoSafety()
/* set defaults if no configuration file exists */
dprintf("%s not found\n", config_file_name);
}
- else
- {
- m_zaptoExtraTimeStart = config.getInt32 ("ZAPTO_EXTRA_TIME_START",0);
- }
+
+ m_zaptoExtraTimeStart = config.getInt32("ZAPTO_EXTRA_TIME_START", 0);
}
// -------------------------------------------------------------------------------------
void CTimerManager::saveEventsToConfig()
commit 616b1b309489fef1848f1b976b1837ecd5ab2a99
Author: Stefan Seyfried <se...@tu...>
Date: Thu Jan 16 19:41:28 2014 +0100
XMLTreeNode::AddNode: fix logic error (in unused branch)
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libxmltree/xmltree.cpp b/misc/libs/libxmltree/xmltree.cpp
index 3fdc97b..89e0084 100644
--- a/misc/libs/libxmltree/xmltree.cpp
+++ b/misc/libs/libxmltree/xmltree.cpp
@@ -204,7 +204,7 @@ void XMLTreeNode::AddNode(XMLTreeNode *node, addmode mode)
{
case ADD_NEIGHBOUR:
n=this;
-
+ break;
case ADD_CHILD:
n=child;
}
commit 244ac84bed746f4da84f7761a2ca4633d7d8851e
Author: Stefan Seyfried <se...@tu...>
Date: Thu Jan 16 19:36:07 2014 +0100
XML_Parser::storeAtts: don't leak in case of realloc failure
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libxmltree/xmlparse.cpp b/misc/libs/libxmltree/xmlparse.cpp
index d98990e..8e62d6c 100644
--- a/misc/libs/libxmltree/xmlparse.cpp
+++ b/misc/libs/libxmltree/xmlparse.cpp
@@ -114,7 +114,8 @@ XML_Parser::XML_Parser(const XML_Char *encodingName)
tagStack=0;
freeTagList=0;
attsSize=INIT_ATTS_SIZE;
- atts=new ATTRIBUTE[attsSize];
+ /* must not realloc stuff allocated with new[] */
+ atts=(ATTRIBUTE *)malloc(attsSize * sizeof(ATTRIBUTE));
dataBuf=new XML_Char[INIT_DATA_BUF_SIZE];
groupSize=0;
groupConnector=0;
@@ -134,7 +135,7 @@ XML_Parser::XML_Parser(const XML_Char *encodingName)
poolDestroy(&tempPool);
poolDestroy(&temp2Pool);
- if (atts) delete[] atts;
+ if (atts) free(atts);
if (dataBuf) delete[] dataBuf;
return;
@@ -186,7 +187,7 @@ XML_Parser::~XML_Parser()
poolDestroy(&temp2Pool);
dtdDestroy(&dtd);
- delete[] atts;
+ free(atts);
free(groupConnector);
free(buffer);
delete[] dataBuf;
@@ -1082,9 +1083,11 @@ enum XML_Error XML_Parser::storeAtts(const ENCODING *enc, const XML_Char *tagNam
attsSize=n+nDefaultAtts+INIT_ATTS_SIZE;
- atts=(ATTRIBUTE *) realloc((void *) atts, attsSize*sizeof(ATTRIBUTE));
+ ATTRIBUTE *newatts = (ATTRIBUTE *) realloc((void *) atts, attsSize*sizeof(ATTRIBUTE));
- if (!atts) return XML_ERROR_NO_MEMORY;
+ if (!newatts) return XML_ERROR_NO_MEMORY;
+
+ atts = newatts;
if (n>oldAttsSize) XmlGetAttributes(enc, s, n, atts);
};
commit 92dbcbfe0db2303c31c600d6de3a11fdb4cf2f34
Author: Stefan Seyfried <se...@tu...>
Date: Thu Jan 16 19:32:52 2014 +0100
XML_Parser: initialize variable
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libxmltree/xmlparse.cpp b/misc/libs/libxmltree/xmlparse.cpp
index 348cc36..d98990e 100644
--- a/misc/libs/libxmltree/xmlparse.cpp
+++ b/misc/libs/libxmltree/xmlparse.cpp
@@ -89,6 +89,7 @@ XML_Parser::XML_Parser(const XML_Char *encodingName)
bufferLim=0;
declElementType=0;
declAttributeId=0;
+ declAttributeIsCdata=0;
declEntity=0;
declNotationName=0;
declNotationPublicId=0;
commit b3386eae7c5eea9cda4567f9cd3895bade97c56b
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 11 19:20:58 2014 +0100
Neutrino: add possibility to set initial volume
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Blocks.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Blocks.txt
index 2e6064c..9ce554c 100644
--- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Blocks.txt
+++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Blocks.txt
@@ -73,6 +73,7 @@ start-block~video_audio_save_settings
{=ini-set:/var/tuxbox/config/neutrino.conf;audio_avs_Control;{=h_audio_avs_Control=}~cache=}
{=ini-set:/var/tuxbox/config/neutrino.conf;audio_DolbyDigital;{=audio_DolbyDigital=}~cache=}
{=ini-set:/var/tuxbox/config/neutrino.conf;audio_PCMOffset;{=audio_PCMOffset=}~cache=}
+{=ini-set:/var/tuxbox/config/neutrino.conf;audio_initial_volume;{=audio_initial_volume=}~cache=}
{=ini-set:/var/tuxbox/config/neutrino.conf;audio_step;{=audio_step=}~save=}
{=ini-set:/var/tuxbox/config/controld.conf;vcroutput;{=h_vcroutput=}~open=}
{=ini-set:/var/tuxbox/config/controld.conf;videooutput;{=h_videooutput=}~save=}
diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_video_audio.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_video_audio.yhtm
index 55b5f5c..070f5e8 100644
--- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_video_audio.yhtm
+++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_video_audio.yhtm
@@ -35,6 +35,8 @@ function do_init()
document.f.audio_avs_Control.selectedIndex = val;
val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_PCMOffset;0~cache=}"
document.f.audio_PCMOffset.value = val;
+ val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_initial_volume;0~cache=}"
+ document.f.audio_initial_volume.value = val;
val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_step;5~cache=}"
document.f.audio_step.value = val;
}
@@ -52,6 +54,10 @@ function do_submit()
else{
set_hidden_values();
show_waitbox(true);
+ if(document.f.audio_initial_volume.value < 0)
+ document.f.audio_initial_volume.value = 0;
+ else if(document.f.audio_initial_volume.value > 100)
+ document.f.audio_initial_volume.value = 100;
document.f.submit();
}
}
@@ -175,6 +181,11 @@ function do_submit()
<input type="text" name="audio_step" size="2" maxlength="2" title="audio step"/>
</td>
</tr>
+ <tr><td>Anfangslautstärke</td>
+ <td>
+ <input type="text" name="audio_initial_volume" size="3" maxlength="3" title="initial volume"/>
+ </td>
+ </tr>
</table>
<br/>
<input type="hidden" name="execute" value="include-block:Y_Blocks.txt;video_audio_save_settings;nix"/>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index d986b2b..e959463 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -138,6 +138,8 @@ audiomenu.avs avs
audiomenu.avs_control Volume Steuerung
audiomenu.dolbydigital Dolby Digital Default
audiomenu.head Audio-Einstellungen
+audiomenu.initial_volume Anfangslautstärke
+audiomenu.initial_volume_restore Letzte Lautstärke
audiomenu.lirc lirc
audiomenu.monoleft mono links
audiomenu.monoright mono rechts
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index 8419074..d03aa0f 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -138,6 +138,8 @@ audiomenu.avs avs
audiomenu.avs_control Volume Control
audiomenu.dolbydigital Dolby Digital as Default
audiomenu.head Audio Settings
+audiomenu.initial_volume Initial volume
+audiomenu.initial_volume_restore Restore last volume
audiomenu.lirc lirc
audiomenu.monoleft mono left
audiomenu.monoright mono right
diff --git a/tuxbox/neutrino/src/gui/audio_setup.cpp b/tuxbox/neutrino/src/gui/audio_setup.cpp
index 2dd8cea..06ef19e 100644
--- a/tuxbox/neutrino/src/gui/audio_setup.cpp
+++ b/tuxbox/neutrino/src/gui/audio_setup.cpp
@@ -168,6 +168,11 @@ int CAudioSetup::showAudioSetup()
CMenuForwarder *as = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUMEBAR_AUDIOSTEPS, true, g_settings.audio_step, &audio_step);
audioSettings->addItem(as);
+ // initial volume
+ CMenuOptionNumberChooser *iv = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_INITIAL_VOLUME, &g_settings.audio_initial_volume, true, 0, 100, 0, 0, LOCALE_AUDIOMENU_INITIAL_VOLUME_RESTORE, NULL, NULL, CRCInput::RC_nokey, "", true);
+ iv->setNumberFormat("%d%%");
+ audioSettings->addItem(iv);
+
int res = audioSettings->exec(NULL, "");
selected = audioSettings->getSelected();
delete audioSettings;
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 30bbc81..ed2684b 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -427,6 +427,7 @@ int CNeutrinoApp::loadSetup()
//audio
g_settings.audio_AnalogMode = configfile.getInt32( "audio_AnalogMode" , 0 );
g_settings.audio_DolbyDigital = configfile.getBool("audio_DolbyDigital" , false);
+ g_settings.audio_initial_volume = configfile.getInt32( "audio_initial_volume" , 0 );
#ifdef HAVE_DBOX_HARDWARE
g_settings.audio_avs_Control = configfile.getInt32( "audio_avs_Control", CControld::TYPE_AVS );
strcpy( g_settings.audio_step, configfile.getString( "audio_step" , "5" ).c_str() );
@@ -1024,6 +1025,7 @@ void CNeutrinoApp::saveSetup()
//audio
configfile.setInt32( "audio_AnalogMode" , g_settings.audio_AnalogMode);
configfile.setBool("audio_DolbyDigital" , g_settings.audio_DolbyDigital);
+ configfile.setInt32( "audio_initial_volume" , g_settings.audio_initial_volume);
configfile.setInt32( "audio_avs_Control", g_settings.audio_avs_Control);
configfile.setString( "audio_PCMOffset" , g_settings.audio_PCMOffset);
configfile.setString( "audio_step" , g_settings.audio_step);
@@ -2145,7 +2147,11 @@ int CNeutrinoApp::run(int argc, char **argv)
g_Zapit->setStandby(false);
int loadSettingsErg = loadSetup();
-
+
+ // init volume
+ if (obeyStartMode && g_settings.audio_initial_volume > 0)
+ g_Controld->setVolume(g_settings.audio_initial_volume, (CControld::volume_type)g_settings.audio_avs_Control);
+
/* load locales before setting up any fonts to determine whether we need a true unicode font */
bool display_language_selection;
loadLocale_ret = g_Locale->loadLocale(g_settings.language);
diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h
index 3edafdc..48c2862 100644
--- a/tuxbox/neutrino/src/system/locals.h
+++ b/tuxbox/neutrino/src/system/locals.h
@@ -165,6 +165,8 @@ typedef enum
LOCALE_AUDIOMENU_AVS_CONTROL,
LOCALE_AUDIOMENU_DOLBYDIGITAL,
LOCALE_AUDIOMENU_HEAD,
+ LOCALE_AUDIOMENU_INITIAL_VOLUME,
+ LOCALE_AUDIOMENU_INITIAL_VOLUME_RESTORE,
LOCALE_AUDIOMENU_LIRC,
LOCALE_AUDIOMENU_MONOLEFT,
LOCALE_AUDIOMENU_MONORIGHT,
diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h
index da40beb..f179574 100644
--- a/tuxbox/neutrino/src/system/locals_intern.h
+++ b/tuxbox/neutrino/src/system/locals_intern.h
@@ -165,6 +165,8 @@ const char * locale_real_names[] =
"audiomenu.avs_control",
"audiomenu.dolbydigital",
"audiomenu.head",
+ "audiomenu.initial_volume",
+ "audiomenu.initial_volume_restore",
"audiomenu.lirc",
"audiomenu.monoleft",
"audiomenu.monoright",
diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h
index 411ede6..5ba4f12 100644
--- a/tuxbox/neutrino/src/system/settings.h
+++ b/tuxbox/neutrino/src/system/settings.h
@@ -98,6 +98,7 @@ struct SNeutrinoSettings
int audio_AnalogMode;
int audio_DolbyDigital;
int audio_avs_Control;
+ int audio_initial_volume;
char audio_step[3];
char audio_PCMOffset[3];
-----------------------------------------------------------------------
Summary of changes:
misc/libs/libxmltree/xmlparse.cpp | 14 ++-
misc/libs/libxmltree/xmltree.cpp | 2 +-
.../daemons/nhttpd/tuxboxapi/controlapi.cpp | 12 +-
.../daemons/nhttpd/tuxboxapi/neutrinoapi.cpp | 2 +-
.../daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp | 10 +-
tuxbox/neutrino/daemons/nhttpd/web/Y_Blocks.txt | 1 +
.../daemons/nhttpd/web/Y_Settings_video_audio.yhtm | 11 ++
tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt | 4 +-
tuxbox/neutrino/daemons/timerd/timermanager.cpp | 26 +++--
tuxbox/neutrino/data/locale/deutsch.locale | 4 +-
tuxbox/neutrino/data/locale/english.locale | 6 +-
tuxbox/neutrino/src/driver/shutdown_count.cpp | 1 +
tuxbox/neutrino/src/driver/shutdown_count.h | 2 -
tuxbox/neutrino/src/driver/vcrcontrol.cpp | 38 ++++---
tuxbox/neutrino/src/driver/vcrcontrol.h | 2 +-
tuxbox/neutrino/src/gui/audio_setup.cpp | 5 +
tuxbox/neutrino/src/gui/bookmarkmanager.cpp | 1 +
tuxbox/neutrino/src/gui/channellist.cpp | 2 +-
tuxbox/neutrino/src/gui/channellist.h | 2 +-
tuxbox/neutrino/src/gui/eventlist.cpp | 2 +-
tuxbox/neutrino/src/gui/timerlist.cpp | 113 ++++++++++++++++++--
tuxbox/neutrino/src/gui/timerlist.h | 1 +
tuxbox/neutrino/src/neutrino.cpp | 16 ++-
tuxbox/neutrino/src/system/locals.h | 4 +-
tuxbox/neutrino/src/system/locals_intern.h | 4 +-
tuxbox/neutrino/src/system/settings.h | 1 +
26 files changed, 210 insertions(+), 76 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-01-13 14:35:52
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via a6db6293464565ac79c5e52a1358fbea51353e7d (commit)
from 151df1b8164d2bdfdc03bdbb049686c038a7cff8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a6db6293464565ac79c5e52a1358fbea51353e7d
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 11 15:09:46 2014 +0100
Neutrino moviebrowser: update series names even if file without is deleted
the series names list is not correct anymore after deleting a file or
editing a series name
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 50b4ff8..04e36cb 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -2195,7 +2195,7 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler)
hintBox.hide();
g_RCInput->clearRCMsg();
- if (!movieSelectionHandler.serieName.empty())
+ if (!m_vHandleSerienames.empty())
m_seriename_stale = true;
m_vMovieInfo.erase( (std::vector<MI_MOVIE_INFO>::iterator)&movieSelectionHandler);
updateSerienames();
@@ -3108,6 +3108,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
int returnval = movieInfoMenu.exec(NULL,"");
+ updateSerienames();
for(int i =0 ; i < MI_MOVIE_BOOK_USER_MAX && i < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++ )
{
delete pBookNameInput[i] ;
-----------------------------------------------------------------------
Summary of changes:
tuxbox/neutrino/src/gui/moviebrowser.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-01-10 21:37:45
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 151df1b8164d2bdfdc03bdbb049686c038a7cff8 (commit)
from 641a9f9b2bee4618553f2673a22c65c424b56b74 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 151df1b8164d2bdfdc03bdbb049686c038a7cff8
Author: martii <m4...@gm...>
Date: Sun Dec 22 21:58:24 2013 +0100
timerd: don't let getSleeptimerID return an already terminated id
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/timerd/timerd.cpp b/tuxbox/neutrino/daemons/timerd/timerd.cpp
index d318cce..a30684b 100644
--- a/tuxbox/neutrino/daemons/timerd/timerd.cpp
+++ b/tuxbox/neutrino/daemons/timerd/timerd.cpp
@@ -71,8 +71,9 @@ bool parse_command(CBasicMessage::Header &rmsg, int connfd)
{
for (pos = events.begin(); pos != events.end(); ++pos)
{
- printf("ID: %u type: %u\n",pos->second->eventID,pos->second->eventType);
- if(pos->second->eventType == CTimerd::TIMER_SLEEPTIMER)
+ dprintf("ID: %u type: %u\n", pos->second->eventID, pos->second->eventType);
+ if (pos->second->eventType == CTimerd::TIMER_SLEEPTIMER &&
+ pos->second->eventState != CTimerd::TIMERSTATE_TERMINATED)
{
rspGetSleeptimer.eventID = pos->second->eventID;
break;
-----------------------------------------------------------------------
Summary of changes:
tuxbox/neutrino/daemons/timerd/timerd.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--
Tuxbox-GIT: apps
|
|
From: Thilo G. <tux...@ne...> - 2014-01-10 07:02:25
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 641a9f9b2bee4618553f2673a22c65c424b56b74 (commit)
via 51bbe8f34d3714e34ddae1f667cf377f09486277 (commit)
via 4aa49571b8654bdc1851c7cbedcb09829ebabab9 (commit)
via aff034f605db74a1f5695ff8db2278cd7f997cb3 (commit)
via c63e62487973b02936f45b2b6fafee680d395cce (commit)
via f2a5e4bd811f12b333b3f3dca5e09f805af854bf (commit)
via 8fe1818840917f1eb5a7b8d88ed997f1f71e0c61 (commit)
via 43154e275f89d4fe3a17a82226ae2abef49faf2e (commit)
via 3786468a38aaf2950271e58a1928a0eb80d4af5d (commit)
via 8cb92833fd1e3446283196fda839df8e8a2a5421 (commit)
via a71d8db768f03531e132e8342f1243646b7bd028 (commit)
via 4a3f2ddd2c88f156543ae75e72a537f6b68e3af2 (commit)
via 3791d45ceaa5f101c08258b9b7d642d2b1aa396c (commit)
via 37824440c763bd96aa1101406b24f36fee1cd0c1 (commit)
via 5bb6629379bb0ae97e33b786c074aee27350cb85 (commit)
via 4308fdc765bcbfcc6aeb190cfc5fab80a565cdb4 (commit)
via fe7c2a1b4b42acf35fac25634458c871f75949ae (commit)
via 26f24d1388743994b089c81fa53d1245189fd326 (commit)
via 7ec31d62e750491f7661cdc5feb178589d6894ba (commit)
via 8b9fccfe3c4ef26e0fefb9399c2249eb50a1d34f (commit)
via 185a555fa9ef9d9a661fa64753422c5ff6b94c66 (commit)
via f9f973c55cbd2324295f601843e0928a6e501db4 (commit)
via 622e55a25919572124b9c8e2a2daeaa176c750d3 (commit)
via a7ec46890c5a4925d33afbd34412ee711bd029a4 (commit)
via afead8b91a72b593ce7486e0509850d1a4d95f27 (commit)
via 081e4d0d0e2bb0f6719660d7771b265398efe7ce (commit)
via b665ed56736b4796f196723a2088e4be167a60bb (commit)
via 3f784e0a557c1568de1df0f191d4c76d448ef9a0 (commit)
via 745102b1ea84e80f9891ffffaa56fac5e0e167bd (commit)
via 50122c54c2e3801433a30a8398052a5cd300dc26 (commit)
via dd3dc207bbe40d686f5609f49babc7df0a605c9c (commit)
via c44f7e3b0881734ca0ec154b4b2a1528be219ba3 (commit)
via 6640bf2a94c23fbbf3cbe7de69521942ec6b947b (commit)
via d274b93737898b5c841306027bc9f436dcee59c5 (commit)
via 8588e416be4b491e511606c547d65cd17c54ba6d (commit)
via ac8d8ea878c14d705d16bd11cd8593e8759c312f (commit)
via 7411ff6f87a9bce45a992092356cfd772b217d56 (commit)
via b9e8ee569c093cbb88992d15f2b483eb552548f3 (commit)
via 78fa4f888479b06ee927b9d35f0f5c732438446f (commit)
from c213938731574d429405adecb4c1d4881063d24c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 641a9f9b2bee4618553f2673a22c65c424b56b74
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 9 22:42:12 2014 +0100
Neutrino moviebrowser: avoid segfault after deleting file with series name
neutrino crashes if you try to edit movie infos of a file after deleting
another one with series name
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 42a93eb..50b4ff8 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -2195,6 +2195,8 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler)
hintBox.hide();
g_RCInput->clearRCMsg();
+ if (!movieSelectionHandler.serieName.empty())
+ m_seriename_stale = true;
m_vMovieInfo.erase( (std::vector<MI_MOVIE_INFO>::iterator)&movieSelectionHandler);
updateSerienames();
refreshBrowserList();
commit 51bbe8f34d3714e34ddae1f667cf377f09486277
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 9 00:33:03 2014 +0100
Neutrino moviebrowser: update series list after changing series name
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index 7cc2492..d986b2b 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -903,7 +903,7 @@ moviebrowser.reload_at_start Filminfos neu laden bei Start
moviebrowser.remount_at_start Filmdepot verbinden bei Start
moviebrowser.scan_for_movies Suche Filme...
moviebrowser.serie_auto_create Serien automatisch zuordnen
-moviebrowser.serie_existingname Vorhandene Serie
+moviebrowser.serie_existingname Vorhandene Serien
moviebrowser.serie_head Serie
moviebrowser.serie_name Name ändern
moviebrowser.short_audio Audio
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 57b5355..42a93eb 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -1129,7 +1129,17 @@ int CMovieBrowser::exec(const char* path, const int playstate)
return (res);
}
+/************************************************************************
+************************************************************************/
+bool CMovieBrowser::changeNotify(const neutrino_locale_t OptionName, void *)
+{
+ if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MOVIEBROWSER_EDIT_SERIE))
+ {
+ m_seriename_stale = true;
+ }
+ return false;
+}
/************************************************************************
************************************************************************/
@@ -3012,15 +3022,21 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
/********************************************************************/
/** serie******************************************************/
- CStringInputSMS serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
+ CStringInputSMS serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ", this);
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_INFO_HEAD, NEUTRINO_ICON_STREAMING);
serieMenu.addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
serieMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName,&serieUserInput));
if (!m_vHandleSerienames.empty())
- serieMenu.addItem(GenericMenuSeparatorLine);
+ {
+ m_serienames.clear();
+ serieMenu.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_SERIE_EXISTINGNAME));
+ }
for(unsigned int i=0; i < m_vHandleSerienames.size(); i++)
- serieMenu.addItem( new CMenuSelector(m_vHandleSerienames[i]->serieName.c_str(), true, movie_info->serieName));
+ {
+ m_serienames.push_back(m_vHandleSerienames[i]->serieName);
+ serieMenu.addItem( new CMenuSelector(m_serienames.back().c_str(), true, movie_info->serieName));
+ }
/********************************************************************/
/** update movie info ******************************************************/
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.h b/tuxbox/neutrino/src/gui/moviebrowser.h
index 029b8e1..a5be223 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.h
+++ b/tuxbox/neutrino/src/gui/moviebrowser.h
@@ -199,7 +199,7 @@ typedef struct
}MB_SETTINGS;
// Priorities for Developmemt: P1: critical feature, P2: important feature, P3: for next release, P4: looks nice, lets see
-class CMovieBrowser : public CMenuTarget
+class CMovieBrowser : public CMenuTarget, CChangeObserver
{
public: // Variables /////////////////////////////////////////////////
int Multi_Select; // for FileBrowser compatibility, not used in MovieBrowser
@@ -233,7 +233,7 @@ class CMovieBrowser : public CMenuTarget
std::vector<MI_MOVIE_INFO*> m_vHandleRecordList;
std::vector<MI_MOVIE_INFO*> m_vHandlePlayList;
std::vector<std::string> m_dirNames;
-// std::vector<std::string> m_serienames;
+ std::vector<std::string> m_serienames;
std::vector<MI_MOVIE_INFO*> m_vHandleSerienames;
unsigned int m_currentBrowserSelection;
@@ -286,6 +286,7 @@ class CMovieBrowser : public CMenuTarget
~CMovieBrowser(); //P1
int exec(const char* path, const int playstate); //P1
int exec(CMenuTarget* parent, const std::string & actionKey);
+ bool changeNotify(const neutrino_locale_t OptionName, void *);
std::string getCurrentDir(void); //P1 for FileBrowser compatibility
CFile* getSelectedFile(void); //P1 for FileBrowser compatibility
MI_MOVIE_BOOKMARKS* getCurrentMovieBookmark(void){if(m_movieSelectionHandler == NULL) return NULL; return(&(m_movieSelectionHandler->bookmarks));};
commit 4aa49571b8654bdc1851c7cbedcb09829ebabab9
Author: Christian Schuett <Gau...@ho...>
Date: Wed Jan 8 21:42:10 2014 +0100
Neutrino moviebrowser: sort some filters alphabetically
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 0023ae3..57b5355 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -235,8 +235,6 @@ const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] =
//------------------------------------------------------------------------
// sorting
//------------------------------------------------------------------------
-#define FILEBROWSER_NUMBER_OF_SORT_VARIANTS 5
-
bool sortDirection = 0;
bool compare_to_lower(const char a, const char b)
@@ -253,7 +251,15 @@ bool sortByTitle (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
return false;
return a->file.Time < b->file.Time;
}
-bool sortByGenre (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
+bool sortBySerie (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
+{
+ if (std::lexicographical_compare(a->serieName.begin(), a->serieName.end(), b->serieName.begin(), b->serieName.end(), compare_to_lower))
+ return true;
+ if (std::lexicographical_compare(b->serieName.begin(), b->serieName.end(), a->serieName.begin(), a->serieName.end(), compare_to_lower))
+ return false;
+ return sortByTitle(a,b);
+}
+bool sortByInfo1 (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (std::lexicographical_compare(a->epgInfo1.begin(), a->epgInfo1.end(), b->epgInfo1.begin(), b->epgInfo1.end(), compare_to_lower))
return true;
@@ -326,8 +332,8 @@ bool (* const sortBy[MB_INFO_MAX_NUMBER+1])(const MI_MOVIE_INFO* a, const MI_MOV
&sortByFileName , //MB_INFO_FILENAME = 0,
&sortByDir, //MB_INFO_FILEPATH = 1,
&sortByTitle, //MB_INFO_TITLE = 2,
- NULL, //MB_INFO_SERIE = 3,
- &sortByGenre, //MB_INFO_INFO1 = 4,
+ &sortBySerie, //MB_INFO_SERIE = 3,
+ &sortByInfo1, //MB_INFO_INFO1 = 4,
NULL, //MB_INFO_MAJOR_GENRE = 5,
NULL, //MB_INFO_MINOR_GENRE = 6,
NULL, //MB_INFO_INFO2 = 7,
@@ -1354,6 +1360,11 @@ void CMovieBrowser::refreshLCD(void)
/************************************************************************
************************************************************************/
+static bool sortByAlpha(const std::string & a, const std::string & b)
+{
+ return (strcasecmp(a.c_str(), b.c_str()) < 0);
+}
+
void CMovieBrowser::refreshFilterList(void)
{
TRACE("[mb]->refreshFilterList %d\r\n",m_settings.filter.item);
@@ -1386,9 +1397,9 @@ void CMovieBrowser::refreshFilterList(void)
}
else
{
- std::string tmp = g_Locale->getText(LOCALE_MENU_BACK);
- m_FilterLines.lineArray[0].push_back(tmp);
-
+ string_item = g_Locale->getText(LOCALE_MENU_BACK);
+ m_FilterLines.lineArray[0].push_back(string_item);
+
if(m_settings.filter.item == MB_INFO_FILEPATH)
{
for(unsigned int i =0 ; i < m_dirNames.size() ;i++)
@@ -1409,19 +1420,21 @@ void CMovieBrowser::refreshFilterList(void)
if(found == false)
m_FilterLines.lineArray[0].push_back(m_vMovieInfo[i].epgInfo1);
}
+ sort(m_FilterLines.lineArray[0].begin() + 1, m_FilterLines.lineArray[0].end(), sortByAlpha);
}
else if(m_settings.filter.item == MB_INFO_INFO2)
{
- std::string tmp2 = "->Eingabe";
- m_FilterLines.lineArray[0].push_back(tmp2);
+ string_item = "->Eingabe";
+ m_FilterLines.lineArray[0].push_back(string_item);
}
else if(m_settings.filter.item == MB_INFO_MAJOR_GENRE)
{
for(int i = 0; i < GENRE_ALL_COUNT; i++)
{
- std::string tmp2 = g_Locale->getText(GENRE_ALL[i].value);
- m_FilterLines.lineArray[0].push_back(tmp2);
+ string_item = g_Locale->getText(GENRE_ALL[i].value);
+ m_FilterLines.lineArray[0].push_back(string_item);
}
+ sort(m_FilterLines.lineArray[0].begin() + 1, m_FilterLines.lineArray[0].end(), sortByAlpha);
}
else if(m_settings.filter.item == MB_INFO_SERIE)
{
@@ -2811,8 +2824,15 @@ void CMovieBrowser::updateFilterSelection(void)
}
else if(m_settings.filter.item == MB_INFO_MAJOR_GENRE)
{
- m_settings.filter.optionString = g_Locale->getText(GENRE_ALL[selected_line].value);
- m_settings.filter.optionVar = GENRE_ALL[selected_line].key;
+ m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1];
+ for(int i = 0; i < GENRE_ALL_COUNT; i++)
+ {
+ if(strcmp(m_settings.filter.optionString.c_str(), g_Locale->getText(GENRE_ALL[i].value)) == 0)
+ {
+ m_settings.filter.optionVar = GENRE_ALL[i].key;
+ break;
+ }
+ }
}
else if(m_settings.filter.item == MB_INFO_SERIE)
{
@@ -3577,7 +3597,7 @@ void CMovieBrowser::updateSerienames(void)
}
}
TRACE("[mb]->updateSerienames: %d\r\n",m_vHandleSerienames.size());
- // TODO sort(m_serienames.begin(), m_serienames.end(), my_alphasort);
+ sort(m_vHandleSerienames.begin(), m_vHandleSerienames.end(), sortBySerie);
m_seriename_stale = false;
}
commit aff034f605db74a1f5695ff8db2278cd7f997cb3
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jan 5 17:25:56 2014 +0100
Neutrino: sort some option choosers alphabetically
this affects
* genre selection in moviebrowser
* cable provider selection in scan setup
* user menu item selection in user menu setup
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 7047bfe..0023ae3 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -3052,7 +3052,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_TITLE, true, movie_info->epgTitle, &titelUserInput,NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SERIE, true, movie_info->serieName, &serieMenu,NULL, CRCInput::RC_2, NEUTRINO_ICON_BUTTON_2));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_INFO1, true, movie_info->epgInfo1, &epgUserInput,NULL, CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3));
- movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true, NULL, CRCInput::RC_4, NEUTRINO_ICON_BUTTON_4, true));
+ movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true, NULL, CRCInput::RC_4, NEUTRINO_ICON_BUTTON_4, true, true));
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movie_info->quality, true, 0, 3, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5));
movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true,NULL, CRCInput::RC_6, NEUTRINO_ICON_BUTTON_6 ));
diff --git a/tuxbox/neutrino/src/gui/scan_setup.cpp b/tuxbox/neutrino/src/gui/scan_setup.cpp
index eb7c6c7..4eccd7e 100644
--- a/tuxbox/neutrino/src/gui/scan_setup.cpp
+++ b/tuxbox/neutrino/src/gui/scan_setup.cpp
@@ -355,8 +355,8 @@ int CScanSetup::showScanService()
CZapitClient::SatelliteList providerList;
g_Zapit->getScanSatelliteList(providerList);
- // sat/provider selector
- CMenuOptionStringChooser * ojProv = new CMenuOptionStringChooser(LOCALE_CABLESETUP_PROVIDER, (char*)&scanSettings.satNameNoDiseqc, true, NULL, CRCInput::RC_nokey, "", true);
+ //cable provider selector
+ CMenuOptionStringChooser * ojProv = new CMenuOptionStringChooser(LOCALE_CABLESETUP_PROVIDER, (char*)&scanSettings.satNameNoDiseqc, true, NULL, CRCInput::RC_nokey, "", true, true);
bool sfound = false;
for (CZapitClient::SatelliteList::iterator it = providerList.begin(); it != providerList.end(); ++it) {
diff --git a/tuxbox/neutrino/src/gui/user_menue_setup.cpp b/tuxbox/neutrino/src/gui/user_menue_setup.cpp
index ce805f6..d772f9a 100644
--- a/tuxbox/neutrino/src/gui/user_menue_setup.cpp
+++ b/tuxbox/neutrino/src/gui/user_menue_setup.cpp
@@ -113,7 +113,7 @@ int CUserMenuSetup::showSetup()
{
snprintf(text,10,"%d:",item+1);
text[9]=0;// terminate for sure
- ums->addItem( new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true ));
+ ums->addItem( new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true, true));
}
int res = ums->exec(NULL, "");
commit c63e62487973b02936f45b2b6fafee680d395cce
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jan 5 16:58:21 2014 +0100
Neutrino: add possibility to sort option (string) choosers alphabetically
based on idea by M. Liebmann <tux...@gm...> in Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 4f246af..2e07e8d 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -844,11 +844,10 @@ int CMenuOptionNumberChooser::paint(bool selected)
-CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown)
+CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
{
optionNameString = g_Locale->getText(OptionName);
optionName = OptionName;
- options = Options;
active = Active;
optionValue = OptionValue;
number_of_options = Number_Of_Options;
@@ -856,13 +855,15 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int *
directKey = DirectKey;
iconName = IconName;
pulldown = Pulldown;
+ optionsSort = OptionsSort;
+ for (unsigned int i = 0; i < number_of_options; i++)
+ options.push_back(&Options[i]);
}
-CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown)
+CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
{
optionNameString = OptionName;
optionName = NONEXISTANT_LOCALE;
- options = Options;
active = Active;
optionValue = OptionValue;
number_of_options = Number_Of_Options;
@@ -870,6 +871,9 @@ CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const Optio
directKey = DirectKey;
iconName = IconName;
pulldown = Pulldown;
+ optionsSort = OptionsSort;
+ for (unsigned int i = 0; i < number_of_options; i++)
+ options.push_back(&Options[i]);
}
int CMenuOptionChooser::getHeight(void) const
@@ -887,6 +891,10 @@ int CMenuOptionChooser::getOptionValue(void) const
return *optionValue;
}
+static bool sortByOptionValue(const CMenuOptionChooser::keyval * a, const CMenuOptionChooser::keyval * b)
+{
+ return (strcasecmp(g_Locale->getText(a->value), g_Locale->getText(b->value)) < 0);
+}
int CMenuOptionChooser::exec(CMenuTarget* parent)
{
@@ -894,6 +902,9 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
bool wantsRepaint = false;
int ret = menu_return::RETURN_NONE;
+ if (optionsSort)
+ sort(options.begin(), options.end(), sortByOptionValue);
+
if (pulldown)
{
int select = -1;
@@ -904,16 +915,16 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
for(unsigned int count = 0; count < number_of_options; count++)
{
bool selected = false;
- if (options[count].key == (*optionValue))
+ if (options[count]->key == (*optionValue))
selected = true;
sprintf(cnt, "%d", count);
- CMenuForwarder *mn_option = new CMenuForwarder(options[count].value, true, NULL, selector, cnt);
+ CMenuForwarder *mn_option = new CMenuForwarder(options[count]->value, true, NULL, selector, cnt);
mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true /*for selected item*/);
menu->addItem(mn_option, selected);
}
ret = menu->exec(parent, "");
if (select >= 0)
- *optionValue = options[select].key;
+ *optionValue = options[select]->key;
else
optionValueChanged = false;
delete menu;
@@ -925,15 +936,15 @@ int CMenuOptionChooser::exec(CMenuTarget* parent)
unsigned int count;
for(count = 0; count < number_of_options; count++)
{
- if (options[count].key == (*optionValue))
+ if (options[count]->key == (*optionValue))
{
- *optionValue = options[(count+1) % number_of_options].key;
+ *optionValue = options[(count+1) % number_of_options]->key;
break;
}
}
// if options are removed optionValue may not exist anymore -> use 1st available option
if ((count == number_of_options) && number_of_options)
- *optionValue = options[0].key;
+ *optionValue = options[0]->key;
paint(true);
}
@@ -953,9 +964,9 @@ int CMenuOptionChooser::paint( bool selected )
neutrino_locale_t option = NONEXISTANT_LOCALE;
for(unsigned int count = 0 ; count < number_of_options; count++)
{
- if (options[count].key == *optionValue)
+ if (options[count]->key == *optionValue)
{
- option = options[count].value;
+ option = options[count]->value;
break;
}
}
@@ -976,7 +987,7 @@ int CMenuOptionChooser::paint( bool selected )
//-------------------------------------------------------------------------------------------------------------------------------
-CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown)
+CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
{
optionName = OptionName;
active = Active;
@@ -985,6 +996,7 @@ CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t Optio
directKey = DirectKey;
iconName = IconName;
pulldown = Pulldown;
+ optionsSort = OptionsSort;
}
int CMenuOptionStringChooser::getHeight(void) const
@@ -1007,12 +1019,20 @@ void CMenuOptionStringChooser::addOption(const char * const value)
options.push_back(std::string(value));
}
+static bool sortByOptionStringValue(const std::string & a, const std::string & b)
+{
+ return (strcasecmp(a.c_str(), b.c_str()) < 0);
+}
+
int CMenuOptionStringChooser::exec(CMenuTarget* parent)
{
bool optionValueChanged = true;
bool wantsRepaint = false;
int ret = menu_return::RETURN_NONE;
+ if (optionsSort)
+ sort(options.begin(), options.end(), sortByOptionStringValue);
+
if (pulldown)
{
int select = -1;
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index ed1545f..9d0a5e3 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -250,14 +250,15 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
};
private:
- const struct keyval * options;
- unsigned number_of_options;
- std::string optionNameString;
- bool pulldown;
+ std::vector<const keyval *> options;
+ unsigned number_of_options;
+ std::string optionNameString;
+ bool pulldown;
+ bool optionsSort;
public:
- CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false);
- CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false);
+ CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false, bool OptionsSort = false);
+ CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false, bool OptionsSort = false);
void setOptionValue(const int newvalue);
int getOptionValue(void) const;
@@ -276,9 +277,10 @@ class CMenuOptionStringChooser : public CMenuItem
std::vector<std::string> options;
CChangeObserver * observ;
bool pulldown;
+ bool optionsSort;
public:
- CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active = false, CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false);
+ CMenuOptionStringChooser(const neutrino_locale_t OptionName, char* OptionValue, bool Active = false, CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false, bool OptionsSort = false);
~CMenuOptionStringChooser();
void addOption(const char * value);
commit f2a5e4bd811f12b333b3f3dca5e09f805af854bf
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jan 4 18:27:55 2014 +0100
Neutrino: fix height calculation in extended input classes
also remove redundant code
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
index 06bc523..3d3be9f 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
@@ -63,18 +63,7 @@ CExtendedInput::CExtendedInput(const neutrino_locale_t Name, char* Value, const
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
iheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight();
- width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true) + 20; // UTF-8
- height = hheight+ mheight+ 20;
-
- if (hint_1 != NONEXISTANT_LOCALE)
- {
- height += iheight;
- if (hint_2 != NONEXISTANT_LOCALE)
- height += iheight;
- }
-
- x = getScreenStartX(width);
- y = getScreenStartY(height);
+ calculateDialog();
}
CExtendedInput::~CExtendedInput()
@@ -96,6 +85,10 @@ void CExtendedInput::calculateDialog()
int maxX = 0;
int maxY = 0;
selectedChar = -1;
+
+ width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true) + 20; // UTF-8
+ height = hheight + mheight + 20;
+
for(unsigned int i=0; i<inputFields.size();i++)
{
inputFields[i]->init( ix, iy);
@@ -111,7 +104,7 @@ void CExtendedInput::calculateDialog()
width = (width > maxX+40) ? width : maxX+40;
height = (height > maxY+hheight+mheight) ? height : maxY+hheight+mheight;
- hintPosY = y + height -10;
+ hintPosY = height + iheight;
if (hint_1 != NONEXISTANT_LOCALE)
{
@@ -127,10 +120,14 @@ void CExtendedInput::calculateDialog()
width = maxX + 40;
height += iheight;
}
+
+ height += 10;
}
x = getScreenStartX(width);
y = getScreenStartY(height);
+
+ hintPosY += y;
}
@@ -411,7 +408,6 @@ CIPInput::CIPInput(const neutrino_locale_t Name, std::string & Value, const neut
: CExtendedInput(Name, IP, Hint_1, Hint_2, Observ)
{
ip = &Value;
- frameBuffer = CFrameBuffer::getInstance();
addInputField( new CExtendedInput_Item_Char("012") );
addInputField( new CExtendedInput_Item_Char("0123456789") );
addInputField( new CExtendedInput_Item_Char("0123456789") );
@@ -468,7 +464,6 @@ CDateInput::CDateInput(const neutrino_locale_t Name, time_t* Time, const neutrin
tmTime->tm_year+1900,
tmTime->tm_hour, tmTime->tm_min);
- frameBuffer = CFrameBuffer::getInstance();
addInputField( new CExtendedInput_Item_Char("0123") );
addInputField( new CExtendedInput_Item_Char("0123456789") );
addInputField( new CExtendedInput_Item_Char(".",false) );
@@ -546,7 +541,6 @@ void CDateInput::onAfterExec()
CMACInput::CMACInput(const neutrino_locale_t Name, char* Value, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, CChangeObserver* Observ)
: CExtendedInput(Name, Value, Hint_1, Hint_2, Observ)
{
- frameBuffer = CFrameBuffer::getInstance();
addInputField( new CExtendedInput_Item_Char("0123456789ABCDEF") );
addInputField( new CExtendedInput_Item_Char("0123456789ABCDEF") );
addInputField( new CExtendedInput_Item_Spacer(20) );
@@ -595,7 +589,6 @@ void CMACInput::onAfterExec()
CTimeInput::CTimeInput(const neutrino_locale_t Name, char* Value, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, CChangeObserver* Observ, bool* Cancel)
: CExtendedInput(Name, Value, Hint_1, Hint_2, Observ, Cancel)
{
- frameBuffer = CFrameBuffer::getInstance();
addInputField( new CExtendedInput_Item_Char("=+-") );
addInputField( new CExtendedInput_Item_Spacer(20) );
addInputField( new CExtendedInput_Item_Char("0123456789") );
@@ -641,7 +634,6 @@ CIntInput::CIntInput(const neutrino_locale_t Name, int& Value, const unsigned in
sprintf(myValueStringOutput,"%*d",m_size,*myValue);
}
- frameBuffer = CFrameBuffer::getInstance();
for (unsigned int i=0;i<Size;i++)
{
addInputField( new CExtendedInput_Item_Char("0123456789 ") );
commit 8fe1818840917f1eb5a7b8d88ed997f1f71e0c61
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jan 3 20:20:09 2014 +0100
Neutrino string input: remove minimum width of 420
the needed width is calculated and so we don't need a minimum value
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
index b6710d0..8d9a626 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
@@ -109,9 +109,6 @@ void CStringInput::init()
cwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("M") + 1;
width = (size * cwidth) + 40;
- if (width<420)
- width = 420;
-
int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true); // UTF-8
if (!iconfile.empty())
{
commit 43154e275f89d4fe3a17a82226ae2abef49faf2e
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 2 23:50:08 2014 +0100
Neutrino moviebrowser: use number chooser with numeric input if possible
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 05457e4..7047bfe 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -3042,9 +3042,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
CStringInputSMS epgUserInput(LOCALE_MOVIEBROWSER_INFO_INFO1, &movie_info->epgInfo1, MAX_STRING, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
CDateInput dateUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->dateOfLastPlay);
CDateInput recUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->file.Time);
- CIntInput lengthUserIntInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, (int&)movie_info->length, 3);
CStringInputSMS countryUserInput(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movie_info->productionCountry, 11, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
- CIntInput yearUserIntInput(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, (int&)movie_info->productionDate, 4);
CMenuWidget movieInfoMenu(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD, NEUTRINO_ICON_STREAMING, m_cBoxFrame.iWidth);
movieInfoMenu.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD);
@@ -3058,9 +3056,9 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movie_info->quality, true, 0, 3, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5));
movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true,NULL, CRCInput::RC_6, NEUTRINO_ICON_BUTTON_6 ));
- movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, true, yearUserIntInput.getValue(), &yearUserIntInput,NULL, CRCInput::RC_7, NEUTRINO_ICON_BUTTON_7));
+ movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, &movie_info->productionDate, true, 0, 9999, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_7, NEUTRINO_ICON_BUTTON_7, true));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, true, movie_info->productionCountry, &countryUserInput,NULL, CRCInput::RC_8, NEUTRINO_ICON_BUTTON_8));
- movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_LENGTH, true, lengthUserIntInput.getValue(), &lengthUserIntInput,NULL, CRCInput::RC_9, NEUTRINO_ICON_BUTTON_9));
+ movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->length, true, 0, 999, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_9, NEUTRINO_ICON_BUTTON_9, true));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_CHANNEL, true, movie_info->epgChannel, &channelUserInput,NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0));//LOCALE_TIMERLIST_CHANNEL
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PATH, false, dirItNr)); //LOCALE_TIMERLIST_RECORDING_DIR
@@ -3150,26 +3148,18 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
/********************************************************************/
/** optionsMenuBrowser **************************************************/
- CIntInput playMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int&) m_settings.lastPlayMaxItems, 3);
- CIntInput recMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int&) m_settings.lastRecordMaxItems, 3);
- CIntInput browserFrameUserIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int&) m_settings.browserFrameHeight, 4);
- CIntInput browserRowNrIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int&) m_settings.browserRowNr, 1);
- CIntInput* browserRowWidthIntInput[MB_MAX_ROWS];
- for(i=0; i<MB_MAX_ROWS ;i++)
- browserRowWidthIntInput[i] = new CIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_WIDTH,(int&) m_settings.browserRowWidth[i], 3);
-
CMenuWidget optionsMenuBrowser(LOCALE_EPGPLUS_OPTIONS, NEUTRINO_ICON_STREAMING, 480);
optionsMenuBrowser.addIntroItems(LOCALE_MOVIEBROWSER_OPTION_BROWSER);
- optionsMenuBrowser.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, true, playMaxUserIntInput.getValue(), &playMaxUserIntInput));
- optionsMenuBrowser.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, true, recMaxUserIntInput.getValue(), &recMaxUserIntInput));
- optionsMenuBrowser.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, true, browserFrameUserIntInput.getValue(), &browserFrameUserIntInput));
+ optionsMenuBrowser.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, &m_settings.lastPlayMaxItems, true, 0, 999, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true));
+ optionsMenuBrowser.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, &m_settings.lastRecordMaxItems, true, 0, 999, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true));
+ optionsMenuBrowser.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, &m_settings.browserFrameHeight, true, MIN_BROWSER_FRAME_HEIGHT, MAX_BROWSER_FRAME_HEIGHT, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true));
optionsMenuBrowser.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_BROWSER_ROW_HEAD));
- optionsMenuBrowser.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, true, browserRowNrIntInput.getValue(), &browserRowNrIntInput));
+ optionsMenuBrowser.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, &m_settings.browserRowNr, true, 1, MB_MAX_ROWS, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true));
for(i=0; i<MB_MAX_ROWS; i++)
{
optionsMenuBrowser.addItem(GenericMenuSeparator);
optionsMenuBrowser.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_ROW_ITEM, (int*)(&m_settings.browserRowItem[i]), MESSAGEBOX_BROWSER_ROW_ITEM, MESSAGEBOX_BROWSER_ROW_ITEM_COUNT, true ));
- optionsMenuBrowser.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_WIDTH, true, browserRowWidthIntInput[i]->getValue(), browserRowWidthIntInput[i]));
+ optionsMenuBrowser.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_BROWSER_ROW_WIDTH, &m_settings.browserRowWidth[i], true, 10, 500, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true));
}
/********************************************************************/
@@ -3216,21 +3206,6 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
// post menu handling
if (m_parentalLock != MB_PARENTAL_LOCK_OFF_TMP)
m_settings.parentalLock = m_parentalLock;
- if(m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT )
- m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT;
- if(m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT)
- m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT;
- if (m_settings.browserRowNr > MB_MAX_ROWS )
- m_settings.browserRowNr = MB_MAX_ROWS;
- if (m_settings.browserRowNr < 1 )
- m_settings.browserRowNr = 1;
- for(i = 0; i < m_settings.browserRowNr; i++)
- {
- if( m_settings.browserRowWidth[i] >500)
- m_settings.browserRowWidth[i] = 500;
- if( m_settings.browserRowWidth[i] < 10)
- m_settings.browserRowWidth[i] = 10;
- }
if(dirMenu.isChanged())
loadMovies();
@@ -3248,9 +3223,6 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
delete notifier[i];
}
- for(i=0; i<MB_MAX_ROWS ;i++)
- delete browserRowWidthIntInput[i];
-
delete movieHelp;
#ifdef ENABLE_GUI_MOUNT
//delete nfs;
commit 3786468a38aaf2950271e58a1928a0eb80d4af5d
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 2 22:58:32 2014 +0100
Neutrino: consider width of hints when calculating width in input classes
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
index 8d319d9..b6710d0 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp
@@ -128,11 +128,21 @@ void CStringInput::init()
iheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight();
height = hheight+ mheight+ 50;
+
if (hint_1 != NONEXISTANT_LOCALE)
{
+ neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true); // UTF-8
+ if (neededWidth + 40 > width)
+ width = neededWidth + 40;
height += iheight;
+
if (hint_2 != NONEXISTANT_LOCALE)
+ {
+ neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true); // UTF-8
+ if (neededWidth + 40 > width)
+ width = neededWidth + 40;
height += iheight;
+ }
}
x = getScreenStartX(width);
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
index f0d1f91..06bc523 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
@@ -115,9 +115,18 @@ void CExtendedInput::calculateDialog()
if (hint_1 != NONEXISTANT_LOCALE)
{
+ maxX = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true); // UTF-8
+ if (maxX + 40 > width)
+ width = maxX + 40;
height += iheight;
+
if (hint_2 != NONEXISTANT_LOCALE)
+ {
+ maxX = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true); // UTF-8
+ if (maxX + 40 > width)
+ width = maxX + 40;
height += iheight;
+ }
}
x = getScreenStartX(width);
commit 8cb92833fd1e3446283196fda839df8e8a2a5421
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 2 20:13:54 2014 +0100
Neutrino: add possibility to use numeric input in number chooser
based on idea by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 5f350d7..4f246af 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -47,6 +47,7 @@
#include <gui/color.h>
#include <gui/widget/stringinput.h>
+#include <gui/widget/stringinput_ext.h>
#include <global.h>
#include <neutrino.h>
@@ -732,7 +733,7 @@ void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_
}
//-------------------------------------------------------------------------------------------------------------------------------
-CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, const char * non_localized_name, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName)
+CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, const char * non_localized_name, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool NumericInput)
{
optionName = name;
active = Active;
@@ -752,6 +753,7 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name,
directKey = DirectKey;
iconName = IconName;
+ numeric_input = NumericInput;
numberFormat = "%d";
}
@@ -765,18 +767,44 @@ int CMenuOptionNumberChooser::getHeight(void) const
return g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
}
-int CMenuOptionNumberChooser::exec(CMenuTarget*)
+int CMenuOptionNumberChooser::exec(CMenuTarget* parent)
{
+ bool optionValueNotChanged = false;
bool wantsRepaint = false;
int ret = menu_return::RETURN_NONE;
- if (((*optionValue) >= upper_bound) || ((*optionValue) < lower_bound))
- *optionValue = lower_bound;
+ if (numeric_input)
+ {
+ int size = 0;
+ int b = lower_bound;
+ if (b < 0)
+ {
+ size++;
+ b = -b;
+ }
+ if (b < upper_bound)
+ b = upper_bound;
+ for (; b; b /= 10, size++);
+ CIntInput cii(optionName, *optionValue, size, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, NULL, &optionValueNotChanged);
+ ret = cii.exec(parent, "");
+ if (!optionValueNotChanged)
+ {
+ if (*optionValue > upper_bound)
+ *optionValue = upper_bound;
+ else if (*optionValue < lower_bound)
+ *optionValue = lower_bound;
+ }
+ }
else
- (*optionValue)++;
- paint(true);
+ {
+ if (((*optionValue) >= upper_bound) || ((*optionValue) < lower_bound))
+ *optionValue = lower_bound;
+ else
+ (*optionValue)++;
+ paint(true);
+ }
- if (observ)
+ if (observ && !optionValueNotChanged)
wantsRepaint = observ->changeNotify(optionName, optionValue);
if (wantsRepaint)
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index b6ce62e..ed1545f 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -227,10 +227,11 @@ class CMenuOptionNumberChooser : public CAbstractMenuOptionChooser
int localized_value;
neutrino_locale_t localized_value_name;
+ bool numeric_input;
std::string numberFormat;
public:
- CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, const char * non_localized_name = NULL, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName = "");
+ CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, const char * non_localized_name = NULL, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName = "", bool NumericInput = false);
void setNumberFormat(const std::string &format);
int paint(bool selected);
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
index f7257ab..f0d1f91 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
+++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp
@@ -614,8 +614,8 @@ void CTimeInput::onAfterExec()
}
//-----------------------------#################################-------------------------------------------------------
-CIntInput::CIntInput(const neutrino_locale_t Name, int& Value, const unsigned int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, CChangeObserver* Observ)
- : CExtendedInput(Name, myValueStringInput, Hint_1, Hint_2, Observ)
+CIntInput::CIntInput(const neutrino_locale_t Name, int& Value, const unsigned int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, CChangeObserver* Observ, bool* Cancel)
+ : CExtendedInput(Name, myValueStringInput, Hint_1, Hint_2, Observ, Cancel)
{
myValue = &Value;
diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.h b/tuxbox/neutrino/src/gui/widget/stringinput_ext.h
index 5742695..5d281d3 100644
--- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.h
+++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.h
@@ -220,7 +220,7 @@ class CIntInput : public CExtendedInput
/**
*@param Size how many digits can be entered
*/
- CIntInput(const neutrino_locale_t Name, int& Value, const unsigned int Size, const neutrino_locale_t Hint_1 = NONEXISTANT_LOCALE, const neutrino_locale_t Hint_2 = NONEXISTANT_LOCALE, CChangeObserver* Observ = NULL);
+ CIntInput(const neutrino_locale_t Name, int& Value, const unsigned int Size, const neutrino_locale_t Hint_1 = NONEXISTANT_LOCALE, const neutrino_locale_t Hint_2 = NONEXISTANT_LOCALE, CChangeObserver* Observ = NULL, bool* cancel = NULL);
char* getValue() {
return myValueStringOutput;
}
commit a71d8db768f03531e132e8342f1243646b7bd028
Author: Christian Schuett <Gau...@ho...>
Date: Thu Jan 2 16:20:31 2014 +0100
Neutrino: add change observer to number chooser
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index a617678..05457e4 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -3056,7 +3056,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_INFO1, true, movie_info->epgInfo1, &epgUserInput,NULL, CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3));
movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true, NULL, CRCInput::RC_4, NEUTRINO_ICON_BUTTON_4, true));
movieInfoMenu.addItem(GenericMenuSeparatorLine);
- movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movie_info->quality, true, 0, 3, 0, 0, NONEXISTANT_LOCALE, NULL, CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5));
+ movieInfoMenu.addItem( new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movie_info->quality, true, 0, 3, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5));
movieInfoMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true,NULL, CRCInput::RC_6, NEUTRINO_ICON_BUTTON_6 ));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, true, yearUserIntInput.getValue(), &yearUserIntInput,NULL, CRCInput::RC_7, NEUTRINO_ICON_BUTTON_7));
movieInfoMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, true, movie_info->productionCountry, &countryUserInput,NULL, CRCInput::RC_8, NEUTRINO_ICON_BUTTON_8));
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 473b8f4..5f350d7 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -732,7 +732,7 @@ void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_
}
//-------------------------------------------------------------------------------------------------------------------------------
-CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, const char * non_localized_name, const neutrino_msg_t DirectKey, const std::string & IconName)
+CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, const char * non_localized_name, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName)
{
optionName = name;
active = Active;
@@ -748,6 +748,7 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name,
optionString = non_localized_name;
+ observ = Observ;
directKey = DirectKey;
iconName = IconName;
@@ -766,14 +767,22 @@ int CMenuOptionNumberChooser::getHeight(void) const
int CMenuOptionNumberChooser::exec(CMenuTarget*)
{
+ bool wantsRepaint = false;
+ int ret = menu_return::RETURN_NONE;
+
if (((*optionValue) >= upper_bound) || ((*optionValue) < lower_bound))
*optionValue = lower_bound;
else
(*optionValue)++;
-
paint(true);
- return menu_return::RETURN_NONE;
+ if (observ)
+ wantsRepaint = observ->changeNotify(optionName, optionValue);
+
+ if (wantsRepaint)
+ ret = menu_return::RETURN_REPAINT;
+
+ return ret;
}
int CMenuOptionNumberChooser::paint(bool selected)
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index 269a580..b6ce62e 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -207,6 +207,7 @@ class CAbstractMenuOptionChooser : public CMenuItem
protected:
neutrino_locale_t optionName;
int * optionValue;
+ CChangeObserver * observ;
bool isSelectable(void) const
{
@@ -229,7 +230,7 @@ class CMenuOptionNumberChooser : public CAbstractMenuOptionChooser
std::string numberFormat;
public:
- CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, const char * non_localized_name = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName = "");
+ CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, const char * non_localized_name = NULL, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName = "");
void setNumberFormat(const std::string &format);
int paint(bool selected);
@@ -250,8 +251,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
private:
const struct keyval * options;
unsigned number_of_options;
- CChangeObserver * observ;
- std::string optionNameString;
+ std::string optionNameString;
bool pulldown;
public:
commit 4a3f2ddd2c88f156543ae75e72a537f6b68e3af2
Author: Christian Schuett <Gau...@ho...>
Date: Wed Jan 1 23:00:55 2014 +0100
Neutrino: add some default values to constructors of input classes
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/drive_setup.cpp b/tuxbox/neutrino/src/gui/drive_setup.cpp
index a08b1e1..d854580 100644
--- a/tuxbox/neutrino/src/gui/drive_setup.cpp
+++ b/tuxbox/neutrino/src/gui/drive_setup.cpp
@@ -1257,7 +1257,7 @@ void CDriveSetup::showHddSetupSub()
#ifdef ENABLE_NFSSERVER
//prepare option host input
- nfs_host_ip[i] = new CIPInput(LOCALE_DRIVE_SETUP_PARTITION_NFS_HOST_IP , d_settings.drive_partition_nfs_host_ip[current_device][i], LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2);
+ nfs_host_ip[i] = new CIPInput(LOCALE_DRIVE_SETUP_PARTITION_NFS_HOST_IP , d_settings.drive_partition_nfs_host_ip[current_device][i]);
//prepare option nfs
nfs_host_ip_fw[i] = new CMenuForwarder(LOCALE_DRIVE_SETUP_PARTITION_NFS_HOST_IP, d_settings.drive_partition_nfs[current_device][i], d_settings.drive_partition_nfs_host_ip[current_device][i], nfs_host_ip[i], NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1 );
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index 6c9e6c9..a617678 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -2803,7 +2803,7 @@ void CMovieBrowser::updateFilterSelection(void)
else if(m_settings.filter.item == MB_INFO_INFO2)
{
std::string text;
- CStringInputSMS stringInputSMS(LOCALE_MOVIEBROWSER_INFO_INFO2, &text, 20, true, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-.: ");
+ CStringInputSMS stringInputSMS(LOCALE_MOVIEBROWSER_INFO_INFO2, &text, 20, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-.: ");
stringInputSMS.exec(NULL,"");
m_settings.filter.optionString = text;
refreshFilterList();
@@ -2992,7 +2992,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
/********************************************************************/
/** serie******************************************************/
- CStringInputSMS serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20, true, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
+ CStringInputSMS serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_INFO_HEAD, NEUTRINO_ICON_STREAMING);
serieMenu.addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
@@ -3037,14 +3037,14 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
snprintf(size,BUFFER_SIZE,"%5llu",movie_info->file.Size>>20);
}
- CStringInputSMS titelUserInput(LOCALE_MOVIEBROWSER_INFO_TITLE, &movie_info->epgTitle, MAX_STRING, true, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
- CStringInputSMS channelUserInput(LOCALE_MOVIEBROWSER_INFO_CHANNEL, &movie_info->epgChannel, MAX_STRING, true, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
- CStringInputSMS epgUserInput(LOCALE_MOVIEBROWSER_INFO_INFO1, &movie_info->epgInfo1, MAX_STRING, true, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& ");
- CDateInput dateUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->dateOfLastPlay, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY);
- CDateInput recUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->file.Time, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY);
- CIntInput lengthUserIntInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, (int&)movie_info->length, 3, LOCALE_GENERIC_EMPTY, LOCALE_GENERIC_EMPTY);
- CStringInputSMS countryUserInput(LOCALE_MOVIEBROWSER_INFO_PRODCOU...
[truncated message content] |
|
From: Thilo G. <tux...@ne...> - 2013-12-13 07:22:20
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via c213938731574d429405adecb4c1d4881063d24c (commit)
via b1ed47162e1f22fa7b5d2bbcbb06414f0f124f56 (commit)
via 2cbe7020d18dac9a64b2b8ed4ee1454ce8becfb3 (commit)
via 238882091b3a2d36f4acac0acfd3795b265b9083 (commit)
via 4fd31489309280bd400c0e7cd0fab606688097f7 (commit)
from e5d7bf233791791d64b7dd0a5cbb7c60e7298ec7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c213938731574d429405adecb4c1d4881063d24c
Author: Christian Schuett <Gau...@ho...>
Date: Thu Dec 12 21:46:51 2013 +0100
nhttpd yParser: speed up getting current bouquet number
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
index 06af831..9f9f45d 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp
@@ -239,17 +239,18 @@ std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler *
std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler */*hh*/, std::string /*para*/)
{
CZapitClient::BouquetChannelList *bouquet;
- int actual=0;
+ int actual = 0;
int mode = CZapitClient::MODE_CURRENT;
+ t_channel_id current_channel_id = NeutrinoAPI->Zapit->getCurrentServiceID();
- for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size() && actual == 0;i++)
+ for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size() && actual == 0; i++)
{
bouquet = NeutrinoAPI->GetBouquet((NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, mode);
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
for (unsigned int j = 0; channel != bouquet->end() && actual == 0; ++channel, j++)
{
- if(channel->channel_id == NeutrinoAPI->Zapit->getCurrentServiceID())
- actual=i+1;
+ if (channel->channel_id == current_channel_id)
+ actual = i + 1;
}
}
return std::string(itoa(actual));
@@ -261,7 +262,6 @@ std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler */*h
std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler */*hh*/, std::string para)
{
CZapitClient::BouquetChannelList *bouquet;
- CZapitClient::BouquetList blist;
std::string abouquet, achannel_id, yresult, sel, sid;
int bnumber = 1;
commit b1ed47162e1f22fa7b5d2bbcbb06414f0f124f56
Author: Christian Schuett <Gau...@ho...>
Date: Wed Dec 11 22:21:53 2013 +0100
Neutrino english.locale: change 'menue' to 'menu'
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index 425083f..f99c80b 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -791,9 +791,9 @@ motorcontrol.goto_reference_position Goto Reference Position
motorcontrol.head Motor-Setup
motorcontrol.increase_motor_position Increase Motor Position (a)
motorcontrol.increase_step_size Increase Step Size (c)
-motorcontrol.installer_menue Installer Menue
+motorcontrol.installer_menue Installer Menu
motorcontrol.not_defined Not Defined
-motorcontrol.rc_menuehead RC-Menue
+motorcontrol.rc_menuehead RC-Menu
motorcontrol.re_calculate_positions (Re)-Calculate Positions
motorcontrol.set_east_soft_limit Set East (soft) Limit
motorcontrol.set_west_soft_limit Set West (soft) Limit
@@ -804,7 +804,7 @@ motorcontrol.step_drive_motor_halt Halt Motor
motorcontrol.step_drive_motor_west Step/Drive Motor West (b,c)
motorcontrol.store_motor_position Store Motor Position
motorcontrol.switch_step_drive_mode Switch Step/Drive Mode (b)
-motorcontrol.user_menue User Menue
+motorcontrol.user_menue User Menu
moviebrowser.book_clear_all Clear all
moviebrowser.book_head Bookmarks
moviebrowser.book_lastmoviestop Last play stop:
commit 2cbe7020d18dac9a64b2b8ed4ee1454ce8becfb3
Author: Christian Schuett <Gau...@ho...>
Date: Wed Dec 11 21:33:53 2013 +0100
nhttpd controlapi: add possibility to get TV or radio bouquets only
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 9b336bf..8495f2f 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -988,10 +988,10 @@ Beispiel:<br>
<div class="title1"><a name="getbouquets"></a>15. Bouquetlist abfragen</div>
<div class="URL">Handler: http://dbox/control/getbouquets</div>
<br>
-<b>Parameter:</b> <br>
+<b>Parameter:</b> mode=current|TV|RADIO|all, showhidden=true|false<br>
<b>Rückgabe:</b><br>
<br>
-Es werden alle Bouquets zurückgeliefert<br>
+Es werden nur TV-, nur Radio- oder alle Bouquets zurückgeliefert.<br>
<div class="example">
Beispiel:<br>
<br>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 3ff88f4..1c93020 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -1119,8 +1119,31 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
//-----------------------------------------------------------------------------
void CControlAPI::GetBouquetsCGI(CyhookHandler *hh)
{
- for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size();i++)
- hh->printf("%u %s\n", (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, NeutrinoAPI->BouquetList[i].name);
+ int mode = CZapitClient::MODE_ALL;
+ if (!hh->ParamList["mode"].empty())
+ {
+ if (hh->ParamList["mode"].compare("current") == 0)
+ mode = CZapitClient::MODE_CURRENT;
+ else if (hh->ParamList["mode"].compare("TV") == 0)
+ mode = CZapitClient::MODE_TV;
+ else if (hh->ParamList["mode"].compare("RADIO") == 0)
+ mode = CZapitClient::MODE_RADIO;
+ }
+
+ bool show_hidden = true;
+ if (!hh->ParamList["showhidden"].empty() && hh->ParamList["showhidden"] == "false")
+ show_hidden = false;
+
+ unsigned int bouquet_nr;
+ for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size(); i++)
+ {
+ bouquet_nr = (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1;
+ if ((show_hidden || !NeutrinoAPI->BouquetList[i].hidden) &&
+ (mode == CZapitClient::MODE_ALL || !NeutrinoAPI->GetBouquet(bouquet_nr, mode)->empty()))
+ {
+ hh->printf("%u %s\n", bouquet_nr, NeutrinoAPI->BouquetList[i].name);
+ }
+ }
}
//-----------------------------------------------------------------------------
commit 238882091b3a2d36f4acac0acfd3795b265b9083
Author: Christian Schuett <Gau...@ho...>
Date: Wed Dec 11 20:02:21 2013 +0100
nhttpd controlapi: speed up getting current bouquet number
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 0148c55..3ff88f4 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -991,7 +991,6 @@ void CControlAPI::ChannellistCGI(CyhookHandler *hh)
void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
{
CZapitClient::BouquetChannelList *bouquet;
- CZapitClient::BouquetList blist;
if (!(hh->ParamList.empty()))
{
@@ -1001,24 +1000,25 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
{
if (hh->ParamList["mode"].compare("TV") == 0)
mode = CZapitClient::MODE_TV;
- if (hh->ParamList["mode"].compare("RADIO") == 0)
+ else if (hh->ParamList["mode"].compare("RADIO") == 0)
mode = CZapitClient::MODE_RADIO;
}
// Get Bouquet Number. First matching current channel
if (hh->ParamList["1"] == "actual")
{
- int actual=0;
+ int actual = 0;
+ t_channel_id current_channel_id = NeutrinoAPI->Zapit->getCurrentServiceID();
//easier?
- for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size() && actual == 0;i++)
+ for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size() && actual == 0; i++)
{
//hh->printf("%u %s\n", (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, NeutrinoAPI->BouquetList[i].name);
bouquet = NeutrinoAPI->GetBouquet((NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, mode);
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
for (unsigned int j = 0; channel != bouquet->end() && actual == 0; ++channel, j++)
{
- if(channel->channel_id == NeutrinoAPI->Zapit->getCurrentServiceID())
- actual=i+1;
+ if (channel->channel_id == current_channel_id)
+ actual = i + 1;
}
}
hh->printf("%d",actual);
@@ -1030,6 +1030,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
hh->printf("<bouquet>\n\t<bnumber>%s</bnumber>\n</bouquet>\n",hh->ParamList["bouquet"].c_str());
bouquet = NeutrinoAPI->GetBouquet(atoi(hh->ParamList["bouquet"].c_str()), mode);
+ t_channel_id current_channel_id = NeutrinoAPI->Zapit->getCurrentServiceID();
CZapitClient::BouquetChannelList::iterator channel = bouquet->begin();
for (unsigned int i = 0; channel != bouquet->end(); ++channel, i++)
@@ -1045,7 +1046,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
if (!(hh->ParamList["epg"].empty()))
{
hh->Write("\t<isActiveChannel>");
- hh->Write((channel->channel_id == NeutrinoAPI->Zapit->getCurrentServiceID()) ? "true" : "false");
+ hh->Write((channel->channel_id == current_channel_id) ? "true" : "false");
hh->WriteLn("</isActiveChannel>");
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
commit 4fd31489309280bd400c0e7cd0fab606688097f7
Author: [CST] Focus <foc...@gm...>
Date: Thu Dec 5 19:03:55 2013 +0100
Neutrino CScanTs: fix memleak
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/scan.cpp b/tuxbox/neutrino/src/gui/scan.cpp
index e896052..ef3afc5 100644
--- a/tuxbox/neutrino/src/gui/scan.cpp
+++ b/tuxbox/neutrino/src/gui/scan.cpp
@@ -314,10 +314,10 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
}
break;
default:
- if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
- delete [] (unsigned char*) data;
break;
}
+ if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
+ delete [] (unsigned char*) data;
return msg;
}
-----------------------------------------------------------------------
Summary of changes:
.../daemons/nhttpd/doc/nhttpd_controlapi.html | 4 +-
.../daemons/nhttpd/tuxboxapi/controlapi.cpp | 42 +++++++++++++++----
.../daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp | 10 ++--
tuxbox/neutrino/data/locale/english.locale | 6 +-
tuxbox/neutrino/src/gui/scan.cpp | 4 +-
5 files changed, 45 insertions(+), 21 deletions(-)
--
Tuxbox-GIT: apps
|