<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Here's a quick patch which will allow you
to click on a program title (in the web status screen) to pop-up the description
of the episode being taped.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>-Brett</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Index:
programs/mythbackend/mainserver.cpp<BR>===================================================================<BR>RCS
file:
/var/lib/mythcvs/mythtv/programs/mythbackend/mainserver.cpp,v<BR>retrieving
revision 1.88<BR>diff -u -r1.88 mainserver.cpp<BR>---
programs/mythbackend/mainserver.cpp 1 Nov 2003 18:08:35
-0000 1.88<BR>+++
programs/mythbackend/mainserver.cpp 9 Nov 2003 06:15:11 -0000<BR>@@ -2356,6
+2356,37 @@<BR>
playbackList.push_back(masterServer);<BR> }</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>+string MainServer::escapeString(string
source)<BR>+{<BR>+ unsigned int i;<BR>+ string result =
"";<BR>+<BR>+ for (i = 0; i < source.length(); i++)
{<BR>+<BR>+ switch(source[i])
{<BR>+<BR>+ case
'\\':<BR>+
result += "<A>\\\\</A>";
break;<BR>+ case
'>':<BR>+
result += "&gt;";
break;<BR>+ case
'<':<BR>+
result += "&lt;";
break;<BR>+ case
'&':<BR>+
result += "&amp;";
break;<BR>+ case
'\"':<BR>+
result += "&quot;";
break;<BR>+ case
'\'':<BR>+
result += "<A>\\\'</A>";
break;<BR>+
default:<BR>+
result += source[i];<BR>+ }<BR>+
}<BR>+<BR>+ return result;<BR>+}<BR>+<BR>+<BR>+<BR> void
MainServer::PrintStatus(QSocket *socket)<BR> {<BR>
QTextStream os(socket);<BR>@@ -2451,6 +2482,15
@@<BR> << "
that " << (iNum == 1 ? "is" :
"are")<BR> <<
" scheduled for recording:<BR>\r\n";</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2>+ os
<< "<Script
language=JavaScript>";<BR>+ os <<
"function dispDesc(txt) {\r\n";<BR>+ os
<< "wnd=window.open(\"\", \"min\",\"width=250
height=180\");";<BR>+ os <<
"wnd.document.write(\"<font face=helvetica
size=-1>\");";<BR>+ os <<
"wnd.document.write(txt);";<BR>+ os <<
"wnd.document.write(\"</font>\");";<BR>+
os << "}";<BR>+ os <<
"</script>";<BR>+<BR> os
<< "<TABLE BORDER
WIDTH=80%>\r\n";<BR> os <<
"<TR><TH>Start
Time</TH><TH>Show</TH><TH>Encoder</TH></TR>\r\n";<BR>
list<ProgramInfo *>::iterator iter = recordinglist->begin();<BR>@@
-2467,7 +2507,9
@@<BR>
os << "<TR " << ((i % 2 == 0) ? "BGCOLOR=EEEEEE" : "") <<
">"<BR>
<< "<TD>" <<
((*iter)->startts).toString(shortdateformat)<BR>
<< " " << ((*iter)->startts).toString(timeformat) <<
"</TD>"<BR>-
<< "<TD>" << (*iter)->title <<
"</TD>"<BR>+
<< "<TD>" << "<a href=\"javascript:dispDesc('"
<<<BR>+
escapeString((*iter)->description) <<
"')\">"<BR>+
<< (*iter)->title <<
"</a></TD>"<BR>
<< "<TD>" << (*iter)->cardid <<
"</TD></TR>\r\n";<BR>
}<BR> }<BR>Index:
programs/mythbackend/mainserver.h<BR>===================================================================<BR>RCS
file: /var/lib/mythcvs/mythtv/programs/mythbackend/mainserver.h,v<BR>retrieving
revision 1.35<BR>diff -u -r1.35 mainserver.h<BR>---
programs/mythbackend/mainserver.h 1 Nov 2003 18:08:35
-0000 1.35<BR>+++
programs/mythbackend/mainserver.h 9 Nov 2003 06:15:11 -0000<BR>@@
-29,6 +29,7 @@<BR> ~MainServer();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2> void
customEvent(QCustomEvent *e);<BR>+ string
escapeString(string);<BR> void PrintStatus(QSocket
*socket);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2> void
ProcessRequest(QSocket *sock);<BR></FONT></DIV></BODY></HTML>