projects
/
qcpufreq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c5e19a
)
Ask settings dialog about kernel-config
author
Daniel Klaffenbach
<danielklaffenbach@gmail.com>
Tue, 21 Dec 2010 12:55:59 +0000
(13:55 +0100)
committer
Daniel Klaffenbach
<danielklaffenbach@gmail.com>
Tue, 21 Dec 2010 12:55:59 +0000
(13:55 +0100)
src/mainwindow.cpp
patch
|
blob
|
history
diff --git
a/src/mainwindow.cpp
b/src/mainwindow.cpp
index
75fa296
..
cf9f702
100644
(file)
--- a/
src/mainwindow.cpp
+++ b/
src/mainwindow.cpp
@@
-160,6
+160,13
@@
void MainWindow::applySettings()
setAutoRotation();
setAdvancedTemperature();
setAutoRotation();
setAdvancedTemperature();
+ //if overclocking is/was enabled we can also enable the "Load preset" option
+ if (settings->useOverclocking() && settings->usePowerKernel() && settings->isKernelConfigInstalled()) {
+ ui->actionLoad->setEnabled(true);
+ } else {
+ ui->actionLoad->setEnabled(false);
+ }
+
//refresh the GUI after applying the settings
refresh();
}
//refresh the GUI after applying the settings
refresh();
}
@@
-363,14
+370,13
@@
void MainWindow::init()
} else {
this->minFreq = min.toInt();
}
} else {
this->minFreq = min.toInt();
}
+ file.close();
//enable save and load option on power kernels
//enable save and load option on power kernels
- if (settings->usePowerKernel()) {
- //only enable save if /usr/sbin/kernel-config is present
- file.close();
- file.setFileName("/usr/sbin/kernel-config");
- if (file.exists()) {
- ui->actionSave->setEnabled(true);
+ if (settings->usePowerKernel() && settings->isKernelConfigInstalled()) {
+ ui->actionSave->setEnabled(true);
+ //loading presets may cause overclocking - only enable it if overclokcing is enabled
+ if (settings->useOverclocking()) {
ui->actionLoad->setEnabled(true);
}
}
ui->actionLoad->setEnabled(true);
}
}
@@
-392,7
+398,7
@@
void MainWindow::loadPreset(QString presetName)
{
#if defined(Q_WS_MAEMO_5)
callHelper("loadpreset", presetName);
{
#if defined(Q_WS_MAEMO_5)
callHelper("loadpreset", presetName);
- QMaemo5InformationBox::information(this, tr( "The preset %s was loaded." ), QMaemo5InformationBox::DefaultTimeout);
+ QMaemo5InformationBox::information(this, tr( "The preset was loaded." ), QMaemo5InformationBox::DefaultTimeout);
#endif
}
#endif
}