Ticket #2838: mythwelcome-wakeupcmd.diff
| File mythwelcome-wakeupcmd.diff, 2.0 KB (added by , 20 years ago) |
|---|
-
programs/mythwelcome/welcomesettings.cpp
110 110 // mythshutdown script settings 111 111 /////////////////////////////////////////////////////////////////// 112 112 113 static Host LineEdit*MythShutdownNvramCmd()113 static HostComboBox *MythShutdownNvramCmd() 114 114 { 115 Host LineEdit *gc = new HostLineEdit("MythShutdownNvramCmd");116 gc->setLabel(QObject::tr(" nvram-wakeup Command"));117 gc-> setValue("/usr/bin/nvram-wakeup");115 HostComboBox *gc = new HostComboBox("MythShutdownNvramCmd", true); 116 gc->setLabel(QObject::tr("Command to Set Wakeup Time")); 117 gc->addSelection("/usr/bin/nvram-wakeup --settime $time"); 118 118 gc->setHelpText(QObject::tr("Command to set the wakeup time in the BIOS. " 119 119 "See the README file for more examples.")); 120 120 return gc; 121 121 }; 122 122 123 static HostComboBox *WakeupTimeFormat() 124 { 125 HostComboBox *gc = new HostComboBox("WakeupTimeFormat", true); 126 gc->setLabel(QObject::tr("Wakeup time format")); 127 gc->addSelection("time_t"); 128 gc->addSelection("yyyy-MM-dd hh:mm:ss"); 129 gc->setHelpText(QObject::tr("The format of the time string passed to the " 130 "\'Set Wakeup Time Command\' as $time. See " 131 "QT::QDateTime.toString() for details. Set to 'time_t' for " 132 "seconds since epoch (use time_t for nvram_wakeup).")); 133 return gc; 134 }; 135 123 136 static HostLineEdit *MythShutdownNvramRestartCmd() 124 137 { 125 138 HostLineEdit *gc = new HostLineEdit("MythShutdownNvramRestartCmd"); … … 178 191 179 192 vcg->setLabel(QObject::tr("MythShutdown/MythWelcome Settings")); 180 193 vcg->addChild(MythShutdownNvramCmd()); 194 vcg->addChild(WakeupTimeFormat()); 181 195 vcg->addChild(MythShutdownNvramRestartCmd()); 182 196 vcg->addChild(MythShutdownReboot()); 183 197 vcg->addChild(MythShutdownPowerOff());
