[mythtv] [patch][updated]prolong active time of LCD menu

Leo Weppelman leo at wau.mis.ah.nl
Thu Oct 14 09:01:12 UTC 2004


The previous version of the patch made the menu popup on the LCD-device
for 30 second. The patch is revamped to make the popup time configurable.

I hope this makes (nearly) everyone happy ;-)

Leo.
-------------- next part --------------
Index: mythtv/libs/libmyth/lcddevice.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/lcddevice.cpp,v
retrieving revision 1.31
diff -u -r1.31 lcddevice.cpp
--- mythtv/libs/libmyth/lcddevice.cpp	19 Aug 2004 01:36:30 -0000	1.31
+++ mythtv/libs/libmyth/lcddevice.cpp	14 Oct 2004 08:50:28 -0000
@@ -314,6 +314,8 @@
     lcd_showvolume=(gContext->GetSetting("LCDShowVolume", "1")=="1");
     lcd_showmenu=(gContext->GetSetting("LCDShowMenu", "1")=="1");
     lcd_backlighton=(gContext->GetSetting("LCDBacklightOn", "1")=="1");
+    aString = gContext->GetSetting("LCDPopupTime", "5");
+    lcd_popuptime = aString.toInt() * 1000;
 
     connected = TRUE;
 
@@ -804,7 +806,7 @@
     popMenuTimer->stop();
     // Start the unPop timer if this is a popup menu
     if (popMenu)
-        popMenuTimer->start(5000, true);
+        popMenuTimer->start(lcd_popuptime, true);
 
     // QPtrListIterator doesn't contain a deep copy constructor. . .
     // This will contain a copy of the menuItems for scrolling purposes
Index: mythtv/libs/libmyth/lcddevice.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/lcddevice.h,v
retrieving revision 1.16
diff -u -r1.16 lcddevice.h
--- mythtv/libs/libmyth/lcddevice.h	19 Aug 2004 01:36:30 -0000	1.16
+++ mythtv/libs/libmyth/lcddevice.h	14 Oct 2004 08:50:28 -0000
@@ -274,6 +274,7 @@
     bool lcd_showchannel;
     bool lcd_showvolume;
     bool lcd_backlighton;
+    int  lcd_popuptime;
 
     int (*GetLEDMask)(void);
 };
Index: mythtv/programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.196
diff -u -r1.196 globalsettings.cpp
--- mythtv/programs/mythfrontend/globalsettings.cpp	6 Oct 2004 19:55:13 -0000	1.196
+++ mythtv/programs/mythfrontend/globalsettings.cpp	14 Oct 2004 08:50:30 -0000
@@ -2329,6 +2329,16 @@
     return gc;
 }
 
+static GenericSpinBox *LCDPopupTime()
+{
+    GenericSpinBox *gs = new  GenericSpinBox("LCDPopupTime", 1, 300, 1);
+    gs->setLabel(QObject::tr("Menu Pop-up Time"));
+    gs->setHelpText(QObject::tr("The time (in seconds) that the menu will "
+                    "remain visible after navigation."));
+    gs->setValue(5);
+    return gs;
+}
+
 static GenericCheckBox *LCDShowMusic()
 {
     GenericCheckBox *gc = new GenericCheckBox("LCDShowMusic");
@@ -2636,6 +2646,7 @@
     lcdscreen->setLabel(QObject::tr("LCD device display"));
     lcdscreen->addChild(LCDShowTime());
     lcdscreen->addChild(LCDShowMenu());
+    lcdscreen->addChild(LCDPopupTime());
     lcdscreen->addChild(LCDShowMusic());
     lcdscreen->addChild(LCDShowChannel());
     lcdscreen->addChild(LCDShowVolume());


More information about the mythtv-dev mailing list