[mythtv] [PATCH] Server Status Episode Descriptions
Brett Lucey
brett at happykoala.com
Sun Nov 9 04:30:57 EST 2003
Ok... that was much easier than I suspect, so sorry for firing off two
emails to the list in such a short time... here's the patch reworked:
-Brett
Index: programs/mythbackend/mainserver.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/mainserver.cpp,v
retrieving revision 1.88
diff -u -r1.88 mainserver.cpp
--- programs/mythbackend/mainserver.cpp 1 Nov 2003 18:08:35 -0000 1.88
+++ programs/mythbackend/mainserver.cpp 9 Nov 2003 09:31:28 -0000
@@ -2447,10 +2447,20 @@
}
else
{
+
os << "<P>The next " << iNum << " show" << (iNum == 1 ? "" : "s" )
<< " that " << (iNum == 1 ? "is" : "are")
<< " scheduled for recording:<BR>\r\n";
+ os << "<Script language=JavaScript>";
+ os << "function dispDesc(txt) {\r\n";
+ os << "wnd=window.open(\"\", \"min\",\"width=250 height=180\");";
+ os << "wnd.document.write(\"<font face=helvetica size=-1>\");";
+ os << "wnd.document.write(txt);";
+ os << "wnd.document.write(\"</font>\");";
+ os << "}";
+ os << "</script>";
+
os << "<TABLE BORDER WIDTH=80%>\r\n";
os << "<TR><TH>Start
Time</TH><TH>Show</TH><TH>Encoder</TH></TR>\r\n";
list<ProgramInfo *>::iterator iter = recordinglist->begin();
@@ -2464,10 +2474,14 @@
}
else
{
+ QString qstrDescription = (*iter)->description;
+ QUrl::encode(qstrDescription);
os << "<TR " << ((i % 2 == 0) ? "BGCOLOR=EEEEEE" : "") <<
">"
<< "<TD>" << ((*iter)->startts).toString(shortdateformat)
<< " " << ((*iter)->startts).toString(timeformat) <<
"</TD>"
- << "<TD>" << (*iter)->title << "</TD>"
+ << "<TD>" << "<a href=\"javascript:dispDesc('" <<
+ qstrDescription << "')\">"
+ << (*iter)->title << "</a></TD>"
<< "<TD>" << (*iter)->cardid << "</TD></TR>\r\n";
}
}
More information about the mythtv-dev
mailing list