Improve semantic markup.
This commit is contained in:
parent
63683b5712
commit
f81cb3cc30
|
@ -52,17 +52,17 @@ ConfigureOptionsDialog::ConfigureOptionsDialog(QWidget* parent, const OperationS
|
|||
|
||||
KPageWidgetItem* item = nullptr;
|
||||
|
||||
item = addPage(&generalPageWidget(), i18nc("@title:tab general application settings", "General"), QString(), i18n("General Settings"));
|
||||
item = addPage(&generalPageWidget(), xi18nc("@title:tab general application settings", "General"), QString(), i18n("General Settings"));
|
||||
item->setIcon(QIcon::fromTheme(QStringLiteral("partitionmanager")).pixmap(IconSize(KIconLoader::Desktop)));
|
||||
|
||||
connect(&generalPageWidget().comboDefaultFileSystem(), static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &ConfigureOptionsDialog::onComboDefaultFileSystemActivated);
|
||||
connect(generalPageWidget().radioButton, &QRadioButton::toggled, this, &ConfigureOptionsDialog::onShredSourceActivated);
|
||||
|
||||
item = addPage(&fileSystemColorsPageWidget(), i18nc("@title:tab", "File System Colors"), QString(), i18n("File System Color Settings"));
|
||||
item = addPage(&fileSystemColorsPageWidget(), xi18nc("@title:tab", "File System Colors"), QString(), i18n("File System Color Settings"));
|
||||
item->setIcon(QIcon::fromTheme(QStringLiteral("format-fill-color")).pixmap(IconSize(KIconLoader::Desktop)));
|
||||
|
||||
if (QCoreApplication::arguments().contains(QLatin1String("--advconfig"))) {
|
||||
item = addPage(&advancedPageWidget(), i18nc("@title:tab advanced application settings", "Advanced"), QString(), i18n("Advanced Settings"));
|
||||
item = addPage(&advancedPageWidget(), xi18nc("@title:tab advanced application settings", "Advanced"), QString(), i18n("Advanced Settings"));
|
||||
item->setIcon(QIcon::fromTheme(QStringLiteral("configure")).pixmap(IconSize(KIconLoader::Desktop)));
|
||||
|
||||
connect(&advancedPageWidget().comboBackend(), static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &ConfigureOptionsDialog::onComboDefaultFileSystemActivated);
|
||||
|
|
|
@ -92,7 +92,7 @@ ApplyProgressDialog::ApplyProgressDialog(QWidget* parent, OperationRunner& orunn
|
|||
okButton = dialogButtonBox->addButton(QDialogButtonBox::Ok);
|
||||
cancelButton = dialogButtonBox->addButton(QDialogButtonBox::Cancel);
|
||||
detailsButton = new QPushButton;
|
||||
detailsButton->setText(i18n("&Details") + QStringLiteral(" >>"));
|
||||
detailsButton->setText(xi18nc("@action:button", "&Details") + QStringLiteral(" >>"));
|
||||
detailsButton->setIcon(QIcon::fromTheme(QStringLiteral("help-about")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
dialogButtonBox->addButton(detailsButton, QDialogButtonBox::ActionRole);
|
||||
mainLayout->addWidget(dialogButtonBox);
|
||||
|
@ -134,7 +134,7 @@ void ApplyProgressDialog::setupConnections()
|
|||
/** Shows the dialog */
|
||||
void ApplyProgressDialog::show()
|
||||
{
|
||||
setStatus(i18nc("@info:progress", "Setting up..."));
|
||||
setStatus(xi18nc("@info:progress", "Setting up..."));
|
||||
|
||||
resetReport();
|
||||
|
||||
|
@ -178,7 +178,7 @@ void ApplyProgressDialog::toggleDetails()
|
|||
{
|
||||
const bool isVisible = detailsWidget().isVisible();
|
||||
detailsWidget().setVisible(!isVisible);
|
||||
detailsButton->setText(i18n("&Details") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
|
||||
detailsButton->setText(xi18nc("@action:button", "&Details") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::onDetailsButton()
|
||||
|
@ -197,7 +197,7 @@ void ApplyProgressDialog::onCancelButton()
|
|||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
cancelButton->setEnabled(false);
|
||||
setStatus(i18nc("@info:progress", "Waiting for operation to finish..."));
|
||||
setStatus(xi18nc("@info:progress", "Waiting for operation to finish..."));
|
||||
repaint();
|
||||
dialogWidget().repaint();
|
||||
|
||||
|
@ -208,7 +208,7 @@ void ApplyProgressDialog::onCancelButton()
|
|||
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
if (KMessageBox::questionYesNo(this, i18nc("@info", "Do you really want to cancel?"), i18nc("@title:window", "Cancel Running Operations"), KGuiItem(i18nc("@action:button", "Yes, Cancel Operations"), QStringLiteral("dialog-ok")), KStandardGuiItem::no()) == KMessageBox::Yes)
|
||||
if (KMessageBox::questionYesNo(this, xi18nc("@info", "Do you really want to cancel?"), xi18nc("@title:window", "Cancel Running Operations"), KGuiItem(xi18nc("@action:button", "Yes, Cancel Operations"), QStringLiteral("dialog-ok")), KStandardGuiItem::no()) == KMessageBox::Yes)
|
||||
// in the meantime while we were showing the messagebox, the runner might have finished.
|
||||
if (operationRunner().isRunning())
|
||||
operationRunner().cancel();
|
||||
|
@ -227,17 +227,17 @@ void ApplyProgressDialog::onOkButton()
|
|||
|
||||
void ApplyProgressDialog::onAllOpsFinished()
|
||||
{
|
||||
allOpsDone(i18nc("@info:progress", "All operations successfully finished."));
|
||||
allOpsDone(xi18nc("@info:progress", "All operations successfully finished."));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::onAllOpsCancelled()
|
||||
{
|
||||
allOpsDone(i18nc("@info:progress", "Operations cancelled."));
|
||||
allOpsDone(xi18nc("@info:progress", "Operations cancelled."));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::onAllOpsError()
|
||||
{
|
||||
allOpsDone(i18nc("@info:progress", "There were errors while applying operations. Aborted."));
|
||||
allOpsDone(xi18nc("@info:progress", "There were errors while applying operations. Aborted."));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::allOpsDone(const QString& msg)
|
||||
|
@ -350,7 +350,7 @@ void ApplyProgressDialog::setStatus(const QString& s)
|
|||
|
||||
QString ApplyProgressDialog::opDesc(int num, const Operation& op) const
|
||||
{
|
||||
return i18nc("@info:progress", "[%1/%2] - %3: %4", num, operationRunner().numOperations(), op.statusText(), op.description());
|
||||
return xi18nc("@info:progress", "[%1/%2] - %3: %4", num, operationRunner().numOperations(), op.statusText(), op.description());
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::addTaskOutput(int num, const Operation& op)
|
||||
|
@ -384,7 +384,7 @@ void ApplyProgressDialog::onSecondElapsed()
|
|||
}
|
||||
|
||||
const QTime outputTime = QTime(0, 0).addMSecs(time().elapsed());
|
||||
dialogWidget().totalTime().setText(i18nc("@info:progress", "Total Time: %1", outputTime.toString(timeFormat())));
|
||||
dialogWidget().totalTime().setText(xi18nc("@info:progress", "Total Time: %1", outputTime.toString(timeFormat())));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::keyPressEvent(QKeyEvent* e)
|
||||
|
@ -432,7 +432,7 @@ void ApplyProgressDialog::saveReport()
|
|||
if (job->error())
|
||||
job->ui()->showErrorMessage();
|
||||
} else
|
||||
KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), i18nc("@title:window", "Could Not Save Report."));
|
||||
KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), xi18nc("@title:window", "Could Not Save Report."));
|
||||
}
|
||||
|
||||
void ApplyProgressDialog::browserReport()
|
||||
|
@ -457,7 +457,7 @@ void ApplyProgressDialog::browserReport()
|
|||
file.setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther);
|
||||
|
||||
if (!KRun::runUrl(QUrl::fromLocalFile(file.fileName()), QStringLiteral("text/html"), this, true))
|
||||
KMessageBox::sorry(this, i18nc("@info", "The configured external browser could not be run. Please check your settings."), i18nc("@title:window", "Could Not Launch Browser."));
|
||||
KMessageBox::sorry(this, xi18nc("@info", "The configured external browser could not be run. Please check your settings."), xi18nc("@title:window", "Could Not Launch Browser."));
|
||||
} else
|
||||
KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file <filename>%1</filename> for writing.", file.fileName()), i18nc("@title:window", "Could Not Launch Browser."));
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ CreatePartitionTableDialog::CreatePartitionTableDialog(QWidget* parent, const De
|
|||
setWindowTitle(xi18nc("@title:window", "Create a New Partition Table on <filename>%1</filename>", device().deviceNode()));
|
||||
dialogButtonBox = new QDialogButtonBox;
|
||||
createButton = dialogButtonBox->addButton(QDialogButtonBox::Ok);
|
||||
createButton->setText(i18n("Create &New Partition Table"));
|
||||
createButton->setText(xi18nc("@action:button", "Create &New Partition Table"));
|
||||
cancelButton = dialogButtonBox->addButton(QDialogButtonBox::Cancel);
|
||||
mainLayout->addWidget(dialogButtonBox);
|
||||
|
||||
|
@ -67,8 +67,8 @@ void CreatePartitionTableDialog::onMSDOSToggled(bool on)
|
|||
xi18nc("@info",
|
||||
"<para>Do you really want to create an MS-Dos partition table on <filename>%1</filename>?</para>"
|
||||
"<para>This device has more than 2^32 sectors. That is the most the MS-Dos partition table type supports, so you will not be able to use the whole device.</para>", device().deviceNode()),
|
||||
i18nc("@title:window", "Really Create MS-Dos Partition Table Type?"),
|
||||
KGuiItem(i18nc("@action:button", "Create MS-Dos Type"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@title:window", "Really Create MS-Dos Partition Table Type?"),
|
||||
KGuiItem(xi18nc("@action:button", "Create MS-Dos Type"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(), QStringLiteral("reallyCreateMSDOSOnLargeDevice")) == KMessageBox::Cancel) {
|
||||
widget().radioGPT().setChecked(true);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void DevicePropsDialog::setupDialog()
|
|||
|
||||
if (device().partitionTable() != nullptr) {
|
||||
type = (device().partitionTable()->isReadOnly())
|
||||
? i18nc("@label device", "%1 (read only)", device().partitionTable()->typeName())
|
||||
? xi18nc("@label device", "%1 (read only)", device().partitionTable()->typeName())
|
||||
: device().partitionTable()->typeName();
|
||||
maxPrimaries = QStringLiteral("%1/%2").arg(device().partitionTable()->numPrimaries()).arg(device().partitionTable()->maxPrimaries());
|
||||
|
||||
|
@ -110,7 +110,7 @@ void DevicePropsDialog::setupDialog()
|
|||
const QString sectors = QLocale().toString((device().sectorsPerTrack()));
|
||||
dialogWidget().chs().setText(QStringLiteral("%1/%2/%3").arg(cyls).arg(heads).arg(sectors));
|
||||
|
||||
dialogWidget().cylinderSize().setText(i18ncp("@label", "1 Sector", "%1 Sectors", device().cylinderSize()));
|
||||
dialogWidget().cylinderSize().setText(xi18ncp("@label", "1 Sector", "%1 Sectors", device().cylinderSize()));
|
||||
dialogWidget().primariesMax().setText(maxPrimaries);
|
||||
dialogWidget().logicalSectorSize().setText(Capacity::formatByteSize(device().logicalSectorSize()));
|
||||
dialogWidget().physicalSectorSize().setText(Capacity::formatByteSize(device().physicalSectorSize()));
|
||||
|
@ -119,14 +119,14 @@ void DevicePropsDialog::setupDialog()
|
|||
|
||||
if (device().smartStatus().isValid()) {
|
||||
if (device().smartStatus().status()) {
|
||||
dialogWidget().smartStatusText().setText(i18nc("@label SMART disk status", "good"));
|
||||
dialogWidget().smartStatusText().setText(xi18nc("@label SMART disk status", "good"));
|
||||
dialogWidget().smartStatusIcon().setPixmap(QIcon::fromTheme(QStringLiteral("dialog-ok")).pixmap(IconSize(KIconLoader::Small)));
|
||||
} else {
|
||||
dialogWidget().smartStatusText().setText(i18nc("@label SMART disk status", "BAD"));
|
||||
dialogWidget().smartStatusText().setText(xi18nc("@label SMART disk status", "BAD"));
|
||||
dialogWidget().smartStatusIcon().setPixmap(QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(IconSize(KIconLoader::Small)));
|
||||
}
|
||||
} else {
|
||||
dialogWidget().smartStatusText().setText(i18nc("@label", "(unknown)"));
|
||||
dialogWidget().smartStatusText().setText(xi18nc("@label", "(unknown)"));
|
||||
dialogWidget().smartStatusIcon().setVisible(false);
|
||||
dialogWidget().buttonSmartMore().setVisible(false);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ EditMountOptionsDialog::EditMountOptionsDialog(QWidget* parent, const QStringLis
|
|||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
setLayout(mainLayout);
|
||||
mainLayout->addWidget(&widget());
|
||||
setWindowTitle(i18nc("@title:window", "Edit additional mount options"));
|
||||
setWindowTitle(xi18nc("@title:window", "Edit additional mount options"));
|
||||
|
||||
KConfigGroup kcg(KSharedConfig::openConfig(), "editMountOptionsDialog");
|
||||
restoreGeometry(kcg.readEntry<QByteArray>("Geometry", QByteArray()));
|
||||
|
|
|
@ -66,8 +66,8 @@ void EditMountPointDialog::accept()
|
|||
if (KMessageBox::warningContinueCancel(this,
|
||||
xi18nc("@info", "<para>Are you sure you want to save the changes you made to the system table file <filename>/etc/fstab</filename>?</para>"
|
||||
"<para><warning>This will overwrite the existing file on your hard drive now. This <strong>can not be undone</strong>.</warning></para>"),
|
||||
i18nc("@title:window", "Really save changes?"),
|
||||
KGuiItem(i18nc("@action:button", "Save changes"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@title:window", "Really save changes?"),
|
||||
KGuiItem(xi18nc("@action:button", "Save changes"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(),
|
||||
QStringLiteral("reallyWriteMountPoints")) == KMessageBox::Cancel)
|
||||
return;
|
||||
|
|
|
@ -179,7 +179,7 @@ bool EditMountPointDialogWidget::readMountpoints(const QString& filename)
|
|||
if (fp == nullptr) {
|
||||
KMessageBox::sorry(this,
|
||||
xi18nc("@info", "Could not open mount point file <filename>%1</filename>.", filename),
|
||||
i18nc("@title:window", "Error while reading mount points"));
|
||||
xi18nc("@title:window", "Error while reading mount points"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ bool EditMountPointDialogWidget::writeMountpoints(const QString& filename)
|
|||
if (!rval)
|
||||
KMessageBox::sorry(this,
|
||||
xi18nc("@info", "Could not save mount points to file <filename>%1</filename>.", filename),
|
||||
i18nc("@title:window", "Error While Saving Mount Points"));
|
||||
xi18nc("@title:window", "Error While Saving Mount Points"));
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ FileSystemSupportDialog::FileSystemSupportDialog(QWidget* parent) :
|
|||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
setLayout(mainLayout);
|
||||
mainLayout->addWidget(&dialogWidget());
|
||||
setWindowTitle(i18nc("@title:window", "File System Support"));
|
||||
setWindowTitle(xi18nc("@title:window", "File System Support"));
|
||||
dialogButtonBox = new QDialogButtonBox(this);
|
||||
dialogButtonBox -> setStandardButtons(QDialogButtonBox::Ok);
|
||||
mainLayout->addWidget(dialogButtonBox);
|
||||
|
|
|
@ -48,7 +48,7 @@ InfoPane::InfoPane(QWidget* parent) :
|
|||
/** Clears the InfoPane, leaving it empty */
|
||||
void InfoPane::clear()
|
||||
{
|
||||
parentWidget()->parentWidget()->setWindowTitle(i18nc("@title:window", "Information"));
|
||||
parentWidget()->parentWidget()->setWindowTitle(xi18nc("@title:window", "Information"));
|
||||
qDeleteAll(findChildren<QLabel*>());
|
||||
qDeleteAll(findChildren<QFrame*>());
|
||||
}
|
||||
|
@ -107,31 +107,31 @@ void InfoPane::createLabels(const QString& title, const QString& value, const in
|
|||
void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
|
||||
{
|
||||
clear();
|
||||
parentWidget()->parentWidget()->setWindowTitle(i18nc("@title:window", "Partition Information"));
|
||||
parentWidget()->parentWidget()->setWindowTitle(xi18nc("@title:window", "Partition Information"));
|
||||
|
||||
int x = 0;
|
||||
int y = createHeader(p.deviceNode(), cols(area));
|
||||
if (p.fileSystem().type() == FileSystem::Luks) {
|
||||
const FS::luks* luksFs = dynamic_cast<const FS::luks*>(&p.fileSystem());
|
||||
QString deviceNode = p.partitionPath();
|
||||
createLabels(i18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Cipher name:"), luksFs->getCipherName(deviceNode), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Cipher mode:"), luksFs->getCipherMode(deviceNode), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Hash:"), luksFs->getHashName(deviceNode), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Key size:"), QString::number(luksFs->getKeySize(deviceNode)), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Payload offset:"), QString::number(luksFs->getPayloadOffset(deviceNode)), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Cipher name:"), luksFs->getCipherName(deviceNode), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Cipher mode:"), luksFs->getCipherMode(deviceNode), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Hash:"), luksFs->getHashName(deviceNode), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Key size:"), QString::number(luksFs->getKeySize(deviceNode)), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Payload offset:"), QString::number(luksFs->getPayloadOffset(deviceNode)), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
|
||||
} else {
|
||||
createLabels(i18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,32 +142,32 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
|
|||
void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d)
|
||||
{
|
||||
clear();
|
||||
parentWidget()->parentWidget()->setWindowTitle(i18nc("@title:window", "Device Information"));
|
||||
parentWidget()->parentWidget()->setWindowTitle(xi18nc("@title:window", "Device Information"));
|
||||
|
||||
int x = 0;
|
||||
int y = createHeader(d.name(), cols(area));
|
||||
createLabels(i18nc("@label device", "Path:"), d.deviceNode(), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Path:"), d.deviceNode(), cols(area), x, y);
|
||||
|
||||
QString type = QStringLiteral("---");
|
||||
QString maxPrimaries = QStringLiteral("---");
|
||||
|
||||
if (d.partitionTable() != nullptr) {
|
||||
type = (d.partitionTable()->isReadOnly())
|
||||
? i18nc("@label device", "%1 (read only)", d.partitionTable()->typeName())
|
||||
? xi18nc("@label device", "%1 (read only)", d.partitionTable()->typeName())
|
||||
: d.partitionTable()->typeName();
|
||||
maxPrimaries = QStringLiteral("%1/%2").arg(d.partitionTable()->numPrimaries()).arg(d.partitionTable()->maxPrimaries());
|
||||
}
|
||||
|
||||
createLabels(i18nc("@label device", "Type:"), type, cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Capacity:"), Capacity::formatByteSize(d.capacity()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Total sectors:"), QLocale().toString(d.totalSectors()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Heads:"), QString::number(d.heads()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Cylinders:"), QLocale().toString(d.cylinders()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Sectors:"), QLocale().toString(d.sectorsPerTrack()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Logical sector size:"), Capacity::formatByteSize(d.logicalSectorSize()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Physical sector size:"), Capacity::formatByteSize(d.physicalSectorSize()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Cylinder size:"), i18ncp("@label", "1 Sector", "%1 Sectors", d.cylinderSize()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Primaries/Max:"), maxPrimaries, cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Type:"), type, cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Capacity:"), Capacity::formatByteSize(d.capacity()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Total sectors:"), QLocale().toString(d.totalSectors()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Heads:"), QString::number(d.heads()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Cylinders:"), QLocale().toString(d.cylinders()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Sectors:"), QLocale().toString(d.sectorsPerTrack()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Logical sector size:"), Capacity::formatByteSize(d.logicalSectorSize()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Physical sector size:"), Capacity::formatByteSize(d.physicalSectorSize()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Cylinder size:"), xi18ncp("@label", "1 Sector", "%1 Sectors", d.cylinderSize()), cols(area), x, y);
|
||||
createLabels(xi18nc("@label device", "Primaries/Max:"), maxPrimaries, cols(area), x, y);
|
||||
}
|
||||
|
||||
quint32 InfoPane::cols(Qt::DockWidgetArea area) const
|
||||
|
|
|
@ -40,7 +40,7 @@ InsertDialog::InsertDialog(QWidget* parent, Device& device, Partition& insertedP
|
|||
SizeDialogBase(parent, device, insertedPartition, destpartition.firstSector(), destpartition.lastSector()),
|
||||
m_DestPartition(destpartition)
|
||||
{
|
||||
setWindowTitle(i18nc("@title:window", "Insert a partition"));
|
||||
setWindowTitle(xi18nc("@title:window", "Insert a partition"));
|
||||
|
||||
partition().move(destPartition().firstSector());
|
||||
partition().fileSystem().move(destPartition().fileSystem().firstSector());
|
||||
|
|
|
@ -146,7 +146,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
|||
if (KMessageBox::warningContinueCancel(this,
|
||||
xi18ncp("@info", "<para>Do you really want to quit the application?</para><para>There is still an operation pending.</para>",
|
||||
"<para>Do you really want to quit the application?</para><para>There are still %1 operations pending.</para>", operationStack().size()),
|
||||
i18nc("@title:window", "Discard Pending Operations and Quit?"),
|
||||
xi18nc("@title:window", "Discard Pending Operations and Quit?"),
|
||||
KGuiItem(xi18nc("@action:button", "Quit <application>%1</application>", QGuiApplication::applicationDisplayName()), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(), QStringLiteral("reallyQuit")) == KMessageBox::Cancel) {
|
||||
event->ignore();
|
||||
|
@ -188,191 +188,191 @@ void MainWindow::setupActions()
|
|||
QAction* undoOperation = actionCollection()->addAction(QStringLiteral("undoOperation"));
|
||||
connect(undoOperation, &QAction::triggered, this, &MainWindow::onUndoOperation);
|
||||
undoOperation->setEnabled(false);
|
||||
undoOperation->setText(i18nc("@action:inmenu", "Undo"));
|
||||
undoOperation->setToolTip(i18nc("@info:tooltip", "Undo the last operation"));
|
||||
undoOperation->setStatusTip(i18nc("@info:status", "Remove the last operation from the list."));
|
||||
undoOperation->setText(xi18nc("@action:inmenu", "Undo"));
|
||||
undoOperation->setToolTip(xi18nc("@info:tooltip", "Undo the last operation"));
|
||||
undoOperation->setStatusTip(xi18nc("@info:status", "Remove the last operation from the list."));
|
||||
actionCollection()->setDefaultShortcut(undoOperation, QKeySequence(Qt::CTRL + Qt::Key_Z));
|
||||
undoOperation->setIcon(QIcon::fromTheme(QStringLiteral("edit-undo")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* clearAllOperations = actionCollection()->addAction(QStringLiteral("clearAllOperations"));
|
||||
connect(clearAllOperations, &QAction::triggered, this, &MainWindow::onClearAllOperations);
|
||||
clearAllOperations->setEnabled(false);
|
||||
clearAllOperations->setText(i18nc("@action:inmenu clear the list of operations", "Clear"));
|
||||
clearAllOperations->setToolTip(i18nc("@info:tooltip", "Clear all operations"));
|
||||
clearAllOperations->setStatusTip(i18nc("@info:status", "Empty the list of pending operations."));
|
||||
clearAllOperations->setText(xi18nc("@action:inmenu clear the list of operations", "Clear"));
|
||||
clearAllOperations->setToolTip(xi18nc("@info:tooltip", "Clear all operations"));
|
||||
clearAllOperations->setStatusTip(xi18nc("@info:status", "Empty the list of pending operations."));
|
||||
clearAllOperations->setIcon(QIcon::fromTheme(QStringLiteral("dialog-cancel")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* applyAllOperations = actionCollection()->addAction(QStringLiteral("applyAllOperations"));
|
||||
connect(applyAllOperations, &QAction::triggered, this, &MainWindow::onApplyAllOperations);
|
||||
applyAllOperations->setEnabled(false);
|
||||
applyAllOperations->setText(i18nc("@action:inmenu apply all operations", "Apply"));
|
||||
applyAllOperations->setToolTip(i18nc("@info:tooltip", "Apply all operations"));
|
||||
applyAllOperations->setStatusTip(i18nc("@info:status", "Apply the pending operations in the list."));
|
||||
applyAllOperations->setText(xi18nc("@action:inmenu apply all operations", "Apply"));
|
||||
applyAllOperations->setToolTip(xi18nc("@info:tooltip", "Apply all operations"));
|
||||
applyAllOperations->setStatusTip(xi18nc("@info:status", "Apply the pending operations in the list."));
|
||||
applyAllOperations->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
// Device actions
|
||||
QAction* refreshDevices = actionCollection()->addAction(QStringLiteral("refreshDevices"));
|
||||
connect(refreshDevices, &QAction::triggered, this, &MainWindow::onRefreshDevices);
|
||||
refreshDevices->setText(i18nc("@action:inmenu refresh list of devices", "Refresh Devices"));
|
||||
refreshDevices->setToolTip(i18nc("@info:tooltip", "Refresh all devices"));
|
||||
refreshDevices->setStatusTip(i18nc("@info:status", "Renew the devices list."));
|
||||
refreshDevices->setText(xi18nc("@action:inmenu refresh list of devices", "Refresh Devices"));
|
||||
refreshDevices->setToolTip(xi18nc("@info:tooltip", "Refresh all devices"));
|
||||
refreshDevices->setStatusTip(xi18nc("@info:status", "Renew the devices list."));
|
||||
actionCollection()->setDefaultShortcut(refreshDevices, Qt::Key_F5);
|
||||
refreshDevices->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* createNewPartitionTable = actionCollection()->addAction(QStringLiteral("createNewPartitionTable"));
|
||||
connect(createNewPartitionTable, &QAction::triggered, this, &MainWindow::onCreateNewPartitionTable);
|
||||
createNewPartitionTable->setEnabled(false);
|
||||
createNewPartitionTable->setText(i18nc("@action:inmenu", "New Partition Table"));
|
||||
createNewPartitionTable->setToolTip(i18nc("@info:tooltip", "Create a new partition table"));
|
||||
createNewPartitionTable->setStatusTip(i18nc("@info:status", "Create a new and empty partition table on a device."));
|
||||
createNewPartitionTable->setText(xi18nc("@action:inmenu", "New Partition Table"));
|
||||
createNewPartitionTable->setToolTip(xi18nc("@info:tooltip", "Create a new partition table"));
|
||||
createNewPartitionTable->setStatusTip(xi18nc("@info:status", "Create a new and empty partition table on a device."));
|
||||
actionCollection()->setDefaultShortcut(createNewPartitionTable, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_N));
|
||||
createNewPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* exportPartitionTable = actionCollection()->addAction(QStringLiteral("exportPartitionTable"));
|
||||
connect(exportPartitionTable, &QAction::triggered, this, &MainWindow::onExportPartitionTable);
|
||||
exportPartitionTable->setEnabled(false);
|
||||
exportPartitionTable->setText(i18nc("@action:inmenu", "Export Partition Table"));
|
||||
exportPartitionTable->setToolTip(i18nc("@info:tooltip", "Export a partition table"));
|
||||
exportPartitionTable->setStatusTip(i18nc("@info:status", "Export the device's partition table to a text file."));
|
||||
exportPartitionTable->setText(xi18nc("@action:inmenu", "Export Partition Table"));
|
||||
exportPartitionTable->setToolTip(xi18nc("@info:tooltip", "Export a partition table"));
|
||||
exportPartitionTable->setStatusTip(xi18nc("@info:status", "Export the device's partition table to a text file."));
|
||||
exportPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("document-export")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* importPartitionTable = actionCollection()->addAction(QStringLiteral("importPartitionTable"));
|
||||
connect(importPartitionTable, &QAction::triggered, this, &MainWindow::onImportPartitionTable);
|
||||
importPartitionTable->setEnabled(false);
|
||||
importPartitionTable->setText(i18nc("@action:inmenu", "Import Partition Table"));
|
||||
importPartitionTable->setToolTip(i18nc("@info:tooltip", "Import a partition table"));
|
||||
importPartitionTable->setStatusTip(i18nc("@info:status", "Import a partition table from a text file."));
|
||||
importPartitionTable->setText(xi18nc("@action:inmenu", "Import Partition Table"));
|
||||
importPartitionTable->setToolTip(xi18nc("@info:tooltip", "Import a partition table"));
|
||||
importPartitionTable->setStatusTip(xi18nc("@info:status", "Import a partition table from a text file."));
|
||||
importPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("document-import")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* smartStatusDevice = actionCollection()->addAction(QStringLiteral("smartStatusDevice"));
|
||||
connect(smartStatusDevice, &QAction::triggered, this, &MainWindow::onSmartStatusDevice);
|
||||
smartStatusDevice->setEnabled(false);
|
||||
smartStatusDevice->setText(i18nc("@action:inmenu", "SMART Status"));
|
||||
smartStatusDevice->setToolTip(i18nc("@info:tooltip", "Show SMART status"));
|
||||
smartStatusDevice->setStatusTip(i18nc("@info:status", "Show the device's SMART status if supported"));
|
||||
smartStatusDevice->setText(xi18nc("@action:inmenu", "SMART Status"));
|
||||
smartStatusDevice->setToolTip(xi18nc("@info:tooltip", "Show SMART status"));
|
||||
smartStatusDevice->setStatusTip(xi18nc("@info:status", "Show the device's SMART status if supported"));
|
||||
|
||||
QAction* propertiesDevice = actionCollection()->addAction(QStringLiteral("propertiesDevice"));
|
||||
connect(propertiesDevice, &QAction::triggered, [this] {onPropertiesDevice({});});
|
||||
propertiesDevice->setEnabled(false);
|
||||
propertiesDevice->setText(i18nc("@action:inmenu", "Properties"));
|
||||
propertiesDevice->setToolTip(i18nc("@info:tooltip", "Show device properties dialog"));
|
||||
propertiesDevice->setStatusTip(i18nc("@info:status", "View and modify device properties"));
|
||||
propertiesDevice->setText(xi18nc("@action:inmenu", "Properties"));
|
||||
propertiesDevice->setToolTip(xi18nc("@info:tooltip", "Show device properties dialog"));
|
||||
propertiesDevice->setStatusTip(xi18nc("@info:status", "View and modify device properties"));
|
||||
propertiesDevice->setIcon(QIcon::fromTheme(QStringLiteral("document-properties")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
// Partition actions
|
||||
QAction* newPartition = actionCollection()->addAction(QStringLiteral("newPartition"));
|
||||
connect(newPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onNewPartition);
|
||||
newPartition->setEnabled(false);
|
||||
newPartition->setText(i18nc("@action:inmenu create a new partition", "New"));
|
||||
newPartition->setToolTip(i18nc("@info:tooltip", "New partition"));
|
||||
newPartition->setStatusTip(i18nc("@info:status", "Create a new partition."));
|
||||
newPartition->setText(xi18nc("@action:inmenu create a new partition", "New"));
|
||||
newPartition->setToolTip(xi18nc("@info:tooltip", "New partition"));
|
||||
newPartition->setStatusTip(xi18nc("@info:status", "Create a new partition."));
|
||||
actionCollection()->setDefaultShortcut(newPartition, QKeySequence(Qt::CTRL + Qt::Key_N));
|
||||
newPartition->setIcon(QIcon::fromTheme(QStringLiteral("document-new")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* resizePartition = actionCollection()->addAction(QStringLiteral("resizePartition"));
|
||||
connect(resizePartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onResizePartition);
|
||||
resizePartition->setEnabled(false);
|
||||
resizePartition->setText(i18nc("@action:inmenu", "Resize/Move"));
|
||||
resizePartition->setToolTip(i18nc("@info:tooltip", "Resize or move partition"));
|
||||
resizePartition->setStatusTip(i18nc("@info:status", "Shrink, grow or move an existing partition."));
|
||||
resizePartition->setText(xi18nc("@action:inmenu", "Resize/Move"));
|
||||
resizePartition->setToolTip(xi18nc("@info:tooltip", "Resize or move partition"));
|
||||
resizePartition->setStatusTip(xi18nc("@info:status", "Shrink, grow or move an existing partition."));
|
||||
actionCollection()->setDefaultShortcut(resizePartition, QKeySequence(Qt::CTRL + Qt::Key_R));
|
||||
resizePartition->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right-double")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* deletePartition = actionCollection()->addAction(QStringLiteral("deletePartition"));
|
||||
connect(deletePartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onDeletePartition);
|
||||
deletePartition->setEnabled(false);
|
||||
deletePartition->setText(i18nc("@action:inmenu", "Delete"));
|
||||
deletePartition->setToolTip(i18nc("@info:tooltip", "Delete partition"));
|
||||
deletePartition->setStatusTip(i18nc("@info:status", "Delete a partition."));
|
||||
deletePartition->setText(xi18nc("@action:inmenu", "Delete"));
|
||||
deletePartition->setToolTip(xi18nc("@info:tooltip", "Delete partition"));
|
||||
deletePartition->setStatusTip(xi18nc("@info:status", "Delete a partition."));
|
||||
actionCollection()->setDefaultShortcut(deletePartition, QKeySequence::Delete);
|
||||
deletePartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* shredPartition = actionCollection()->addAction(QStringLiteral("shredPartition"));
|
||||
connect(shredPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onShredPartition);
|
||||
shredPartition->setEnabled(false);
|
||||
shredPartition->setText(i18nc("@action:inmenu", "Shred"));
|
||||
shredPartition->setToolTip(i18nc("@info:tooltip", "Shred partition"));
|
||||
shredPartition->setStatusTip(i18nc("@info:status", "Shred a partition so that its contents cannot be restored."));
|
||||
shredPartition->setText(xi18nc("@action:inmenu", "Shred"));
|
||||
shredPartition->setToolTip(xi18nc("@info:tooltip", "Shred partition"));
|
||||
shredPartition->setStatusTip(xi18nc("@info:status", "Shred a partition so that its contents cannot be restored."));
|
||||
actionCollection()->setDefaultShortcut(shredPartition, QKeySequence(Qt::SHIFT + Qt::Key_Delete));
|
||||
shredPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete-shred")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* copyPartition = actionCollection()->addAction(QStringLiteral("copyPartition"));
|
||||
connect(copyPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onCopyPartition);
|
||||
copyPartition->setEnabled(false);
|
||||
copyPartition->setText(i18nc("@action:inmenu", "Copy"));
|
||||
copyPartition->setToolTip(i18nc("@info:tooltip", "Copy partition"));
|
||||
copyPartition->setStatusTip(i18nc("@info:status", "Copy an existing partition."));
|
||||
copyPartition->setText(xi18nc("@action:inmenu", "Copy"));
|
||||
copyPartition->setToolTip(xi18nc("@info:tooltip", "Copy partition"));
|
||||
copyPartition->setStatusTip(xi18nc("@info:status", "Copy an existing partition."));
|
||||
actionCollection()->setDefaultShortcut(copyPartition, QKeySequence(Qt::CTRL + Qt::Key_C));
|
||||
copyPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* pastePartition = actionCollection()->addAction(QStringLiteral("pastePartition"));
|
||||
connect(pastePartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onPastePartition);
|
||||
pastePartition->setEnabled(false);
|
||||
pastePartition->setText(i18nc("@action:inmenu", "Paste"));
|
||||
pastePartition->setToolTip(i18nc("@info:tooltip", "Paste partition"));
|
||||
pastePartition->setStatusTip(i18nc("@info:status", "Paste a copied partition."));
|
||||
pastePartition->setText(xi18nc("@action:inmenu", "Paste"));
|
||||
pastePartition->setToolTip(xi18nc("@info:tooltip", "Paste partition"));
|
||||
pastePartition->setStatusTip(xi18nc("@info:status", "Paste a copied partition."));
|
||||
actionCollection()->setDefaultShortcut(pastePartition, QKeySequence(Qt::CTRL + Qt::Key_V));
|
||||
pastePartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-paste")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* editMountPoint = actionCollection()->addAction(QStringLiteral("editMountPoint"));
|
||||
connect(editMountPoint, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onEditMountPoint);
|
||||
editMountPoint->setEnabled(false);
|
||||
editMountPoint->setText(i18nc("@action:inmenu", "Edit Mount Point"));
|
||||
editMountPoint->setToolTip(i18nc("@info:tooltip", "Edit mount point"));
|
||||
editMountPoint->setStatusTip(i18nc("@info:status", "Edit a partition's mount point and options."));
|
||||
editMountPoint->setText(xi18nc("@action:inmenu", "Edit Mount Point"));
|
||||
editMountPoint->setToolTip(xi18nc("@info:tooltip", "Edit mount point"));
|
||||
editMountPoint->setStatusTip(xi18nc("@info:status", "Edit a partition's mount point and options."));
|
||||
|
||||
QAction* mountPartition = actionCollection()->addAction(QStringLiteral("mountPartition"));
|
||||
connect(mountPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onMountPartition);
|
||||
mountPartition->setEnabled(false);
|
||||
mountPartition->setText(i18nc("@action:inmenu", "Mount"));
|
||||
mountPartition->setToolTip(i18nc("@info:tooltip", "Mount or unmount partition"));
|
||||
mountPartition->setStatusTip(i18nc("@info:status", "Mount or unmount a partition."));
|
||||
mountPartition->setText(xi18nc("@action:inmenu", "Mount"));
|
||||
mountPartition->setToolTip(xi18nc("@info:tooltip", "Mount or unmount partition"));
|
||||
mountPartition->setStatusTip(xi18nc("@info:status", "Mount or unmount a partition."));
|
||||
|
||||
QAction* decryptPartition = actionCollection()->addAction(QStringLiteral("decryptPartition"));
|
||||
connect(decryptPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onDecryptPartition);
|
||||
decryptPartition->setEnabled(false);
|
||||
decryptPartition->setText(i18nc("@action:inmenu", "Unlock"));
|
||||
decryptPartition->setToolTip(i18nc("@info:tooltip", "Unlock or lock encrypted partition"));
|
||||
decryptPartition->setStatusTip(i18nc("@info:status", "Unlock or lock encrypted partition."));
|
||||
decryptPartition->setText(xi18nc("@action:inmenu", "Unlock"));
|
||||
decryptPartition->setToolTip(xi18nc("@info:tooltip", "Unlock or lock encrypted partition"));
|
||||
decryptPartition->setStatusTip(xi18nc("@info:status", "Unlock or lock encrypted partition."));
|
||||
|
||||
QAction* checkPartition = actionCollection()->addAction(QStringLiteral("checkPartition"));
|
||||
connect(checkPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onCheckPartition);
|
||||
checkPartition->setEnabled(false);
|
||||
checkPartition->setText(i18nc("@action:inmenu", "Check"));
|
||||
checkPartition->setToolTip(i18nc("@info:tooltip", "Check partition"));
|
||||
checkPartition->setStatusTip(i18nc("@info:status", "Check a filesystem on a partition for errors."));
|
||||
checkPartition->setText(xi18nc("@action:inmenu", "Check"));
|
||||
checkPartition->setToolTip(xi18nc("@info:tooltip", "Check partition"));
|
||||
checkPartition->setStatusTip(xi18nc("@info:status", "Check a filesystem on a partition for errors."));
|
||||
checkPartition->setIcon(QIcon::fromTheme(QStringLiteral("flag")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* propertiesPartition = actionCollection()->addAction(QStringLiteral("propertiesPartition"));
|
||||
connect(propertiesPartition, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onPropertiesPartition);
|
||||
propertiesPartition->setEnabled(false);
|
||||
propertiesPartition->setText(i18nc("@action:inmenu", "Properties"));
|
||||
propertiesPartition->setToolTip(i18nc("@info:tooltip", "Show partition properties dialog"));
|
||||
propertiesPartition->setStatusTip(i18nc("@info:status", "View and modify partition properties (label, partition flags, etc.)"));
|
||||
propertiesPartition->setText(xi18nc("@action:inmenu", "Properties"));
|
||||
propertiesPartition->setToolTip(xi18nc("@info:tooltip", "Show partition properties dialog"));
|
||||
propertiesPartition->setStatusTip(xi18nc("@info:status", "View and modify partition properties (label, partition flags, etc.)"));
|
||||
propertiesPartition->setIcon(QIcon::fromTheme(QStringLiteral("document-properties")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* backup = actionCollection()->addAction(QStringLiteral("backupPartition"));
|
||||
connect(backup, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onBackupPartition);
|
||||
backup->setEnabled(false);
|
||||
backup->setText(i18nc("@action:inmenu", "Backup"));
|
||||
backup->setToolTip(i18nc("@info:tooltip", "Backup partition"));
|
||||
backup->setStatusTip(i18nc("@info:status", "Backup a partition to an image file."));
|
||||
backup->setText(xi18nc("@action:inmenu", "Backup"));
|
||||
backup->setToolTip(xi18nc("@info:tooltip", "Backup partition"));
|
||||
backup->setStatusTip(xi18nc("@info:status", "Backup a partition to an image file."));
|
||||
backup->setIcon(QIcon::fromTheme(QStringLiteral("document-export")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* restore = actionCollection()->addAction(QStringLiteral("restorePartition"));
|
||||
connect(restore, &QAction::triggered, &pmWidget(), &PartitionManagerWidget::onRestorePartition);
|
||||
restore->setEnabled(false);
|
||||
restore->setText(i18nc("@action:inmenu", "Restore"));
|
||||
restore->setToolTip(i18nc("@info:tooltip", "Restore partition"));
|
||||
restore->setStatusTip(i18nc("@info:status", "Restore a partition from an image file."));
|
||||
restore->setText(xi18nc("@action:inmenu", "Restore"));
|
||||
restore->setToolTip(xi18nc("@info:tooltip", "Restore partition"));
|
||||
restore->setStatusTip(xi18nc("@info:status", "Restore a partition from an image file."));
|
||||
restore->setIcon(QIcon::fromTheme(QStringLiteral("document-import")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
// View actions
|
||||
QAction* fileSystemSupport = actionCollection()->addAction(QStringLiteral("fileSystemSupport"));
|
||||
connect(fileSystemSupport, &QAction::triggered, this, &MainWindow::onFileSystemSupport);
|
||||
fileSystemSupport->setText(i18nc("@action:inmenu", "File System Support"));
|
||||
fileSystemSupport->setToolTip(i18nc("@info:tooltip", "View file system support information"));
|
||||
fileSystemSupport->setStatusTip(i18nc("@info:status", "Show information about supported file systems."));
|
||||
fileSystemSupport->setText(xi18nc("@action:inmenu", "File System Support"));
|
||||
fileSystemSupport->setToolTip(xi18nc("@info:tooltip", "View file system support information"));
|
||||
fileSystemSupport->setStatusTip(xi18nc("@info:status", "Show information about supported file systems."));
|
||||
|
||||
actionCollection()->addAction(QStringLiteral("toggleDockDevices"), dockDevices().toggleViewAction());
|
||||
actionCollection()->addAction(QStringLiteral("toggleDockOperations"), dockOperations().toggleViewAction());
|
||||
|
@ -385,16 +385,16 @@ void MainWindow::setupActions()
|
|||
// Log Actions
|
||||
QAction* clearLog = actionCollection()->addAction(QStringLiteral("clearLog"));
|
||||
connect(clearLog, &QAction::triggered, &treeLog(), &TreeLog::onClearLog);
|
||||
clearLog->setText(i18nc("@action:inmenu", "Clear Log"));
|
||||
clearLog->setToolTip(i18nc("@info:tooltip", "Clear the log output"));
|
||||
clearLog->setStatusTip(i18nc("@info:status", "Clear the log output panel."));
|
||||
clearLog->setText(xi18nc("@action:inmenu", "Clear Log"));
|
||||
clearLog->setToolTip(xi18nc("@info:tooltip", "Clear the log output"));
|
||||
clearLog->setStatusTip(xi18nc("@info:status", "Clear the log output panel."));
|
||||
clearLog->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-list")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
QAction* saveLog = actionCollection()->addAction(QStringLiteral("saveLog"));
|
||||
connect(saveLog, &QAction::triggered, &treeLog(), &TreeLog::onSaveLog);
|
||||
saveLog->setText(i18nc("@action:inmenu", "Save Log"));
|
||||
saveLog->setToolTip(i18nc("@info:tooltip", "Save the log output"));
|
||||
saveLog->setStatusTip(i18nc("@info:status", "Save the log output to a file."));
|
||||
saveLog->setText(xi18nc("@action:inmenu", "Save Log"));
|
||||
saveLog->setToolTip(xi18nc("@info:tooltip", "Save the log output"));
|
||||
saveLog->setStatusTip(xi18nc("@info:status", "Save the log output to a file."));
|
||||
saveLog->setIcon(QIcon::fromTheme(QStringLiteral("document-save")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
}
|
||||
|
||||
|
@ -530,7 +530,7 @@ void MainWindow::on_m_OperationStack_operationsChanged()
|
|||
// this will make sure that the info pane gets updated
|
||||
on_m_PartitionManagerWidget_selectedPartitionChanged(pmWidget().selectedPartition());
|
||||
|
||||
statusText().setText(i18ncp("@info:status", "One pending operation", "%1 pending operations", operationStack().size()));
|
||||
statusText().setText(xi18ncp("@info:status", "One pending operation", "%1 pending operations", operationStack().size()));
|
||||
}
|
||||
|
||||
void MainWindow::on_m_OperationStack_devicesChanged()
|
||||
|
@ -625,11 +625,11 @@ void MainWindow::on_m_PartitionManagerWidget_selectedPartitionChanged(const Part
|
|||
|
||||
void MainWindow::scanDevices()
|
||||
{
|
||||
Log(Log::information) << i18nc("@info/plain", "Using backend plugin: %1 (%2)",
|
||||
Log(Log::information) << xi18nc("@info:progress", "Using backend plugin: %1 (%2)",
|
||||
CoreBackendManager::self()->backend()->id(),
|
||||
CoreBackendManager::self()->backend()->version());
|
||||
|
||||
Log() << i18nc("@info/plain", "Scanning devices...");
|
||||
Log() << xi18nc("@info:progress", "Scanning devices...");
|
||||
|
||||
// remember the currently selected device's node
|
||||
setSavedSelectedDeviceNode(pmWidget().selectedDevice() ? pmWidget().selectedDevice()->deviceNode() : QString());
|
||||
|
@ -661,7 +661,7 @@ void MainWindow::on_m_DeviceScanner_finished()
|
|||
|
||||
pmWidget().updatePartitions();
|
||||
|
||||
Log() << i18nc("@info/plain", "Scan finished.");
|
||||
Log() << xi18nc("@info:progress", "Scan finished.");
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
// try to set the seleted device, either from the saved one or just select the
|
||||
|
@ -718,8 +718,8 @@ void MainWindow::onRefreshDevices()
|
|||
xi18nc("@info",
|
||||
"<para>Do you really want to rescan the devices?</para>"
|
||||
"<para><warning>This will also clear the list of pending operations.</warning></para>"),
|
||||
i18nc("@title:window", "Really Rescan the Devices?"),
|
||||
KGuiItem(i18nc("@action:button", "Rescan Devices"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@title:window", "Really Rescan the Devices?"),
|
||||
KGuiItem(xi18nc("@action:button", "Rescan Devices"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(), QStringLiteral("reallyRescanDevices")) == KMessageBox::Continue) {
|
||||
scanDevices();
|
||||
}
|
||||
|
@ -736,10 +736,10 @@ void MainWindow::onApplyAllOperations()
|
|||
xi18nc("@info",
|
||||
"<para>Do you really want to apply the pending operations listed below?</para>"
|
||||
"<para><warning>This will permanently modify your disks.</warning></para>"),
|
||||
opList, i18nc("@title:window", "Apply Pending Operations?"),
|
||||
KGuiItem(i18nc("@action:button", "Apply Pending Operations"), QStringLiteral("arrow-right")),
|
||||
opList, xi18nc("@title:window", "Apply Pending Operations?"),
|
||||
KGuiItem(xi18nc("@action:button", "Apply Pending Operations"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel()) == KMessageBox::Continue) {
|
||||
Log() << i18nc("@info/plain", "Applying operations...");
|
||||
Log() << xi18nc("@info:status", "Applying operations...");
|
||||
|
||||
applyProgressDialog().show();
|
||||
|
||||
|
@ -764,7 +764,7 @@ void MainWindow::onUndoOperation()
|
|||
if (operationStack().size() == 0)
|
||||
return;
|
||||
|
||||
Log() << i18nc("@info/plain", "Undoing operation: %1", operationStack().operations().last()->description());
|
||||
Log() << xi18nc("@info:status", "Undoing operation: %1", operationStack().operations().last()->description());
|
||||
operationStack().pop();
|
||||
|
||||
// it's possible the undo killed the partition in the clipboard. if there's a partition in the clipboard, try
|
||||
|
@ -780,11 +780,11 @@ void MainWindow::onUndoOperation()
|
|||
void MainWindow::onClearAllOperations()
|
||||
{
|
||||
if (KMessageBox::warningContinueCancel(this,
|
||||
i18nc("@info", "Do you really want to clear the list of pending operations?"),
|
||||
i18nc("@title:window", "Clear Pending Operations?"),
|
||||
KGuiItem(i18nc("@action:button", "Clear Pending Operations"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@info", "Do you really want to clear the list of pending operations?"),
|
||||
xi18nc("@title:window", "Clear Pending Operations?"),
|
||||
KGuiItem(xi18nc("@action:button", "Clear Pending Operations"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(), QStringLiteral("reallyClearPendingOperations")) == KMessageBox::Continue) {
|
||||
Log() << i18nc("@info/plain", "Clearing the list of pending operations.");
|
||||
Log() << xi18nc("@info:status", "Clearing the list of pending operations.");
|
||||
operationStack().clearOperations();
|
||||
|
||||
pmWidget().updatePartitions();
|
||||
|
@ -824,7 +824,7 @@ void MainWindow::onImportPartitionTable()
|
|||
file.setFileName(url.toLocalFile());
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open input file <filename>%1</filename> for import", url.toLocalFile()), i18nc("@title:window", "Error Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open input file <filename>%1</filename> for import", url.toLocalFile()), xi18nc("@title:window", "Error Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -834,7 +834,7 @@ void MainWindow::onImportPartitionTable()
|
|||
QTemporaryFile tempFile;
|
||||
|
||||
if (!tempFile.open()) {
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", tempFile.fileName()), i18nc("@title:window", "Error Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", tempFile.fileName()), xi18nc("@title:window", "Error Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -842,13 +842,13 @@ void MainWindow::onImportPartitionTable()
|
|||
KJobWidgets::setWindow(job, this);
|
||||
job->exec();
|
||||
if (job->error()) {
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open input file <filename>%1</filename> for import: %2", url.fileName(), job->errorString()), i18nc("@title:window", "Error Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open input file <filename>%1</filename> for import: %2", url.fileName(), job->errorString()), xi18nc("@title:window", "Error Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
file.setFileName(tempFile.fileName());
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open temporary file <filename>%1</filename> while trying to import from <filename>%2</filename>.", tempFile.fileName(), url.fileName()), i18nc("@title:window", "Error Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not open temporary file <filename>%1</filename> while trying to import from <filename>%2</filename>.", tempFile.fileName(), url.fileName()), xi18nc("@title:window", "Error Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -878,7 +878,7 @@ void MainWindow::onImportPartitionTable()
|
|||
QRegularExpressionMatch reMagic = re.match(line);
|
||||
|
||||
if (!(haveMagic || reMagic.hasMatch())) {
|
||||
KMessageBox::error(this, xi18nc("@info", "The import file <filename>%1</filename> does not contain a valid partition table.", url.fileName()), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "The import file <filename>%1</filename> does not contain a valid partition table.", url.fileName()), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
} else
|
||||
haveMagic = true;
|
||||
|
@ -888,19 +888,19 @@ void MainWindow::onImportPartitionTable()
|
|||
|
||||
if (reType.hasMatch()) {
|
||||
if (ptable != nullptr) {
|
||||
KMessageBox::error(this, i18nc("@info", "Found more than one partition table type in import file (line %1).", lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Found more than one partition table type in import file (line %1).", lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
tableType = PartitionTable::nameToTableType(reType.captured(1));
|
||||
|
||||
if (tableType == PartitionTable::unknownTableType) {
|
||||
KMessageBox::error(this, i18nc("@info", "Partition table type \"%1\" is unknown (line %2).", reType.captured(1), lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Partition table type \"%1\" is unknown (line %2).", reType.captured(1), lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (tableType != PartitionTable::msdos && tableType != PartitionTable::gpt) {
|
||||
KMessageBox::error(this, i18nc("@info", "Partition table type \"%1\" is not supported for import (line %2).", reType.captured(1), lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Partition table type \"%1\" is not supported for import (line %2).", reType.captured(1), lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -910,7 +910,7 @@ void MainWindow::onImportPartitionTable()
|
|||
// currently ignored
|
||||
} else if (rePartition.hasMatch()) {
|
||||
if (ptable == nullptr) {
|
||||
KMessageBox::error(this, i18nc("@info", "Found partition but no partition table type (line %1).", lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Found partition but no partition table type (line %1).", lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -923,12 +923,12 @@ void MainWindow::onImportPartitionTable()
|
|||
QStringList flags = rePartition.captured(7).replace(QStringLiteral("\""), QString()).split(QStringLiteral(","));
|
||||
|
||||
if (firstSector < ptable->firstUsable() || lastSector > ptable->lastUsable()) {
|
||||
KMessageBox::error(this, i18nc("@info the partition is NOT a device path, just a number", "Partition %1 would be outside the device's boundaries (line %2).", num, lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info the partition is NOT a device path, just a number", "Partition %1 would be outside the device's boundaries (line %2).", num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (firstSector >= lastSector) {
|
||||
KMessageBox::error(this, i18nc("@info", "Partition %1 has end before start sector (line %2).", num, lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Partition %1 has end before start sector (line %2).", num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -947,24 +947,24 @@ void MainWindow::onImportPartitionTable()
|
|||
role = PartitionRole(PartitionRole::Primary);
|
||||
|
||||
if (role == PartitionRole(PartitionRole::None)) {
|
||||
KMessageBox::error(this, i18nc("@info the partition is NOT a device path, just a number", "Unrecognized partition role \"%1\" for partition %2 (line %3).", roleNames, num, lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info the partition is NOT a device path, just a number", "Unrecognized partition role \"%1\" for partition %2 (line %3).", roleNames, num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (parent == nullptr) {
|
||||
KMessageBox::error(this, i18nc("@info the partition is NOT a device path, just a number", "No parent partition or partition table found for partition %1 (line %2).", num, lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info the partition is NOT a device path, just a number", "No parent partition or partition table found for partition %1 (line %2).", num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (role.has(PartitionRole::Extended) && !PartitionTable::tableTypeSupportsExtended(tableType)) {
|
||||
KMessageBox::error(this, i18nc("@info", "The partition table type \"%1\" does not support extended partitions, but one was found (line %2).", PartitionTable::tableTypeToName(tableType), lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "The partition table type \"%1\" does not support extended partitions, but one was found (line %2).", PartitionTable::tableTypeToName(tableType), lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(fsName), firstSector, lastSector);
|
||||
|
||||
if (fs == nullptr) {
|
||||
KMessageBox::error(this, i18nc("@info the partition is NOT a device path, just a number", "Could not create file system \"%1\" for partition %2 (line %3).", fsName, num, lineNo), i18nc("@title:window", "Error While Importing Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info the partition is NOT a device path, just a number", "Could not create file system \"%1\" for partition %2 (line %3).", fsName, num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -975,7 +975,7 @@ void MainWindow::onImportPartitionTable()
|
|||
|
||||
operationStack().push(new NewOperation(device, p));
|
||||
} else
|
||||
Log(Log::warning) << i18nc("@info/plain", "Could not parse line %1 from import file. Ignoring it.", lineNo);
|
||||
Log(Log::warning) << xi18nc("@info:status", "Could not parse line %1 from import file. Ignoring it.", lineNo);
|
||||
}
|
||||
|
||||
if (ptable->type() == PartitionTable::msdos && ptable->isSectorBased(device))
|
||||
|
@ -995,7 +995,7 @@ void MainWindow::onExportPartitionTable()
|
|||
QTemporaryFile tempFile;
|
||||
|
||||
if (!tempFile.open()) {
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), i18nc("@title:window", "Error Exporting Partition Table"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), xi18nc("@title:window", "Error Exporting Partition Table"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ static KLocalizedString checkSupportInNode(const PartitionNode* parent)
|
|||
"<td>%1</td>"
|
||||
"<td>%2</td>"
|
||||
"<td>%3</td>"
|
||||
"<td><a href=\"%4\">%4</a></td>"
|
||||
"<td><link>%4</link></td>"
|
||||
"</tr>")
|
||||
.subs(p->deviceNode())
|
||||
.subs(p->fileSystem().name())
|
||||
|
@ -1154,6 +1154,6 @@ void MainWindow::checkFileSystemSupport()
|
|||
"<para>As long as the support tools for these file systems are not installed you will not be able to modify them.</para>"
|
||||
"<para>You should find packages with these support tools in your distribution's package manager.</para>",
|
||||
supportList),
|
||||
i18nc("@title:window", "Missing File System Support Packages"),
|
||||
xi18nc("@title:window", "Missing File System Support Packages"),
|
||||
QStringLiteral("showInformationOnMissingFileSystemSupport"), KMessageBox::Notify | KMessageBox::AllowLink);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ NewDialog::NewDialog(QWidget* parent, Device& device, Partition& unallocatedPart
|
|||
SizeDialogBase(parent, device, unallocatedPartition, unallocatedPartition.firstSector(), unallocatedPartition.lastSector()),
|
||||
m_PartitionRoles(r)
|
||||
{
|
||||
setWindowTitle(i18nc("@title:window", "Create a new partition"));
|
||||
setWindowTitle(xi18nc("@title:window", "Create a new partition"));
|
||||
|
||||
setupDialog();
|
||||
setupConstraints();
|
||||
|
|
|
@ -394,10 +394,10 @@ void PartitionManagerWidget::onMountPartition()
|
|||
|
||||
if (p->canMount()) {
|
||||
if (!p->mount(report))
|
||||
KMessageBox::detailedSorry(this, xi18nc("@info", "The file system on partition <filename>%1</filename> could not be mounted.", p->deviceNode()), QStringLiteral("<pre>%1</pre>").arg(report.toText()), i18nc("@title:window", "Could Not Mount File System."));
|
||||
KMessageBox::detailedSorry(this, xi18nc("@info", "The file system on partition <filename>%1</filename> could not be mounted.", p->deviceNode()), QStringLiteral("<pre>%1</pre>").arg(report.toText()), xi18nc("@title:window", "Could Not Mount File System."));
|
||||
} else if (p->canUnmount()) {
|
||||
if (!p->unmount(report))
|
||||
KMessageBox::detailedSorry(this, xi18nc("@info", "The file system on partition <filename>%1</filename> could not be unmounted.", p->deviceNode()), QStringLiteral("<pre>%1</pre>").arg(report.toText()), i18nc("@title:window", "Could Not Unmount File System."));
|
||||
KMessageBox::detailedSorry(this, xi18nc("@info", "The file system on partition <filename>%1</filename> could not be unmounted.", p->deviceNode()), QStringLiteral("<pre>%1</pre>").arg(report.toText()), xi18nc("@title:window", "Could Not Unmount File System."));
|
||||
}
|
||||
|
||||
if (p->roles().has(PartitionRole::Logical)) {
|
||||
|
@ -442,7 +442,7 @@ void PartitionManagerWidget::onDecryptPartition()
|
|||
"unlocked.",
|
||||
p->deviceNode()),
|
||||
QString(),
|
||||
i18nc("@title:window",
|
||||
xi18nc("@title:window",
|
||||
"Could Not Unlock Encrypted File System."));
|
||||
} else if (luksFs->canCryptClose(p->partitionPath())) {
|
||||
if (!luksFs->cryptClose(p->partitionPath()))
|
||||
|
@ -453,7 +453,7 @@ void PartitionManagerWidget::onDecryptPartition()
|
|||
"locked.",
|
||||
p->deviceNode()),
|
||||
QString(),
|
||||
i18nc("@title:window",
|
||||
xi18nc("@title:window",
|
||||
"Could Not Lock Encrypted File System."));
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ static bool checkTooManyPartitions(QWidget* parent, const Device& d, const Parti
|
|||
"<para>You cannot create, paste or restore a primary partition on it before you delete an existing one.</para>",
|
||||
"<para>There are already %1 primary partitions on this device. This is the maximum number its partition table type can handle.</para>"
|
||||
"<para>You cannot create, paste or restore a primary partition on it before you delete an existing one.</para>",
|
||||
d.partitionTable()->numPrimaries()), i18nc("@title:window", "Too Many Primary Partitions."));
|
||||
d.partitionTable()->numPrimaries()), xi18nc("@title:window", "Too Many Primary Partitions."));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ void PartitionManagerWidget::onDeletePartition(bool shred)
|
|||
"<para>The partition <filename>%1</filename> cannot currently be deleted because one or more partitions with higher logical numbers are still mounted.</para>"
|
||||
"<para>Please unmount all partitions with higher logical numbers than %2 first.</para>",
|
||||
selectedPartition()->deviceNode(), selectedPartition()->number()),
|
||||
i18nc("@title:window", "Cannot Delete Partition."));
|
||||
xi18nc("@title:window", "Cannot Delete Partition."));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -557,11 +557,11 @@ void PartitionManagerWidget::onDeletePartition(bool shred)
|
|||
|
||||
if (clipboardPartition() == selectedPartition()) {
|
||||
if (KMessageBox::warningContinueCancel(this,
|
||||
i18nc("@info",
|
||||
xi18nc("@info",
|
||||
"Do you really want to delete the partition that is currently in the clipboard? "
|
||||
"It will no longer be available for pasting after it has been deleted."),
|
||||
i18nc("@title:window", "Really Delete Partition in the Clipboard?"),
|
||||
KGuiItem(i18nc("@action:button", "Delete It"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@title:window", "Really Delete Partition in the Clipboard?"),
|
||||
KGuiItem(xi18nc("@action:button", "Delete It"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(), QStringLiteral("reallyDeleteClipboardPartition")) == KMessageBox::Cancel)
|
||||
return;
|
||||
|
||||
|
@ -609,7 +609,7 @@ void PartitionManagerWidget::onResizePartition()
|
|||
|
||||
if (dlg->exec() == QDialog::Accepted) {
|
||||
if (dlg->resizedFirstSector() == p.firstSector() && dlg->resizedLastSector() == p.lastSector())
|
||||
Log(Log::information) << xi18nc("@info/plain", "Partition <filename>%1</filename> has the same position and size after resize/move. Ignoring operation.", p.deviceNode());
|
||||
Log(Log::information) << xi18nc("@info:status", "Partition <filename>%1</filename> has the same position and size after resize/move. Ignoring operation.", p.deviceNode());
|
||||
else
|
||||
operationStack().push(new ResizeOperation(*selectedDevice(), p, dlg->resizedFirstSector(), dlg->resizedLastSector()));
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ void PartitionManagerWidget::onCopyPartition()
|
|||
}
|
||||
|
||||
setClipboardPartition(selectedPartition());
|
||||
Log() << xi18nc("@info/plain", "Partition <filename>%1</filename> has been copied to the clipboard.", selectedPartition()->deviceNode());
|
||||
Log() << xi18nc("@info:status", "Partition <filename>%1</filename> has been copied to the clipboard.", selectedPartition()->deviceNode());
|
||||
}
|
||||
|
||||
void PartitionManagerWidget::onPastePartition()
|
||||
|
@ -708,8 +708,8 @@ bool PartitionManagerWidget::showInsertDialog(Partition& insertedPartition, qint
|
|||
"window, all data currently stored on <filename>%1</filename> will "
|
||||
"unrecoverably be overwritten.</para>",
|
||||
selectedPartition()->deviceNode()),
|
||||
i18nc("@title:window", "Really Overwrite Existing Partition?"),
|
||||
KGuiItem(i18nc("@action:button", "Overwrite Partition"), QStringLiteral("arrow-right")),
|
||||
xi18nc("@title:window", "Really Overwrite Existing Partition?"),
|
||||
KGuiItem(xi18nc("@action:button", "Overwrite Partition"), QStringLiteral("arrow-right")),
|
||||
KStandardGuiItem::cancel(),
|
||||
QStringLiteral("reallyOverwriteExistingPartition")) == KMessageBox::Cancel)
|
||||
return false;
|
||||
|
@ -718,13 +718,13 @@ bool PartitionManagerWidget::showInsertDialog(Partition& insertedPartition, qint
|
|||
if (overwrite)
|
||||
KMessageBox::error(this, xi18nc("@info",
|
||||
"<para>The selected partition is not large enough to hold the source partition or the backup file.</para>"
|
||||
"<para>Pick another target or resize this partition so it is as large as the source.</para>"), i18nc("@title:window", "Target Not Large Enough"));
|
||||
"<para>Pick another target or resize this partition so it is as large as the source.</para>"), xi18nc("@title:window", "Target Not Large Enough"));
|
||||
else
|
||||
KMessageBox::sorry(this, xi18nc("@info",
|
||||
"<para>It is not possible to create the target partition large enough to hold the source.</para>"
|
||||
"<para>This may happen if not all partitions on a device are correctly aligned "
|
||||
"or when copying a primary partition into an extended partition.</para>"),
|
||||
i18nc("@title:window", "Cannot Create Target Partition."));
|
||||
xi18nc("@title:window", "Cannot Create Target Partition."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -760,7 +760,7 @@ void PartitionManagerWidget::onBackupPartition()
|
|||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, xi18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), i18nc("@title:window", "Overwrite Existing File?"), KGuiItem(i18nc("@action:button", "Overwrite File"), QStringLiteral("arrow-right")), KStandardGuiItem::cancel()) == KMessageBox::Continue)
|
||||
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, xi18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), xi18nc("@title:window", "Overwrite Existing File?"), KGuiItem(xi18nc("@action:button", "Overwrite File"), QStringLiteral("arrow-right")), KStandardGuiItem::cancel()) == KMessageBox::Continue)
|
||||
operationStack().push(new BackupOperation(*selectedDevice(), *selectedPartition(), fileName));
|
||||
}
|
||||
|
||||
|
@ -784,7 +784,7 @@ void PartitionManagerWidget::onRestorePartition()
|
|||
Partition* restorePartition = RestoreOperation::createRestorePartition(*selectedDevice(), *selectedPartition()->parent(), selectedPartition()->firstSector(), fileName);
|
||||
|
||||
if (restorePartition->length() > selectedPartition()->length()) {
|
||||
KMessageBox::error(this, xi18nc("@info", "The file system in the image file <filename>%1</filename> is too large to be restored to the selected partition.", fileName), i18nc("@title:window", "Not Enough Space to Restore File System."));
|
||||
KMessageBox::error(this, xi18nc("@info", "The file system in the image file <filename>%1</filename> is too large to be restored to the selected partition.", fileName), xi18nc("@title:window", "Not Enough Space to Restore File System."));
|
||||
delete restorePartition;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -113,24 +113,24 @@ void PartPropsDialog::setupDialog()
|
|||
dialogWidget().partWidget().init(&partition());
|
||||
|
||||
const QString mp = partition().mountPoint().isEmpty()
|
||||
? i18nc("@item mountpoint", "(none found)")
|
||||
? xi18nc("@item mountpoint", "(none found)")
|
||||
: partition().mountPoint();
|
||||
dialogWidget().mountPoint().setText(mp);
|
||||
|
||||
dialogWidget().role().setText(partition().roles().toString());
|
||||
|
||||
QString statusText = i18nc("@label partition state", "idle");
|
||||
QString statusText = xi18nc("@label partition state", "idle");
|
||||
if (partition().isMounted()) {
|
||||
if (partition().roles().has(PartitionRole::Extended))
|
||||
statusText = i18nc("@label partition state", "At least one logical partition is mounted.");
|
||||
statusText = xi18nc("@label partition state", "At least one logical partition is mounted.");
|
||||
else if (!partition().mountPoint().isEmpty())
|
||||
statusText = xi18nc("@label partition state", "mounted on <filename>%1</filename>", mp);
|
||||
else
|
||||
statusText = i18nc("@label partition state", "mounted");
|
||||
statusText = xi18nc("@label partition state", "mounted");
|
||||
}
|
||||
|
||||
dialogWidget().status().setText(statusText);
|
||||
dialogWidget().uuid().setText(partition().fileSystem().uuid().isEmpty() ? i18nc("@item uuid", "(none)") : partition().fileSystem().uuid());
|
||||
dialogWidget().uuid().setText(partition().fileSystem().uuid().isEmpty() ? xi18nc("@item uuid", "(none)") : partition().fileSystem().uuid());
|
||||
|
||||
setupFileSystemComboBox();
|
||||
|
||||
|
@ -335,8 +335,8 @@ void PartPropsDialog::onFilesystemChanged(int)
|
|||
xi18nc("@info", "<para><warning>You are about to lose all data on partition <filename>%1</filename>.</warning></para>"
|
||||
"<para>Changing the file system on a partition already on disk will erase all its contents. If you continue now and apply the resulting operation in the main window, all data on <filename>%1</filename> will unrecoverably be lost.</para>", partition().deviceNode()),
|
||||
xi18nc("@title:window", "Really Recreate <filename>%1</filename> with File System %2?", partition().deviceNode(), dialogWidget().fileSystem().currentText()),
|
||||
KGuiItem(i18nc("@action:button", "Change the File System"), QStringLiteral("arrow-right")),
|
||||
KGuiItem(i18nc("@action:button", "Do Not Change the File System"), QStringLiteral("dialog-cancel")), QStringLiteral("reallyChangeFileSystem")) == KMessageBox::Continue) {
|
||||
KGuiItem(xi18nc("@action:button", "Change the File System"), QStringLiteral("arrow-right")),
|
||||
KGuiItem(xi18nc("@action:button", "Do Not Change the File System"), QStringLiteral("dialog-cancel")), QStringLiteral("reallyChangeFileSystem")) == KMessageBox::Continue) {
|
||||
setDirty();
|
||||
updateHideAndShow();
|
||||
setWarnFileSystemChange();
|
||||
|
@ -357,8 +357,8 @@ void PartPropsDialog::onRecreate(int state)
|
|||
xi18nc("@info", "<para><warning>You are about to lose all data on partition <filename>%1</filename>.</warning></para>"
|
||||
"<para>Recreating a file system will erase all its contents. If you continue now and apply the resulting operation in the main window, all data on <filesystem>%1</filesystem> will unrecoverably be lost.</para>", partition().deviceNode()),
|
||||
xi18nc("@title:window", "Really Recreate File System on <filename>%1</filename>?", partition().deviceNode()),
|
||||
KGuiItem(i18nc("@action:button", "Recreate the File System"), QStringLiteral("arrow-right")),
|
||||
KGuiItem(i18nc("@action:button", "Do Not Recreate the File System"), QStringLiteral("dialog-cancel")), QStringLiteral("reallyRecreateFileSystem")) == KMessageBox::Continue)) {
|
||||
KGuiItem(xi18nc("@action:button", "Recreate the File System"), QStringLiteral("arrow-right")),
|
||||
KGuiItem(xi18nc("@action:button", "Do Not Recreate the File System"), QStringLiteral("dialog-cancel")), QStringLiteral("reallyRecreateFileSystem")) == KMessageBox::Continue)) {
|
||||
setDirty();
|
||||
setWarnFileSystemChange();
|
||||
setForceRecreate(true);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
PartTableWidget::PartTableWidget(QWidget* parent) :
|
||||
PartWidgetBase(parent),
|
||||
m_PartitionTable(nullptr),
|
||||
m_LabelEmpty(i18nc("@info", "Please select a device."), this),
|
||||
m_LabelEmpty(xi18nc("@info", "Please select a device."), this),
|
||||
m_ReadOnly(false)
|
||||
{
|
||||
labelEmpty().setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
|
||||
|
@ -60,7 +60,7 @@ void PartTableWidget::setPartitionTable(const PartitionTable* ptable)
|
|||
|
||||
if (childWidgets().isEmpty()) {
|
||||
labelEmpty().setVisible(true);
|
||||
labelEmpty().setText(i18nc("@info", "No valid partition table was found on this device."));
|
||||
labelEmpty().setText(xi18nc("@info", "No valid partition table was found on this device."));
|
||||
labelEmpty().resize(size());
|
||||
} else {
|
||||
labelEmpty().setVisible(false);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
ScanProgressDialog::ScanProgressDialog(QWidget* parent) :
|
||||
QProgressDialog(parent)
|
||||
{
|
||||
setWindowTitle(i18nc("@title:window", "Scanning devices..."));
|
||||
setWindowTitle(xi18nc("@title:window", "Scanning devices..."));
|
||||
setMinimumWidth(280);
|
||||
setMinimumDuration(150);
|
||||
setAttribute(Qt::WA_ShowModal, true);
|
||||
|
@ -32,7 +32,7 @@ ScanProgressDialog::ScanProgressDialog(QWidget* parent) :
|
|||
void ScanProgressDialog::setDeviceName(const QString& d)
|
||||
{
|
||||
if (d.isEmpty())
|
||||
setLabelText(i18nc("@label", "Scanning..."));
|
||||
setLabelText(xi18nc("@label", "Scanning..."));
|
||||
else
|
||||
setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", d));
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ SizeDialogBase::SizeDialogBase(QWidget* parent, Device& d, Partition& part, qint
|
|||
detailsButton = new QPushButton;
|
||||
okButton = dialogButtonBox->addButton(QDialogButtonBox::Ok);
|
||||
cancelButton = dialogButtonBox->addButton(QDialogButtonBox::Cancel);
|
||||
detailsButton->setText(i18nc("@item:button advanced settings button", "Advanced") + QStringLiteral(" >>"));
|
||||
detailsButton->setText(xi18nc("@item:button advanced settings button", "Advanced") + QStringLiteral(" >>"));
|
||||
dialogButtonBox->addButton(detailsButton, QDialogButtonBox::ActionRole);
|
||||
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
mainLayout->addWidget(dialogButtonBox);
|
||||
|
@ -159,7 +159,7 @@ void SizeDialogBase::toggleDetails()
|
|||
{
|
||||
const bool isVisible = detailsWidget().isVisible();
|
||||
detailsWidget().setVisible(!isVisible);
|
||||
detailsButton->setText(i18n("&Advanced") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
|
||||
detailsButton->setText(xi18nc("@action:button", "&Advanced") + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
|
||||
}
|
||||
|
||||
void SizeDialogBase::onSpinFreeBeforeChanged(double newBefore)
|
||||
|
|
|
@ -65,7 +65,7 @@ SmartDialog::SmartDialog(QWidget* parent, Device& d) :
|
|||
|
||||
buttonBox = new QDialogButtonBox(this);
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Save | QDialogButtonBox::Close);
|
||||
buttonBox->button(QDialogButtonBox::Save)->setText(i18nc("@action:button", "Save SMART Report"));
|
||||
buttonBox->button(QDialogButtonBox::Save)->setText(xi18nc("@action:button", "Save SMART Report"));
|
||||
buttonBox->button(QDialogButtonBox::Save)->setIcon(QIcon::fromTheme(QStringLiteral("document-save")));
|
||||
mainLayout->addWidget(buttonBox);
|
||||
|
||||
|
@ -87,10 +87,10 @@ void SmartDialog::setupDialog()
|
|||
{
|
||||
if (device().smartStatus().isValid()) {
|
||||
if (device().smartStatus().status()) {
|
||||
dialogWidget().statusText().setText(i18nc("@label SMART disk status", "good"));
|
||||
dialogWidget().statusText().setText(xi18nc("@label SMART disk status", "good"));
|
||||
dialogWidget().statusIcon().setPixmap(QIcon::fromTheme(QStringLiteral("dialog-ok")).pixmap(IconSize(KIconLoader::Small)));
|
||||
} else {
|
||||
dialogWidget().statusText().setText(i18nc("@label SMART disk status", "BAD"));
|
||||
dialogWidget().statusText().setText(xi18nc("@label SMART disk status", "BAD"));
|
||||
dialogWidget().statusIcon().setPixmap(QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(IconSize(KIconLoader::Small)));
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void SmartDialog::setupDialog()
|
|||
dialogWidget().temperature().setText(SmartStatus::tempToString(device().smartStatus().temp()));
|
||||
const QString badSectors = device().smartStatus().badSectors() > 0
|
||||
? QLocale().toString(device().smartStatus().badSectors())
|
||||
: i18nc("@label SMART number of bad sectors", "none");
|
||||
: xi18nc("@label SMART number of bad sectors", "none");
|
||||
dialogWidget().badSectors().setText(badSectors);
|
||||
dialogWidget().poweredOn().setText(KFormat().formatDuration(device().smartStatus().poweredOn()));
|
||||
dialogWidget().powerCycles().setText(QLocale().toString(device().smartStatus().powerCycles()));
|
||||
|
@ -120,8 +120,8 @@ void SmartDialog::setupDialog()
|
|||
QStringList()
|
||||
<< QLocale().toString(a.id())
|
||||
<< QStringLiteral("<b>%1</b><br/>%2").arg(a.name()).arg(st + a.desc() + QStringLiteral("</span>"))
|
||||
<< (a.failureType() == SmartAttribute::PreFailure ? i18nc("@item:intable", "Pre-Failure") : i18nc("@item:intable", "Old-Age"))
|
||||
<< (a.updateType() == SmartAttribute::Online ? i18nc("@item:intable", "Online") : i18nc("@item:intable", "Offline"))
|
||||
<< (a.failureType() == SmartAttribute::PreFailure ? xi18nc("@item:intable", "Pre-Failure") : xi18nc("@item:intable", "Old-Age"))
|
||||
<< (a.updateType() == SmartAttribute::Online ? xi18nc("@item:intable", "Online") : xi18nc("@item:intable", "Offline"))
|
||||
<< QLocale().toString(a.worst())
|
||||
<< QLocale().toString(a.current())
|
||||
<< QLocale().toString(a.threshold())
|
||||
|
@ -133,7 +133,7 @@ void SmartDialog::setupDialog()
|
|||
dialogWidget().treeSmartAttributes().addTopLevelItem(item);
|
||||
}
|
||||
} else
|
||||
dialogWidget().statusText().setText(i18nc("@label", "(unknown)"));
|
||||
dialogWidget().statusText().setText(xi18nc("@label", "(unknown)"));
|
||||
|
||||
setMinimumSize(dialogWidget().size());
|
||||
resize(dialogWidget().size());
|
||||
|
@ -151,9 +151,9 @@ QString SmartDialog::toHtml() const
|
|||
QTextStream s(&rval);
|
||||
|
||||
if (device().smartStatus().status())
|
||||
s << HtmlReport::tableLine(i18n("SMART status:"), i18nc("@label SMART disk status", "good"));
|
||||
s << HtmlReport::tableLine(i18n("SMART status:"), xi18nc("@label SMART disk status", "good"));
|
||||
else
|
||||
s << HtmlReport::tableLine(i18n("SMART status:"), i18nc("@label SMART disk status", "BAD"));
|
||||
s << HtmlReport::tableLine(i18n("SMART status:"), xi18nc("@label SMART disk status", "BAD"));
|
||||
|
||||
const QString badSectors = device().smartStatus().badSectors() > 0
|
||||
? QLocale().toString(device().smartStatus().badSectors())
|
||||
|
@ -185,8 +185,8 @@ QString SmartDialog::toHtml() const
|
|||
|
||||
s << "<td>" << QLocale().toString(a.id()) << "</td>\n"
|
||||
<< "<td>" << QStringLiteral("<b>%1</b><br/>%2").arg(a.name()).arg(st + a.desc() + QStringLiteral("</span>")) << "</td>\n"
|
||||
<< "<td>" << (a.failureType() == SmartAttribute::PreFailure ? i18nc("@item:intable", "Pre-Failure") : i18nc("@item:intable", "Old-Age")) << "</td>\n"
|
||||
<< "<td>" << (a.updateType() == SmartAttribute::Online ? i18nc("@item:intable", "Online") : i18nc("@item:intable", "Offline")) << "</td>\n"
|
||||
<< "<td>" << (a.failureType() == SmartAttribute::PreFailure ? xi18nc("@item:intable", "Pre-Failure") : xi18nc("@item:intable", "Old-Age")) << "</td>\n"
|
||||
<< "<td>" << (a.updateType() == SmartAttribute::Online ? xi18nc("@item:intable", "Online") : xi18nc("@item:intable", "Offline")) << "</td>\n"
|
||||
<< "<td>" << QLocale().toString(a.worst()) << "</td>\n"
|
||||
<< "<td>" << QLocale().toString(a.current()) << "</td>\n"
|
||||
<< "<td>" << QLocale().toString(a.threshold()) << "</td>\n"
|
||||
|
@ -231,6 +231,6 @@ void SmartDialog::saveSmartReport()
|
|||
if (job->error())
|
||||
job->ui()->showErrorMessage();
|
||||
} else
|
||||
KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), i18nc("@title:window", "Could Not Save SMART Report."));
|
||||
KMessageBox::sorry(this, xi18nc("@info", "Could not create temporary file when trying to save to <filename>%1</filename>.", url.fileName()), xi18nc("@title:window", "Could Not Save SMART Report."));
|
||||
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void TreeLog::onSaveLog()
|
|||
QTemporaryFile tempFile;
|
||||
|
||||
if (!tempFile.open()) {
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary output file to save <filename>%1</filename>.", url.fileName()), i18nc("@title:window", "Error Saving Log File"));
|
||||
KMessageBox::error(this, xi18nc("@info", "Could not create temporary output file to save <filename>%1</filename>.", url.fileName()), xi18nc("@title:window", "Error Saving Log File"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ bool loadBackend()
|
|||
xi18nc("@info", "<para>Neither the configured (\"%1\") nor the default (\"%2\") backend "
|
||||
"plugin could be loaded.</para><para>Please check your installation.</para>",
|
||||
Config::backend(), CoreBackendManager::defaultBackendName()),
|
||||
i18nc("@title:window", "Error: Could Not Load Backend Plugin"));
|
||||
xi18nc("@title:window", "Error: Could Not Load Backend Plugin"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue