From: Daniel Klaffenbach Date: Wed, 10 Nov 2010 13:34:22 +0000 (+0100) Subject: Only show save option if "kernel-config" is installed X-Git-Tag: v0.4.1~6 X-Git-Url: http://vcs.maemo.org/git/?p=qcpufreq;a=commitdiff_plain;h=16e23f9507de56a6137f09a605b2b664b6e90576 Only show save option if "kernel-config" is installed --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0bde7e5..fa0cd97 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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); + } } }