|
|
@ -16,11 +16,11 @@
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*! \file configuredialog.cpp
|
|
|
|
/*! \file configuredialog.cpp
|
|
|
|
* All here displayed file members of configureDialog.cpp are related to operations with the
|
|
|
|
* All here displayed file members of configureDialog.cpp are related to operations with the
|
|
|
|
* configure dialog for tdepowersave
|
|
|
|
* configure dialog for tdepowersave
|
|
|
|
* \brief In this file can be found all configure dialog related code.
|
|
|
|
* \brief In this file can be found all configure dialog related code.
|
|
|
|
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
|
|
|
|
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
|
|
|
|
* \date 2005
|
|
|
|
* \date 2005
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -78,7 +78,7 @@ ConfigureDialog::ConfigureDialog( TDEConfig *_config, HardwareInfo *_hwinfo, Set
|
|
|
|
if(hwinfo->supportBrightness()) {
|
|
|
|
if(hwinfo->supportBrightness()) {
|
|
|
|
brightnessLevels = hwinfo->getMaxBrightnessLevel() -1;
|
|
|
|
brightnessLevels = hwinfo->getMaxBrightnessLevel() -1;
|
|
|
|
brightness_last = hwinfo->getCurrentBrightnessLevel();
|
|
|
|
brightness_last = hwinfo->getCurrentBrightnessLevel();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
brightnessLevels = -1;
|
|
|
|
brightnessLevels = -1;
|
|
|
|
brightness_last = -1;
|
|
|
|
brightness_last = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -94,6 +94,9 @@ ConfigureDialog::ConfigureDialog( TDEConfig *_config, HardwareInfo *_hwinfo, Set
|
|
|
|
if ( suspend.suspend2disk && (suspend.suspend2disk_allowed || suspend.suspend2disk_allowed == -1)) {
|
|
|
|
if ( suspend.suspend2disk && (suspend.suspend2disk_allowed || suspend.suspend2disk_allowed == -1)) {
|
|
|
|
actions.append("Suspend to Disk");
|
|
|
|
actions.append("Suspend to Disk");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( suspend.freeze && (suspend.freeze_allowed || suspend.freeze_allowed == -1)) {
|
|
|
|
|
|
|
|
actions.append("Freeze");
|
|
|
|
|
|
|
|
}
|
|
|
|
if ( suspend.standby && (suspend.standby_allowed || suspend.standby_allowed == -1)) {
|
|
|
|
if ( suspend.standby && (suspend.standby_allowed || suspend.standby_allowed == -1)) {
|
|
|
|
actions.append("Standby");
|
|
|
|
actions.append("Standby");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -101,11 +104,11 @@ ConfigureDialog::ConfigureDialog( TDEConfig *_config, HardwareInfo *_hwinfo, Set
|
|
|
|
setIcons();
|
|
|
|
setIcons();
|
|
|
|
setTooltips();
|
|
|
|
setTooltips();
|
|
|
|
getSchemeList();
|
|
|
|
getSchemeList();
|
|
|
|
setSchemeList();
|
|
|
|
setSchemeList();
|
|
|
|
setGeneralSettings();
|
|
|
|
setGeneralSettings();
|
|
|
|
setInactivityBox();
|
|
|
|
setInactivityBox();
|
|
|
|
selectScheme(settings->currentScheme);
|
|
|
|
selectScheme(settings->currentScheme);
|
|
|
|
|
|
|
|
|
|
|
|
tL_valueBrightness->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
|
|
|
|
tL_valueBrightness->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
|
|
|
|
tL_valueBrightness->setBackgroundMode(TQt::PaletteBase);
|
|
|
|
tL_valueBrightness->setBackgroundMode(TQt::PaletteBase);
|
|
|
|
tL_valueBrightness->setAlignment(TQt::AlignCenter);
|
|
|
|
tL_valueBrightness->setAlignment(TQt::AlignCenter);
|
|
|
@ -137,7 +140,7 @@ ConfigureDialog::~ConfigureDialog(){
|
|
|
|
|
|
|
|
|
|
|
|
/* ---- START General setup SECTION ---- */
|
|
|
|
/* ---- START General setup SECTION ---- */
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to fill the TQListBox listBox_schemes and the scheme related TQComboBoxes
|
|
|
|
* This used to fill the TQListBox listBox_schemes and the scheme related TQComboBoxes
|
|
|
|
* with the existing schemes.
|
|
|
|
* with the existing schemes.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -170,7 +173,7 @@ void ConfigureDialog::setSchemeList(){
|
|
|
|
cB_acScheme->insertItem(i18n(_tmp));
|
|
|
|
cB_acScheme->insertItem(i18n(_tmp));
|
|
|
|
cB_batteryScheme->insertItem(i18n(_tmp));
|
|
|
|
cB_batteryScheme->insertItem(i18n(_tmp));
|
|
|
|
} else if((*it) == "AdvancedPowersave" || (*it) == i18n("Advanced Powersave")) {
|
|
|
|
} else if((*it) == "AdvancedPowersave" || (*it) == i18n("Advanced Powersave")) {
|
|
|
|
listBox_schemes->insertItem(SmallIcon("scheme_advanced_powersave",
|
|
|
|
listBox_schemes->insertItem(SmallIcon("scheme_advanced_powersave",
|
|
|
|
TQIconSet::Automatic), i18n("Advanced Powersave"));
|
|
|
|
TQIconSet::Automatic), i18n("Advanced Powersave"));
|
|
|
|
cB_acScheme->insertItem(i18n("Advanced Powersave"));
|
|
|
|
cB_acScheme->insertItem(i18n("Advanced Powersave"));
|
|
|
|
cB_batteryScheme->insertItem(i18n("Advanced Powersave"));
|
|
|
|
cB_batteryScheme->insertItem(i18n("Advanced Powersave"));
|
|
|
@ -185,7 +188,7 @@ void ConfigureDialog::setSchemeList(){
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to get the list of schemes in from the config
|
|
|
|
* This used to get the list of schemes in from the config
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::getSchemeList(){
|
|
|
|
void ConfigureDialog::getSchemeList(){
|
|
|
@ -199,7 +202,7 @@ void ConfigureDialog::getSchemeList(){
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to set the current scheme based on the name of the scheme
|
|
|
|
* This used to set the current scheme based on the name of the scheme
|
|
|
|
* \param _scheme TQString with the name of the scheme
|
|
|
|
* \param _scheme TQString with the name of the scheme
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -218,11 +221,11 @@ void ConfigureDialog::selectScheme (TQString _scheme){
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
listBox_schemes->setCurrentItem(0);
|
|
|
|
listBox_schemes->setCurrentItem(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to set all needed Icons for the dialog.
|
|
|
|
* This used to set all needed Icons for the dialog.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::setIcons(){
|
|
|
|
void ConfigureDialog::setIcons(){
|
|
|
@ -242,17 +245,20 @@ void ConfigureDialog::setIcons(){
|
|
|
|
|
|
|
|
|
|
|
|
tB_scheme->setItemIconSet( 0 ,SmallIcon("tdescreensaver", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 0 ,SmallIcon("tdescreensaver", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 1 ,SmallIcon("display", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 1 ,SmallIcon("display", TQIconSet::Automatic));
|
|
|
|
|
|
|
|
|
|
|
|
if(actions[0] == "Suspend to Disk") {
|
|
|
|
if(actions[0] == "Suspend to Disk") {
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_disk", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_disk", TQIconSet::Automatic));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(actions[0] == "Suspend to RAM") {
|
|
|
|
else if(actions[0] == "Suspend to RAM") {
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_ram", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_ram", TQIconSet::Automatic));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(actions[0] == "Freeze") {
|
|
|
|
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_ram", TQIconSet::Automatic));
|
|
|
|
|
|
|
|
}
|
|
|
|
else if(actions[0] == "Standby") {
|
|
|
|
else if(actions[0] == "Standby") {
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("stand_by", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 2 ,SmallIcon("stand_by", TQIconSet::Automatic));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tB_scheme->setItemIconSet( 3 ,SmallIcon("autodimm", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 3 ,SmallIcon("autodimm", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 4 ,SmallIcon("processor", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 4 ,SmallIcon("processor", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 5 ,SmallIcon("misc", TQIconSet::Automatic));
|
|
|
|
tB_scheme->setItemIconSet( 5 ,SmallIcon("misc", TQIconSet::Automatic));
|
|
|
@ -267,7 +273,7 @@ void ConfigureDialog::setIcons(){
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to set all needed Tooltips for the dialog.
|
|
|
|
* This used to set all needed Tooltips for the dialog.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::setTooltips(){
|
|
|
|
void ConfigureDialog::setTooltips(){
|
|
|
@ -288,12 +294,12 @@ void ConfigureDialog::setTooltips(){
|
|
|
|
TQToolTip::add(cB_disablePM, i18n("This disables DPMS support."));
|
|
|
|
TQToolTip::add(cB_disablePM, i18n("This disables DPMS support."));
|
|
|
|
TQToolTip::add(cB_lockSuspend, i18n("If selected, the screen is locked on suspend or standby."));
|
|
|
|
TQToolTip::add(cB_lockSuspend, i18n("If selected, the screen is locked on suspend or standby."));
|
|
|
|
TQToolTip::add(cB_lockLid, i18n("If selected, the screen is locked if the lid close event is triggered."));
|
|
|
|
TQToolTip::add(cB_lockLid, i18n("If selected, the screen is locked if the lid close event is triggered."));
|
|
|
|
|
|
|
|
|
|
|
|
TQToolTip::add(cB_autoSuspend, i18n("Check this box to enable or disable automatic suspension of "
|
|
|
|
TQToolTip::add(cB_autoSuspend, i18n("Check this box to enable or disable automatic suspension of "
|
|
|
|
"the computer."));
|
|
|
|
"the computer."));
|
|
|
|
TQToolTip::add(cB_autoInactivity, i18n("Activate this action if the user was inactive for the defined "
|
|
|
|
TQToolTip::add(cB_autoInactivity, i18n("Activate this action if the user was inactive for the defined "
|
|
|
|
"time \n(greater than 0 minutes). If empty, nothing happens."));
|
|
|
|
"time \n(greater than 0 minutes). If empty, nothing happens."));
|
|
|
|
|
|
|
|
|
|
|
|
tB_scheme->setItemToolTip ( 0, i18n("All scheme-related screen saver and DPMS settings."));
|
|
|
|
tB_scheme->setItemToolTip ( 0, i18n("All scheme-related screen saver and DPMS settings."));
|
|
|
|
tB_scheme->setItemToolTip ( 1, i18n("All scheme-related display brightness settings."));
|
|
|
|
tB_scheme->setItemToolTip ( 1, i18n("All scheme-related display brightness settings."));
|
|
|
|
tB_scheme->setItemToolTip ( 2, i18n("All scheme-related automatic suspend settings."));
|
|
|
|
tB_scheme->setItemToolTip ( 2, i18n("All scheme-related automatic suspend settings."));
|
|
|
@ -310,11 +316,11 @@ void ConfigureDialog::setTooltips(){
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This function is used to get the real name of the predefined schemes.
|
|
|
|
* This function is used to get the real name of the predefined schemes.
|
|
|
|
* This is a workaround for the case if Yast translated the name of the
|
|
|
|
* This is a workaround for the case if Yast translated the name of the
|
|
|
|
* scheme In this case is a new config section created and the old settings
|
|
|
|
* scheme In this case is a new config section created and the old settings
|
|
|
|
* would be lost.
|
|
|
|
* would be lost.
|
|
|
|
* \param s_scheme TQString with the 'current' name of the scheme
|
|
|
|
* \param s_scheme TQString with the 'current' name of the scheme
|
|
|
|
* \return TQString with the english name of the scheme
|
|
|
|
* \return TQString with the english name of the scheme
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
TQString ConfigureDialog::getSchemeRealName(TQString s_scheme) {
|
|
|
|
TQString ConfigureDialog::getSchemeRealName(TQString s_scheme) {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
@ -336,22 +342,22 @@ TQString ConfigureDialog::getSchemeRealName(TQString s_scheme) {
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This function is used to read the settings from configfile and
|
|
|
|
* This function is used to read the settings from configfile and
|
|
|
|
* set the values to the related dialog elements.
|
|
|
|
* set the values to the related dialog elements.
|
|
|
|
* \param schemeID Integer value, represent the position of the
|
|
|
|
* \param schemeID Integer value, represent the position of the
|
|
|
|
* scheme in the TQListBox and within the pdaemon-list.
|
|
|
|
* scheme in the TQListBox and within the pdaemon-list.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
if (trace) kdDebug() << funcinfo << "IN , scheme: " << schemeID << endl;
|
|
|
|
if (trace) kdDebug() << funcinfo << "IN , scheme: " << schemeID << endl;
|
|
|
|
|
|
|
|
|
|
|
|
initalised = false;
|
|
|
|
initalised = false;
|
|
|
|
|
|
|
|
|
|
|
|
TQString s_scheme = getSchemeRealName(schemes[schemeID]);
|
|
|
|
TQString s_scheme = getSchemeRealName(schemes[schemeID]);
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)){
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)){
|
|
|
|
settings->load_general_settings();
|
|
|
|
settings->load_general_settings();
|
|
|
|
|
|
|
|
|
|
|
|
// set the delete scheme button enabled if needed
|
|
|
|
// set the delete scheme button enabled if needed
|
|
|
|
if (!s_scheme.startsWith("Performance") && !s_scheme.startsWith("Powersave") &&
|
|
|
|
if (!s_scheme.startsWith("Performance") && !s_scheme.startsWith("Powersave") &&
|
|
|
|
!s_scheme.startsWith("Presentation") && !s_scheme.startsWith("Acoustic")) {
|
|
|
|
!s_scheme.startsWith("Presentation") && !s_scheme.startsWith("Acoustic")) {
|
|
|
|
if (!s_scheme.startsWith(settings->ac_scheme) ||
|
|
|
|
if (!s_scheme.startsWith(settings->ac_scheme) ||
|
|
|
|
!s_scheme.startsWith(settings->battery_scheme)) {
|
|
|
|
!s_scheme.startsWith(settings->battery_scheme)) {
|
|
|
|
// enable delete button
|
|
|
|
// enable delete button
|
|
|
|
pB_deleteScheme->setEnabled( true );
|
|
|
|
pB_deleteScheme->setEnabled( true );
|
|
|
@ -372,19 +378,19 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
tdeconfig->setGroup(s_scheme);
|
|
|
|
tdeconfig->setGroup(s_scheme);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// no configuration found, set to default values ?!
|
|
|
|
// no configuration found, set to default values ?!
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if(tdeconfig->hasGroup("default-scheme"))
|
|
|
|
if(tdeconfig->hasGroup("default-scheme"))
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cB_disable_Ss_toggled(tdeconfig->readBoolEntry("disableSs",false));
|
|
|
|
cB_disable_Ss_toggled(tdeconfig->readBoolEntry("disableSs",false));
|
|
|
|
cB_blankScreen->setChecked(tdeconfig->readBoolEntry("blankSs",false));
|
|
|
|
cB_blankScreen->setChecked(tdeconfig->readBoolEntry("blankSs",false));
|
|
|
|
cB_specificSettings_toggled(tdeconfig->readBoolEntry("specSsSettings",false));
|
|
|
|
cB_specificSettings_toggled(tdeconfig->readBoolEntry("specSsSettings",false));
|
|
|
|
|
|
|
|
|
|
|
|
int i_standby = tdeconfig->readNumEntry("standbyAfter", -1);
|
|
|
|
int i_standby = tdeconfig->readNumEntry("standbyAfter", -1);
|
|
|
|
if(i_standby >= 0) {
|
|
|
|
if(i_standby >= 0) {
|
|
|
|
sB_standby->setValue(i_standby);
|
|
|
|
sB_standby->setValue(i_standby);
|
|
|
@ -406,7 +412,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int i_suspend = tdeconfig->readNumEntry("suspendAfter", -1);
|
|
|
|
int i_suspend = tdeconfig->readNumEntry("suspendAfter", -1);
|
|
|
|
if(i_suspend >= 0) {
|
|
|
|
if(i_suspend >= 0) {
|
|
|
|
sB_suspend->setValue(i_suspend);
|
|
|
|
sB_suspend->setValue(i_suspend);
|
|
|
@ -428,7 +434,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int i_poweroff = tdeconfig->readNumEntry("powerOffAfter", -1);
|
|
|
|
int i_poweroff = tdeconfig->readNumEntry("powerOffAfter", -1);
|
|
|
|
if(i_poweroff >= 0) {
|
|
|
|
if(i_poweroff >= 0) {
|
|
|
|
sB_powerOff->setValue(i_poweroff);
|
|
|
|
sB_powerOff->setValue(i_poweroff);
|
|
|
@ -450,15 +456,15 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
if (tdeconfig->hasGroup(s_scheme)) tdeconfig->setGroup(s_scheme);
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
else tdeconfig->setGroup("default-scheme");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cB_SpecificPM_toggled(tdeconfig->readBoolEntry("specPMSettings",false));
|
|
|
|
cB_SpecificPM_toggled(tdeconfig->readBoolEntry("specPMSettings",false));
|
|
|
|
cB_disablePM_toggled(tdeconfig->readBoolEntry("disableDPMS",false));
|
|
|
|
cB_disablePM_toggled(tdeconfig->readBoolEntry("disableDPMS",false));
|
|
|
|
|
|
|
|
|
|
|
|
// set autosuspend related settings
|
|
|
|
// set autosuspend related settings
|
|
|
|
TQString _action = tdeconfig->readEntry("autoInactiveAction", "NULL");
|
|
|
|
TQString _action = tdeconfig->readEntry("autoInactiveAction", "NULL");
|
|
|
|
if( _action != "NULL") {
|
|
|
|
if( _action != "NULL") {
|
|
|
|
int _index = actions.findIndex(_action);
|
|
|
|
int _index = actions.findIndex(_action);
|
|
|
|
if( _index != -1) {
|
|
|
|
if( _index != -1) {
|
|
|
|
cB_autoInactivity->setCurrentItem( _index );
|
|
|
|
cB_autoInactivity->setCurrentItem( _index );
|
|
|
|
cB_autoInactivity_activated( _index );
|
|
|
|
cB_autoInactivity_activated( _index );
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
@ -474,13 +480,13 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// set to disabled (to reduce code), if a entry found set to enabled !
|
|
|
|
// set to disabled (to reduce code), if a entry found set to enabled !
|
|
|
|
cB_Blacklist->setEnabled(false);
|
|
|
|
cB_Blacklist->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
if(tdeconfig->hasGroup("default-scheme")){
|
|
|
|
if(tdeconfig->hasGroup("default-scheme")){
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
_action = tdeconfig->readEntry("autoInactiveAction", "NULL");
|
|
|
|
_action = tdeconfig->readEntry("autoInactiveAction", "NULL");
|
|
|
|
if(_action != "NULL") {
|
|
|
|
if(_action != "NULL") {
|
|
|
|
int _index = actions.findIndex(_action);
|
|
|
|
int _index = actions.findIndex(_action);
|
|
|
|
if( _index != -1) {
|
|
|
|
if( _index != -1) {
|
|
|
|
cB_autoInactivity->setCurrentItem( _index );
|
|
|
|
cB_autoInactivity->setCurrentItem( _index );
|
|
|
|
tL_autoInactivity_After->setEnabled(true);
|
|
|
|
tL_autoInactivity_After->setEnabled(true);
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
@ -504,7 +510,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
sB_autoInactivity->setEnabled(false);
|
|
|
|
sB_autoInactivity->setEnabled(false);
|
|
|
|
tL_autoInactivity_After->setEnabled(false);
|
|
|
|
tL_autoInactivity_After->setEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int i_autoInactivityAfter = tdeconfig->readNumEntry("autoInactiveActionAfter", -1);
|
|
|
|
int i_autoInactivityAfter = tdeconfig->readNumEntry("autoInactiveActionAfter", -1);
|
|
|
|
if(i_autoInactivityAfter >= 0) {
|
|
|
|
if(i_autoInactivityAfter >= 0) {
|
|
|
|
sB_autoInactivity->setValue(i_autoInactivityAfter);
|
|
|
|
sB_autoInactivity->setValue(i_autoInactivityAfter);
|
|
|
@ -532,9 +538,9 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
cB_Brightness->setEnabled(true);
|
|
|
|
cB_Brightness->setEnabled(true);
|
|
|
|
cB_Brightness_toggled(tdeconfig->readBoolEntry("enableBrightness",false));
|
|
|
|
cB_Brightness_toggled(tdeconfig->readBoolEntry("enableBrightness",false));
|
|
|
|
|
|
|
|
|
|
|
|
if (brightnessLevels > 33)
|
|
|
|
if (brightnessLevels > 33)
|
|
|
|
brightnessSlider->setLineStep(3);
|
|
|
|
brightnessSlider->setLineStep(3);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
brightnessSlider->setLineStep(100/brightnessLevels);
|
|
|
|
brightnessSlider->setLineStep(100/brightnessLevels);
|
|
|
|
|
|
|
|
|
|
|
|
brightnessSlider->setPageStep(10);
|
|
|
|
brightnessSlider->setPageStep(10);
|
|
|
@ -546,9 +552,9 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
brightnessSlider->setValue(100);
|
|
|
|
brightnessSlider->setValue(100);
|
|
|
|
tL_valueBrightness->setText(TQString::number(100)+ " %");
|
|
|
|
tL_valueBrightness->setText(TQString::number(100)+ " %");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tL_brightness->setText(i18n("Your hardware supports to change the brightness. The "
|
|
|
|
tL_brightness->setText(i18n("Your hardware supports to change the brightness. The "
|
|
|
|
"values of the slider are in percent and mapped "
|
|
|
|
"values of the slider are in percent and mapped "
|
|
|
|
"to the available brightness levels of your hardware."));
|
|
|
|
"to the available brightness levels of your hardware."));
|
|
|
@ -560,7 +566,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
"of your display."));
|
|
|
|
"of your display."));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// no need to enable autodimm if not support change brightness
|
|
|
|
// no need to enable autodimm if not support change brightness
|
|
|
|
if (hwinfo->supportBrightness()) {
|
|
|
|
if (hwinfo->supportBrightness()) {
|
|
|
|
int i_autoDimmAfter = tdeconfig->readNumEntry("autoDimmAfter", -1);
|
|
|
|
int i_autoDimmAfter = tdeconfig->readNumEntry("autoDimmAfter", -1);
|
|
|
|
if(i_autoDimmAfter >= 0) {
|
|
|
|
if(i_autoDimmAfter >= 0) {
|
|
|
@ -609,13 +615,13 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
|
|
|
|
|
|
|
|
if (hwinfo->supportCPUFreq()) {
|
|
|
|
if (hwinfo->supportCPUFreq()) {
|
|
|
|
TQString cpuFreqPolicy = tdeconfig->readEntry("cpuFreqPolicy");
|
|
|
|
TQString cpuFreqPolicy = tdeconfig->readEntry("cpuFreqPolicy");
|
|
|
|
|
|
|
|
|
|
|
|
if (cpuFreqPolicy.isEmpty()) {
|
|
|
|
if (cpuFreqPolicy.isEmpty()) {
|
|
|
|
// load value from default-scheme
|
|
|
|
// load value from default-scheme
|
|
|
|
if(tdeconfig->hasGroup("default-scheme")){
|
|
|
|
if(tdeconfig->hasGroup("default-scheme")){
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
tdeconfig->setGroup("default-scheme");
|
|
|
|
cpuFreqPolicy = tdeconfig->readEntry("cpuFreqPolicy");
|
|
|
|
cpuFreqPolicy = tdeconfig->readEntry("cpuFreqPolicy");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cpuFreqPolicy.isEmpty()) {
|
|
|
|
if (cpuFreqPolicy.isEmpty()) {
|
|
|
|
cpuFreqPolicy = "DYNAMIC";
|
|
|
|
cpuFreqPolicy = "DYNAMIC";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -657,35 +663,35 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This is used to set the values from the section general in configfile to the
|
|
|
|
* This is used to set the values from the section general in configfile to the
|
|
|
|
* related items in the dialog.
|
|
|
|
* related items in the dialog.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::setGeneralSettings() {
|
|
|
|
void ConfigureDialog::setGeneralSettings() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->setGroup("General");
|
|
|
|
tdeconfig->setGroup("General");
|
|
|
|
|
|
|
|
|
|
|
|
cB_lockSuspend->setChecked(tdeconfig->readBoolEntry("lockOnSuspend",false));
|
|
|
|
cB_lockSuspend->setChecked(tdeconfig->readBoolEntry("lockOnSuspend",false));
|
|
|
|
cB_lockLid->setChecked(tdeconfig->readBoolEntry("lockOnLidClose",false));
|
|
|
|
cB_lockLid->setChecked(tdeconfig->readBoolEntry("lockOnLidClose",false));
|
|
|
|
cB_autostart->setChecked(tdeconfig->readBoolEntry("Autostart",false));
|
|
|
|
cB_autostart->setChecked(tdeconfig->readBoolEntry("Autostart",false));
|
|
|
|
cB_autostart_neverAsk->setChecked(tdeconfig->readBoolEntry("AutostartNeverAsk",false));
|
|
|
|
cB_autostart_neverAsk->setChecked(tdeconfig->readBoolEntry("AutostartNeverAsk",false));
|
|
|
|
|
|
|
|
|
|
|
|
TQString lockmethod = tdeconfig->readEntry("lockMethod", "NULL");
|
|
|
|
TQString lockmethod = tdeconfig->readEntry("lockMethod", "NULL");
|
|
|
|
if(comboB_lock->count() == 0 ){
|
|
|
|
if(comboB_lock->count() == 0 ){
|
|
|
|
comboB_lock->insertItem(i18n("Select Automatically"),0);
|
|
|
|
comboB_lock->insertItem(i18n("Select Automatically"),0);
|
|
|
|
comboB_lock->insertItem(i18n("TDEScreensaver"),1);
|
|
|
|
comboB_lock->insertItem(i18n("TDEScreensaver"),1);
|
|
|
|
comboB_lock->insertItem(i18n("XScreensaver"),2);
|
|
|
|
comboB_lock->insertItem(i18n("XScreensaver"),2);
|
|
|
|
comboB_lock->insertItem(i18n("xlock"),3);
|
|
|
|
comboB_lock->insertItem(i18n("xlock"),3);
|
|
|
|
if (gnome_session) comboB_lock->insertItem(i18n("GNOME Screensaver"),4);
|
|
|
|
if (gnome_session) comboB_lock->insertItem(i18n("GNOME Screensaver"),4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (lockmethod == "automatic") comboB_lock->setCurrentItem(0);
|
|
|
|
if (lockmethod == "automatic") comboB_lock->setCurrentItem(0);
|
|
|
|
else if (lockmethod == "tdescreensaver") comboB_lock->setCurrentItem(1);
|
|
|
|
else if (lockmethod == "tdescreensaver") comboB_lock->setCurrentItem(1);
|
|
|
|
else if (lockmethod == "xscreensaver") comboB_lock->setCurrentItem(2);
|
|
|
|
else if (lockmethod == "xscreensaver") comboB_lock->setCurrentItem(2);
|
|
|
|
else if (lockmethod == "xlock") comboB_lock->setCurrentItem(3);
|
|
|
|
else if (lockmethod == "xlock") comboB_lock->setCurrentItem(3);
|
|
|
|
else if (gnome_session && (lockmethod == "gnomescreensaver")) comboB_lock->setCurrentItem(4);
|
|
|
|
else if (gnome_session && (lockmethod == "gnomescreensaver")) comboB_lock->setCurrentItem(4);
|
|
|
|
else comboB_lock->setCurrentItem(0);
|
|
|
|
else comboB_lock->setCurrentItem(0);
|
|
|
|
|
|
|
|
|
|
|
|
if(cB_lockSuspend->isOn() || cB_lockLid->isOn() ) {
|
|
|
|
if(cB_lockSuspend->isOn() || cB_lockLid->isOn() ) {
|
|
|
|
tL_lockWith->setEnabled(true);
|
|
|
|
tL_lockWith->setEnabled(true);
|
|
|
|
comboB_lock->setEnabled(true);
|
|
|
|
comboB_lock->setEnabled(true);
|
|
|
@ -728,7 +734,7 @@ void ConfigureDialog::setGeneralSettings() {
|
|
|
|
sB_batCritAction_value->setValue(tdeconfig->readNumEntry("batteryCriticalActionValue",0));
|
|
|
|
sB_batCritAction_value->setValue(tdeconfig->readNumEntry("batteryCriticalActionValue",0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// disable tab
|
|
|
|
// disable tab
|
|
|
|
tB_general->setItemLabel( 0, tB_scheme->itemLabel(0) + i18n(" - not supported"));
|
|
|
|
tB_general->setItemLabel( 0, tB_scheme->itemLabel(0) + i18n(" - not supported"));
|
|
|
|
tB_general->setItemEnabled( 0, false);
|
|
|
|
tB_general->setItemEnabled( 0, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -755,7 +761,7 @@ void ConfigureDialog::setGeneralSettings() {
|
|
|
|
|
|
|
|
|
|
|
|
/* ---- START store settings SECTION ---- */
|
|
|
|
/* ---- START store settings SECTION ---- */
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to save changes in settings of the current scheme.
|
|
|
|
* This used to save changes in settings of the current scheme.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::saveSchemeSettings() {
|
|
|
|
void ConfigureDialog::saveSchemeSettings() {
|
|
|
@ -769,13 +775,13 @@ void ConfigureDialog::saveSchemeSettings() {
|
|
|
|
tdeconfig->writeEntry("blankSs",cB_blankScreen->isOn());
|
|
|
|
tdeconfig->writeEntry("blankSs",cB_blankScreen->isOn());
|
|
|
|
tdeconfig->writeEntry("specPMSettings",cB_SpecificPM->isOn());
|
|
|
|
tdeconfig->writeEntry("specPMSettings",cB_SpecificPM->isOn());
|
|
|
|
tdeconfig->writeEntry("disableDPMS",cB_disablePM->isOn());
|
|
|
|
tdeconfig->writeEntry("disableDPMS",cB_disablePM->isOn());
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->writeEntry("standbyAfter",sB_standby->value());
|
|
|
|
tdeconfig->writeEntry("standbyAfter",sB_standby->value());
|
|
|
|
tdeconfig->writeEntry("suspendAfter",sB_suspend->value());
|
|
|
|
tdeconfig->writeEntry("suspendAfter",sB_suspend->value());
|
|
|
|
tdeconfig->writeEntry("powerOffAfter",sB_powerOff->value());
|
|
|
|
tdeconfig->writeEntry("powerOffAfter",sB_powerOff->value());
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->writeEntry("disableNotifications",cB_disableNotifications->isOn());
|
|
|
|
tdeconfig->writeEntry("disableNotifications",cB_disableNotifications->isOn());
|
|
|
|
|
|
|
|
|
|
|
|
if(cB_autoInactivity->currentText() == " "){
|
|
|
|
if(cB_autoInactivity->currentText() == " "){
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction", "_NONE_");
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction", "_NONE_");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -783,7 +789,7 @@ void ConfigureDialog::saveSchemeSettings() {
|
|
|
|
int _index = cB_autoInactivity->currentItem();
|
|
|
|
int _index = cB_autoInactivity->currentItem();
|
|
|
|
if(_index > 0) {
|
|
|
|
if(_index > 0) {
|
|
|
|
/*if(_index == (cB_autoInactivity->count()-1)) {
|
|
|
|
/*if(_index == (cB_autoInactivity->count()-1)) {
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction","shutdown");
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction","shutdown");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction",actions[(_index)]);
|
|
|
|
tdeconfig->writeEntry("autoInactiveAction",actions[(_index)]);
|
|
|
@ -794,7 +800,7 @@ void ConfigureDialog::saveSchemeSettings() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tdeconfig->writeEntry("autoSuspend",cB_autoSuspend->isOn());
|
|
|
|
tdeconfig->writeEntry("autoSuspend",cB_autoSuspend->isOn());
|
|
|
|
tdeconfig->writeEntry("autoInactiveSchemeBlacklistEnabled",cB_Blacklist->isOn());
|
|
|
|
tdeconfig->writeEntry("autoInactiveSchemeBlacklistEnabled",cB_Blacklist->isOn());
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->writeEntry("autoDimm",cB_autoDimm->isOn());
|
|
|
|
tdeconfig->writeEntry("autoDimm",cB_autoDimm->isOn());
|
|
|
|
tdeconfig->writeEntry("autoDimmAfter", sB_autoDimmTime->value());
|
|
|
|
tdeconfig->writeEntry("autoDimmAfter", sB_autoDimmTime->value());
|
|
|
|
tdeconfig->writeEntry("autoDimmTo", sB_autoDimmTo->value());
|
|
|
|
tdeconfig->writeEntry("autoDimmTo", sB_autoDimmTo->value());
|
|
|
@ -827,19 +833,19 @@ void ConfigureDialog::saveSchemeSettings() {
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to save changes in settings of the current scheme.
|
|
|
|
* This used to save changes in settings of the current scheme.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::saveGeneralSettings() {
|
|
|
|
void ConfigureDialog::saveGeneralSettings() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->setGroup("General");
|
|
|
|
tdeconfig->setGroup("General");
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->writeEntry("lockOnSuspend",cB_lockSuspend->isOn());
|
|
|
|
tdeconfig->writeEntry("lockOnSuspend",cB_lockSuspend->isOn());
|
|
|
|
tdeconfig->writeEntry("lockOnLidClose",cB_lockLid->isOn());
|
|
|
|
tdeconfig->writeEntry("lockOnLidClose",cB_lockLid->isOn());
|
|
|
|
tdeconfig->writeEntry("Autostart",cB_autostart->isOn());
|
|
|
|
tdeconfig->writeEntry("Autostart",cB_autostart->isOn());
|
|
|
|
tdeconfig->writeEntry("AutostartNeverAsk",cB_autostart_neverAsk->isOn());
|
|
|
|
tdeconfig->writeEntry("AutostartNeverAsk",cB_autostart_neverAsk->isOn());
|
|
|
|
|
|
|
|
|
|
|
|
TQString selected_method = "";
|
|
|
|
TQString selected_method = "";
|
|
|
|
int _selected = comboB_lock->currentItem();
|
|
|
|
int _selected = comboB_lock->currentItem();
|
|
|
|
if(_selected == 0) selected_method = "automatic";
|
|
|
|
if(_selected == 0) selected_method = "automatic";
|
|
|
@ -848,7 +854,7 @@ void ConfigureDialog::saveGeneralSettings() {
|
|
|
|
else if(_selected == 3) selected_method = "xlock";
|
|
|
|
else if(_selected == 3) selected_method = "xlock";
|
|
|
|
else if(gnome_session && (_selected == 4)) selected_method = "gnomescreensaver";
|
|
|
|
else if(gnome_session && (_selected == 4)) selected_method = "gnomescreensaver";
|
|
|
|
tdeconfig->writeEntry( "lockMethod", selected_method );
|
|
|
|
tdeconfig->writeEntry( "lockMethod", selected_method );
|
|
|
|
|
|
|
|
|
|
|
|
tdeconfig->writeEntry("batteryWarning", sB_batWarning->value());
|
|
|
|
tdeconfig->writeEntry("batteryWarning", sB_batWarning->value());
|
|
|
|
tdeconfig->writeEntry("batteryLow", sB_batLow->value());
|
|
|
|
tdeconfig->writeEntry("batteryLow", sB_batLow->value());
|
|
|
|
tdeconfig->writeEntry("batteryCritical", sB_batCritical->value());
|
|
|
|
tdeconfig->writeEntry("batteryCritical", sB_batCritical->value());
|
|
|
@ -940,10 +946,10 @@ void ConfigureDialog::listBox_schemes_currentChanged(){
|
|
|
|
int res = KMessageBox::warningYesNo(this,
|
|
|
|
int res = KMessageBox::warningYesNo(this,
|
|
|
|
i18n("There are unsaved changes in the active scheme.\n"
|
|
|
|
i18n("There are unsaved changes in the active scheme.\n"
|
|
|
|
"Apply the changes before jumping to the next scheme "
|
|
|
|
"Apply the changes before jumping to the next scheme "
|
|
|
|
"or discard the changes?"),
|
|
|
|
"or discard the changes?"),
|
|
|
|
i18n("Unsaved Changes"), KStdGuiItem::apply(),
|
|
|
|
i18n("Unsaved Changes"), KStdGuiItem::apply(),
|
|
|
|
KStdGuiItem::discard());
|
|
|
|
KStdGuiItem::discard());
|
|
|
|
|
|
|
|
|
|
|
|
if (res == KMessageBox::Yes) {
|
|
|
|
if (res == KMessageBox::Yes) {
|
|
|
|
// Save changes
|
|
|
|
// Save changes
|
|
|
|
saveSchemeSettings();
|
|
|
|
saveSchemeSettings();
|
|
|
@ -990,7 +996,7 @@ void ConfigureDialog::buttonCancel_clicked(){
|
|
|
|
if (scheme_changed || general_changed) {
|
|
|
|
if (scheme_changed || general_changed) {
|
|
|
|
int res = KMessageBox::warningYesNoCancel(this,
|
|
|
|
int res = KMessageBox::warningYesNoCancel(this,
|
|
|
|
i18n("There are unsaved changes.\nApply the changes "
|
|
|
|
i18n("There are unsaved changes.\nApply the changes "
|
|
|
|
"before cancel or discard the changes?"),
|
|
|
|
"before cancel or discard the changes?"),
|
|
|
|
i18n("Unsaved Changes"), KStdGuiItem::apply(),
|
|
|
|
i18n("Unsaved Changes"), KStdGuiItem::apply(),
|
|
|
|
KStdGuiItem::discard());
|
|
|
|
KStdGuiItem::discard());
|
|
|
|
if (res == KMessageBox::Yes) {
|
|
|
|
if (res == KMessageBox::Yes) {
|
|
|
@ -1011,7 +1017,7 @@ void ConfigureDialog::buttonOk_clicked(){
|
|
|
|
|
|
|
|
|
|
|
|
buttonApply_clicked();
|
|
|
|
buttonApply_clicked();
|
|
|
|
buttonApply->setEnabled(false);
|
|
|
|
buttonApply->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
close();
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1046,7 +1052,7 @@ void ConfigureDialog::pB_newScheme_clicked(){
|
|
|
|
getSchemeList();
|
|
|
|
getSchemeList();
|
|
|
|
|
|
|
|
|
|
|
|
while (!_end) {
|
|
|
|
while (!_end) {
|
|
|
|
_new = KInputDialog::getText( i18n("TDEPowersave Configuration"),
|
|
|
|
_new = KInputDialog::getText( i18n("TDEPowersave Configuration"),
|
|
|
|
_error + _text, TQString(), &_ok, this);
|
|
|
|
_error + _text, TQString(), &_ok, this);
|
|
|
|
if (!_ok ) {
|
|
|
|
if (!_ok ) {
|
|
|
|
_end = true;
|
|
|
|
_end = true;
|
|
|
@ -1055,7 +1061,7 @@ void ConfigureDialog::pB_newScheme_clicked(){
|
|
|
|
if (!_new.isEmpty()) {
|
|
|
|
if (!_new.isEmpty()) {
|
|
|
|
if ( schemes.contains(_new))
|
|
|
|
if ( schemes.contains(_new))
|
|
|
|
_error = i18n("Error: A scheme with this name already exist.\n");
|
|
|
|
_error = i18n("Error: A scheme with this name already exist.\n");
|
|
|
|
else
|
|
|
|
else
|
|
|
|
_end = true;
|
|
|
|
_end = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1073,7 +1079,7 @@ void ConfigureDialog::pB_newScheme_clicked(){
|
|
|
|
selectScheme(_new);
|
|
|
|
selectScheme(_new);
|
|
|
|
saveSchemeSettings();
|
|
|
|
saveSchemeSettings();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1102,7 +1108,7 @@ void ConfigureDialog::pB_deleteScheme_clicked(){
|
|
|
|
selectScheme(settings->currentScheme);
|
|
|
|
selectScheme(settings->currentScheme);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// could not delete the scheme ... error case
|
|
|
|
// could not delete the scheme ... error case
|
|
|
|
KMessageBox::queuedMessageBox(this, KMessageBox::Error,
|
|
|
|
KMessageBox::queuedMessageBox(this, KMessageBox::Error,
|
|
|
|
i18n("Could not delete the selected scheme."));
|
|
|
|
i18n("Could not delete the selected scheme."));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1124,7 +1130,7 @@ void ConfigureDialog::cB_specificSettings_toggled(bool state){
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if(!initalised) cB_specificSettings->setChecked(state);
|
|
|
|
if(!initalised) cB_specificSettings->setChecked(state);
|
|
|
|
|
|
|
|
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
if(state){
|
|
|
|
if(state){
|
|
|
|
cB_disable_Ss->setEnabled(true);
|
|
|
|
cB_disable_Ss->setEnabled(true);
|
|
|
@ -1154,7 +1160,7 @@ void ConfigureDialog::cB_disable_Ss_toggled(bool state){
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
if(!initalised) cB_disable_Ss->setChecked(state);
|
|
|
|
if(!initalised) cB_disable_Ss->setChecked(state);
|
|
|
|
cB_blankScreen->setEnabled(!state);
|
|
|
|
cB_blankScreen->setEnabled(!state);
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1172,7 +1178,7 @@ void ConfigureDialog::cB_SpecificPM_toggled(bool state){
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if(!initalised) cB_SpecificPM->setChecked(state);
|
|
|
|
if(!initalised) cB_SpecificPM->setChecked(state);
|
|
|
|
|
|
|
|
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
/* set widgets visible/disabled */
|
|
|
|
cB_disablePM->setEnabled(state);
|
|
|
|
cB_disablePM->setEnabled(state);
|
|
|
|
if(cB_disablePM->isOn()) {
|
|
|
|
if(cB_disablePM->isOn()) {
|
|
|
@ -1216,7 +1222,7 @@ void ConfigureDialog::sB_standby_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_standby->value() == 0 )
|
|
|
|
if (sB_standby->value() == 0 )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
if ( sB_standby->value() > sB_suspend->value()) {
|
|
|
|
if ( sB_standby->value() > sB_suspend->value()) {
|
|
|
|
sB_suspend->setValue(sB_standby->value());
|
|
|
|
sB_suspend->setValue(sB_standby->value());
|
|
|
@ -1233,7 +1239,7 @@ void ConfigureDialog::sB_suspend_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_suspend->value() == 0 )
|
|
|
|
if (sB_suspend->value() == 0 )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if ( sB_suspend->value() < sB_standby->value()) {
|
|
|
|
if ( sB_suspend->value() < sB_standby->value()) {
|
|
|
@ -1243,7 +1249,7 @@ void ConfigureDialog::sB_suspend_valueChanged() {
|
|
|
|
sB_powerOff->setValue(sB_suspend->value());
|
|
|
|
sB_powerOff->setValue(sB_suspend->value());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1254,7 +1260,7 @@ void ConfigureDialog::sB_powerOff_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_powerOff->value() == 0 )
|
|
|
|
if (sB_powerOff->value() == 0 )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
if ( sB_powerOff->value() < sB_suspend->value()) {
|
|
|
|
if ( sB_powerOff->value() < sB_suspend->value()) {
|
|
|
|
sB_suspend->setValue(sB_powerOff->value());
|
|
|
|
sB_suspend->setValue(sB_powerOff->value());
|
|
|
@ -1268,7 +1274,7 @@ void ConfigureDialog::sB_powerOff_valueChanged() {
|
|
|
|
|
|
|
|
|
|
|
|
/* ---- START Inactivity SECTION ---- */
|
|
|
|
/* ---- START Inactivity SECTION ---- */
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to set the inactivity related combobox cB_autoInactivity .
|
|
|
|
* This used to set the inactivity related combobox cB_autoInactivity .
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::setInactivityBox(){
|
|
|
|
void ConfigureDialog::setInactivityBox(){
|
|
|
@ -1280,7 +1286,7 @@ void ConfigureDialog::setInactivityBox(){
|
|
|
|
// add "Turn Off Computer" at end of the list
|
|
|
|
// add "Turn Off Computer" at end of the list
|
|
|
|
// TQString _to_i18n = i18n("Turn Off Computer");
|
|
|
|
// TQString _to_i18n = i18n("Turn Off Computer");
|
|
|
|
// actions.append("Turn Off Computer");
|
|
|
|
// actions.append("Turn Off Computer");
|
|
|
|
|
|
|
|
|
|
|
|
for ( TQStringList::Iterator it = actions.begin(); it != actions.end(); ++it ) {
|
|
|
|
for ( TQStringList::Iterator it = actions.begin(); it != actions.end(); ++it ) {
|
|
|
|
cB_autoInactivity->insertItem( i18n( (*it).ascii() ) );
|
|
|
|
cB_autoInactivity->insertItem( i18n( (*it).ascii() ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1355,7 +1361,7 @@ void ConfigureDialog::cB_autoInactivity_activated( int selectedItem ) {
|
|
|
|
tL_autoInactivity_After->setEnabled(true);
|
|
|
|
tL_autoInactivity_After->setEnabled(true);
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
|
cB_Blacklist->setEnabled(true);
|
|
|
|
if(cB_Blacklist->isChecked()) pB_editBlacklist->setEnabled(true);
|
|
|
|
if(cB_Blacklist->isChecked()) pB_editBlacklist->setEnabled(true);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
sB_autoInactivity->setEnabled(false);
|
|
|
|
sB_autoInactivity->setEnabled(false);
|
|
|
@ -1363,9 +1369,9 @@ void ConfigureDialog::cB_autoInactivity_activated( int selectedItem ) {
|
|
|
|
cB_Blacklist->setEnabled(false);
|
|
|
|
cB_Blacklist->setEnabled(false);
|
|
|
|
pB_editBlacklist->setEnabled(false);
|
|
|
|
pB_editBlacklist->setEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cB_autoInactivity->setCurrentItem( selectedItem );
|
|
|
|
cB_autoInactivity->setCurrentItem( selectedItem );
|
|
|
|
|
|
|
|
|
|
|
|
if(initalised) {
|
|
|
|
if(initalised) {
|
|
|
|
scheme_changed = true;
|
|
|
|
scheme_changed = true;
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
@ -1383,7 +1389,7 @@ void ConfigureDialog::cB_Blacklist_toggled( bool toggled ){
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
pB_editBlacklist->setEnabled(toggled);
|
|
|
|
pB_editBlacklist->setEnabled(toggled);
|
|
|
|
|
|
|
|
|
|
|
|
if(initalised) {
|
|
|
|
if(initalised) {
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
scheme_changed = true;
|
|
|
|
scheme_changed = true;
|
|
|
@ -1431,8 +1437,8 @@ void ConfigureDialog::pB_editBlacklistSuspend_clicked(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
blacklistEDlgAS = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
|
|
|
|
blacklistEDlgAS = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
|
|
|
|
|
|
|
|
|
|
|
|
connect( blacklistEDlgAS, TQT_SIGNAL(config_finished(TQStringList)), this,
|
|
|
|
connect( blacklistEDlgAS, TQT_SIGNAL(config_finished(TQStringList)), this,
|
|
|
|
TQT_SLOT(saveSchemeSuspendBlacklist(TQStringList)));
|
|
|
|
TQT_SLOT(saveSchemeSuspendBlacklist(TQStringList)));
|
|
|
|
blacklistEDlgAS->exec();
|
|
|
|
blacklistEDlgAS->exec();
|
|
|
|
|
|
|
|
|
|
|
@ -1466,14 +1472,14 @@ void ConfigureDialog::saveSchemeSuspendBlacklist( TQStringList new_blacklist){
|
|
|
|
|
|
|
|
|
|
|
|
/* ---- START Autodimm SECTION ---- */
|
|
|
|
/* ---- START Autodimm SECTION ---- */
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This used to set the autodimm related widgets.
|
|
|
|
* This used to set the autodimm related widgets.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::cB_autoDimm_toggled( bool toggled ) {
|
|
|
|
void ConfigureDialog::cB_autoDimm_toggled( bool toggled ) {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if(cB_autoDimm->isOn() != toggled)
|
|
|
|
if(cB_autoDimm->isOn() != toggled)
|
|
|
|
cB_autoDimm->setChecked(toggled);
|
|
|
|
cB_autoDimm->setChecked(toggled);
|
|
|
|
|
|
|
|
|
|
|
|
if (toggled)
|
|
|
|
if (toggled)
|
|
|
|
tL_autoDimmExplain->setEnabled(toggled);
|
|
|
|
tL_autoDimmExplain->setEnabled(toggled);
|
|
|
@ -1487,7 +1493,7 @@ void ConfigureDialog::cB_autoDimm_toggled( bool toggled ) {
|
|
|
|
|
|
|
|
|
|
|
|
if (cB_BlacklistDimm->isOn())
|
|
|
|
if (cB_BlacklistDimm->isOn())
|
|
|
|
pB_editBlacklistDimm->setEnabled(toggled);
|
|
|
|
pB_editBlacklistDimm->setEnabled(toggled);
|
|
|
|
|
|
|
|
|
|
|
|
if (toggled) {
|
|
|
|
if (toggled) {
|
|
|
|
if (sB_autoDimmTime->value() > 0) {
|
|
|
|
if (sB_autoDimmTime->value() > 0) {
|
|
|
|
tL_autoDimmTo->setEnabled(true);
|
|
|
|
tL_autoDimmTo->setEnabled(true);
|
|
|
@ -1513,7 +1519,7 @@ void ConfigureDialog::cB_BlacklistDimm_toggled( bool toggled ){
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
pB_editBlacklistDimm->setEnabled(toggled);
|
|
|
|
pB_editBlacklistDimm->setEnabled(toggled);
|
|
|
|
|
|
|
|
|
|
|
|
if(initalised) {
|
|
|
|
if(initalised) {
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
scheme_changed = true;
|
|
|
|
scheme_changed = true;
|
|
|
@ -1561,8 +1567,8 @@ void ConfigureDialog::pB_editBlacklistDimm_clicked(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
blacklistEDlgAD = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
|
|
|
|
blacklistEDlgAD = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
|
|
|
|
|
|
|
|
|
|
|
|
connect( blacklistEDlgAD, TQT_SIGNAL(config_finished(TQStringList)), this,
|
|
|
|
connect( blacklistEDlgAD, TQT_SIGNAL(config_finished(TQStringList)), this,
|
|
|
|
TQT_SLOT(saveSchemeDimmBlacklist(TQStringList)));
|
|
|
|
TQT_SLOT(saveSchemeDimmBlacklist(TQStringList)));
|
|
|
|
blacklistEDlgAD->exec();
|
|
|
|
blacklistEDlgAD->exec();
|
|
|
|
|
|
|
|
|
|
|
@ -1667,9 +1673,9 @@ void ConfigureDialog::pB_resetBrightness_clicked( ) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void ConfigureDialog::sB_batWarning_valueChanged() {
|
|
|
|
void ConfigureDialog::sB_batWarning_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_batWarning->value() == 0 )
|
|
|
|
if (sB_batWarning->value() == 0 )
|
|
|
|
sB_batWarning->setValue(1);
|
|
|
|
sB_batWarning->setValue(1);
|
|
|
|
if ( sB_batWarning->value() <= sB_batLow->value()) {
|
|
|
|
if ( sB_batWarning->value() <= sB_batLow->value()) {
|
|
|
|
sB_batLow->setValue(sB_batWarning->value()-1);
|
|
|
|
sB_batLow->setValue(sB_batWarning->value()-1);
|
|
|
@ -1686,7 +1692,7 @@ void ConfigureDialog::sB_batLow_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_batLow->value() == 0 )
|
|
|
|
if (sB_batLow->value() == 0 )
|
|
|
|
sB_batLow->setValue(1);
|
|
|
|
sB_batLow->setValue(1);
|
|
|
|
|
|
|
|
|
|
|
|
if ( sB_batLow->value() >= sB_batWarning->value()) {
|
|
|
|
if ( sB_batLow->value() >= sB_batWarning->value()) {
|
|
|
@ -1707,7 +1713,7 @@ void ConfigureDialog::sB_batCritical_valueChanged() {
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
|
|
if (initalised) {
|
|
|
|
if (initalised) {
|
|
|
|
if (sB_batCritical->value() == 0 )
|
|
|
|
if (sB_batCritical->value() == 0 )
|
|
|
|
sB_batCritical->setValue(1);
|
|
|
|
sB_batCritical->setValue(1);
|
|
|
|
if ( sB_batCritical->value() >= sB_batLow->value()) {
|
|
|
|
if ( sB_batCritical->value() >= sB_batLow->value()) {
|
|
|
|
sB_batLow->setValue(sB_batCritical->value()+1);
|
|
|
|
sB_batLow->setValue(sB_batCritical->value()+1);
|
|
|
@ -1797,6 +1803,9 @@ TQString ConfigureDialog::mapActionToDescription( TQString action ) {
|
|
|
|
} else if (action.startsWith("SUSPEND2RAM")) {
|
|
|
|
} else if (action.startsWith("SUSPEND2RAM")) {
|
|
|
|
if (actions.contains("Suspend to RAM"))
|
|
|
|
if (actions.contains("Suspend to RAM"))
|
|
|
|
ret = i18n("Suspend to RAM");
|
|
|
|
ret = i18n("Suspend to RAM");
|
|
|
|
|
|
|
|
} else if (action.startsWith("FREEZE")) {
|
|
|
|
|
|
|
|
if (actions.contains("Freeze"))
|
|
|
|
|
|
|
|
ret = i18n("Freeze");
|
|
|
|
} else if (action.startsWith("CPUFRETQ_POWERSAVE")) {
|
|
|
|
} else if (action.startsWith("CPUFRETQ_POWERSAVE")) {
|
|
|
|
if (hwinfo->supportCPUFreq())
|
|
|
|
if (hwinfo->supportCPUFreq())
|
|
|
|
ret = i18n("CPU Powersave policy");
|
|
|
|
ret = i18n("CPU Powersave policy");
|
|
|
@ -1809,7 +1818,7 @@ TQString ConfigureDialog::mapActionToDescription( TQString action ) {
|
|
|
|
} else if (action.startsWith("BRIGHTNESS")) {
|
|
|
|
} else if (action.startsWith("BRIGHTNESS")) {
|
|
|
|
if (hwinfo->supportBrightness())
|
|
|
|
if (hwinfo->supportBrightness())
|
|
|
|
ret = i18n("Set Brightness to");
|
|
|
|
ret = i18n("Set Brightness to");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
@ -1827,28 +1836,31 @@ TQString ConfigureDialog::mapDescriptionToAction( TQString description ) {
|
|
|
|
|
|
|
|
|
|
|
|
if (description.startsWith("Shutdown") || description.startsWith(i18n("Shutdown"))) {
|
|
|
|
if (description.startsWith("Shutdown") || description.startsWith(i18n("Shutdown"))) {
|
|
|
|
ret = "SHUTDOWN";
|
|
|
|
ret = "SHUTDOWN";
|
|
|
|
} else if (description.startsWith("Logout Dialog") ||
|
|
|
|
} else if (description.startsWith("Logout Dialog") ||
|
|
|
|
description.startsWith(i18n("Logout Dialog"))) {
|
|
|
|
description.startsWith(i18n("Logout Dialog"))) {
|
|
|
|
ret = "LOGOUT_DIALOG";
|
|
|
|
ret = "LOGOUT_DIALOG";
|
|
|
|
} else if (description.startsWith("Suspend to Disk") ||
|
|
|
|
} else if (description.startsWith("Suspend to Disk") ||
|
|
|
|
description.startsWith(i18n("Suspend to Disk"))) {
|
|
|
|
description.startsWith(i18n("Suspend to Disk"))) {
|
|
|
|
ret = "SUSPEND2DISK";
|
|
|
|
ret = "SUSPEND2DISK";
|
|
|
|
} else if (description.startsWith("Suspend to RAM") ||
|
|
|
|
} else if (description.startsWith("Suspend to RAM") ||
|
|
|
|
description.startsWith(i18n("Suspend to RAM"))) {
|
|
|
|
description.startsWith(i18n("Suspend to RAM"))) {
|
|
|
|
ret = "SUSPEND2RAM";
|
|
|
|
ret = "SUSPEND2RAM";
|
|
|
|
} else if (description.startsWith("CPU Powersave policy") ||
|
|
|
|
} else if (description.startsWith("Freeze") ||
|
|
|
|
|
|
|
|
description.startsWith(i18n("Freeze"))) {
|
|
|
|
|
|
|
|
ret = "FREEZE";
|
|
|
|
|
|
|
|
} else if (description.startsWith("CPU Powersave policy") ||
|
|
|
|
description.startsWith(i18n("CPU Powersave policy"))) {
|
|
|
|
description.startsWith(i18n("CPU Powersave policy"))) {
|
|
|
|
ret = "CPUFRETQ_POWERSAVE";
|
|
|
|
ret = "CPUFRETQ_POWERSAVE";
|
|
|
|
} else if (description.startsWith("CPU Dynamic policy") ||
|
|
|
|
} else if (description.startsWith("CPU Dynamic policy") ||
|
|
|
|
description.startsWith(i18n("CPU Dynamic policy"))) {
|
|
|
|
description.startsWith(i18n("CPU Dynamic policy"))) {
|
|
|
|
ret = "CPUFRETQ_DYNAMIC";
|
|
|
|
ret = "CPUFRETQ_DYNAMIC";
|
|
|
|
} else if (description.startsWith("CPU Performance policy") ||
|
|
|
|
} else if (description.startsWith("CPU Performance policy") ||
|
|
|
|
description.startsWith(i18n("CPU Performance policy"))) {
|
|
|
|
description.startsWith(i18n("CPU Performance policy"))) {
|
|
|
|
ret = "CPUFRETQ_PERFORMANCE";
|
|
|
|
ret = "CPUFRETQ_PERFORMANCE";
|
|
|
|
} else if (description.startsWith("Set Brightness to") ||
|
|
|
|
} else if (description.startsWith("Set Brightness to") ||
|
|
|
|
description.startsWith(i18n("Set Brightness to"))) {
|
|
|
|
description.startsWith(i18n("Set Brightness to"))) {
|
|
|
|
ret = "BRIGHTNESS";
|
|
|
|
ret = "BRIGHTNESS";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|