[mythtv] [patch] lcddevice.cpp : unwanted progress bar
Dan Wilga
dwilga at MtHolyoke.edu
Mon Feb 7 21:40:10 UTC 2005
I have an Ahanix Dvine D5 case, which has a builtin 2x16 VFD.
Whenever I watch a recording or live TV, MythTV correctly displays
the channel name on the first line, and the program name/episode
title on the second line.
The problem is that to the left of the channel name, there is also
what looks like the letter "L". I figured out this is actually a
progress bar character that LCDproc leaves there, apparently because
the string of text that is being drawn over it is centered, but not
the entire width of the display.
Since, as far as I can tell, Myth never uses the first line to
display a progress bar, in the enclosed patch I simply skip the
installation of this widget if there are 2 or fewer lines in the
display. Perhaps it should never be initialized, I don't know; I only
have this one type of display to test with.
Or, alternately, perhaps a string of exactly 16 (the display width)
characters (space-padded) should be sent to LCDproc, to overwrite the
unused progress bar.
--
Dan Wilga dwilga at mtholyoke.edu
Web Administrator http://www.mtholyoke.edu
Mount Holyoke College Tel: 413-538-3027
South Hadley, MA 01075 "Who left the cake out in the rain?"
-------------- next part --------------
--- libs/libmyth/lcddevice.orig 2005-01-16 17:05:41.000000000 -0500
+++ libs/libmyth/lcddevice.cpp 2005-01-16 17:08:22.000000000 -0500
@@ -402,11 +402,12 @@
sendToServer("widget_del Channel heartbeat");
sendToServer("screen_set Channel priority 255");
sendToServer("screen_set Channel backlight on");
sendToServer("widget_add Channel topWidget string");
sendToServer("widget_add Channel botWidget string");
- sendToServer("widget_add Channel progressBar hbar");
+ if (lcdHeight > 2)
+ sendToServer("widget_add Channel progressBar hbar");
// The Generic Screen
sendToServer("screen_add Generic");
sendToServer("widget_del Generic heartbeat");
@@ -1323,15 +1324,17 @@
}
void LCD::outputChannel()
{
QString aString;
- aString = "widget_set Channel progressBar 1 ";
- aString += QString::number(lcdHeight);
- aString += " ";
- aString += QString::number((int)rint(progress * lcdWidth * cellWidth));
- sendToServer(aString);
+ if (lcdHeight > 2) {
+ aString = "widget_set Channel progressBar 1 ";
+ aString += QString::number(lcdHeight);
+ aString += " ";
+ aString += QString::number((int)rint(progress * lcdWidth *
cellWidth));
+ sendToServer(aString);
+ }
}
void LCD::outputGeneric()
{
QString aString;
@@ -1424,11 +1427,12 @@
{
stopAll();
// Remove all the widgets and screens for a clean exit from the server
- sendToServer("widget_del Channel progressBar");
+ if (lcdHeight > 2)
+ sendToServer("widget_del Channel progressBar");
sendToServer("widget_del Channel topWidget");
sendToServer("screen_del Channel");
sendToServer("widget_del Generic progressBar");
sendToServer("widget_del Generic textWidget1");
More information about the mythtv-dev
mailing list