Ticket #7762: mythtv-setup

File mythtv-setup, 1.8 KB (added by gmembre@…, 14 years ago)

options added to mythtv-setup

Line 
1Index: programs/mythtv-setup/backendsettings.cpp
2===================================================================
3--- programs/mythtv-setup/backendsettings.cpp   (revision 22882)
4+++ programs/mythtv-setup/backendsettings.cpp   (working copy)
5@@ -384,14 +384,15 @@
6     return gc;
7 };
8 
9-static HostLineEdit *SleepCommand()
10+static GlobalCheckBox *AllowSlaveToSleep()
11 {
12-    HostLineEdit *gc = new HostLineEdit("SleepCommand");
13-    gc->setLabel(QObject::tr("Sleep Command"));
14-    gc->setValue("");
15-    gc->setHelpText(QObject::tr("The command used to put this slave to sleep. "
16-                    "If set, the master backend will use this command to put "
17-                    "this slave to sleep when it is not needed for recording."));
18+    GlobalCheckBox *gc = new GlobalCheckBox("AllowSlaveToSleep");
19+    gc->setLabel(QObject::tr("Allow slave to go to sleep"));
20+    gc->setValue(false);
21+    QString help = QObject::tr(
22+        "If enabled, slave can be put to sleep when they idle and when "
23+        "the Pre-Shutdown check-command exits successfully.");
24+    gc->setHelpText(help);
25     return gc;
26 };
27 
28@@ -402,7 +403,7 @@
29     gc->setValue("");
30     gc->setHelpText(QObject::tr("The command used to wake up this slave "
31                     "from sleep.  This setting is not used on the master "
32-                    "backend."));
33+                    "backend. '%SLAVE%' will be replaced by the slave hostname"));
34     return gc;
35 };
36 
37@@ -826,7 +827,7 @@
38     
39     VerticalConfigurationGroup* slaveBackend = new VerticalConfigurationGroup();
40     slaveBackend->setLabel(QObject::tr("Slave Backends"));
41-    slaveBackend->addChild(SleepCommand());
42+    slaveBackend->addChild(AllowSlaveToSleep());
43     slaveBackend->addChild(WakeUpCommand());
44     group4->addChild(slaveBackend);
45     addChild(group4);