mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 20:09:55 +03:00
Fix Ubuntu PKEXEC issue, enable spanish translation (not available yet)
This commit is contained in:
@@ -117,8 +117,8 @@ void MainWindow::onPrevButtonClicked()
|
||||
|
||||
void MainWindow::updateNavigationButtons(int currentIndex)
|
||||
{
|
||||
prevButton->setEnabled(currentIndex > 0||(ui->actionCyclic_Navigation->isChecked() && buttonGroup->buttons().size() > 1)); // We can use setVisible if we want to mimic CrystalDiskInfo
|
||||
nextButton->setEnabled(currentIndex < buttonGroup->buttons().size() - 1||ui->actionCyclic_Navigation->isChecked());
|
||||
prevButton->setEnabled(currentIndex > 0 || (ui->actionCyclic_Navigation->isChecked() && buttonGroup->buttons().size() > 1)); // We can use setVisible if we want to mimic CrystalDiskInfo
|
||||
nextButton->setEnabled(currentIndex < buttonGroup->buttons().size() - 1 || ui->actionCyclic_Navigation->isChecked());
|
||||
}
|
||||
|
||||
void MainWindow::updateUI()
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file alias="translations/kdiskinfo_el_GR.qm">../translations/kdiskinfo_el_GR.qm</file>
|
||||
<file alias="translations/kdiskinfo_es_ES.qm">../translations/kdiskinfo_es_ES.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -45,7 +45,7 @@ QString utils::getSmartctlOutput(const QStringList &arguments, bool root, bool i
|
||||
process.waitForFinished(-1);
|
||||
}
|
||||
|
||||
if (process.exitCode() == 127) {
|
||||
if (process.exitCode() == 126 || process.exitCode() == 127) {
|
||||
QMessageBox::critical(nullptr, QObject::tr("KDiskInfo Error"), QObject::tr("KDiskInfo needs root access in order to read S.M.A.R.T. data!"));
|
||||
if (initializing) {
|
||||
QTimer::singleShot(0, qApp, &QApplication::quit);
|
||||
@@ -136,7 +136,7 @@ void utils::cancelSelfTest(const QString &deviceNode)
|
||||
process.start("pkexec", arguments);
|
||||
process.waitForFinished(-1);
|
||||
|
||||
if (process.exitCode() == 127) {
|
||||
if (process.exitCode() == 126 || process.exitCode() == 127) {
|
||||
QMessageBox::critical(nullptr, QObject::tr("KDiskInfo Error"), QObject::tr("KDiskInfo needs root access in order to abort a self-test!"));
|
||||
} else if (process.exitCode() == QProcess::NormalExit) {
|
||||
QMessageBox::information(nullptr, QObject::tr("Test Requested"), QObject::tr("The self-test has been aborted"));
|
||||
|
||||
BIN
translations/kdiskinfo_es_ES.qm
Normal file
BIN
translations/kdiskinfo_es_ES.qm
Normal file
Binary file not shown.
Reference in New Issue
Block a user