Also apply auto-rotation to settings dialog
[qcpufreq] / src / mainwindow.cpp
index 0bde7e5..8c4f1a2 100644 (file)
@@ -359,7 +359,12 @@ void MainWindow::init()
 
     //enable save option on power kernels
     if (settings->usePowerKernel()) {
-        ui->actionSave->setEnabled(true);
+        //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);
+        }
     }
 }
 
@@ -490,6 +495,7 @@ void MainWindow::setAutoRotation()
 {
 #if defined(Q_WS_MAEMO_5)
     setAttribute(Qt::WA_Maemo5AutoOrientation, settings->useAutoRotate());
+    settings->setAttribute(Qt::WA_Maemo5AutoOrientation, settings->useAutoRotate());
 #endif
 }