settings->hide();
init();
- refresh();
- // setup auto rotation
- setAutoRotation();
+ //applies the settings from the settings dialog
+ applySettings();
//initialize orientation
orientationChanged();
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
- connect(settings, SIGNAL(settingsChanged()), this, SLOT(setAutoRotation()));
+ connect(settings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));
}
}
#endif
+ //check for 599MHz <-> 600MHz problem on power kernels
+ if (max == "600000" && settings->usePowerKernel()) {
+ //we really need to set the maximum to 599MHz
+ max = "599000";
+ }
+
callHelper( "set_maxfreq", max );
refresh();
/**
+ * SLOT: applies the settings from the Settings dialog.
+ */
+void MainWindow::applySettings()
+{
+ setAutoRotation();
+ setAdvancedTemperature();
+
+ //refresh the GUI after applying the settings
+ refresh();
+}
+
+
+/**
* Calls the QCPUFreq helper script with "sudo action param"
*
* @param action : the action of the helper script
/**
+ * Checks the settings if the "bq27x00_battery" needs to be loaded.
+ */
+void MainWindow::setAdvancedTemperature()
+{
+ if (settings->usePowerKernel() && settings->useAdvancedTemperature()) {
+ callHelper( "load_bq27", "null" );
+ }
+}
+
+
+/**
* Enables or disables the auto-rotation feature of Maemo5 devices.
*/
void MainWindow::setAutoRotation()