update show inline messages to Positive

--when an action succeeds
work/spdx
Michail Vourlakos 4 years ago
parent cb44cd77c2
commit dcdc239fc4

@ -178,7 +178,9 @@ void ExportTemplateHandler::chooseFileDialog()
if (!file.endsWith(".layout.latte")) {
QString selected = file;
selected = selected.replace(QDir::homePath(), "~");
showInlineMessage(i18n("<i>%0</i> does not end with <i>.layout.latte</i> extension. Selected file <b>rejected</b>.").arg(selected), KMessageWidget::Error, true);
showInlineMessage(i18n("<i>%0</i> does not end with <i>.layout.latte</i> extension. Selected file <b>rejected</b>.").arg(selected),
KMessageWidget::Error,
true);
} else {
setFilepath(file);
}
@ -186,7 +188,9 @@ void ExportTemplateHandler::chooseFileDialog()
if (!file.endsWith(".view.latte")) {
QString selected = file;
selected = selected.replace(QDir::homePath(), "~");
showInlineMessage(i18n("<i>%0</i> does not end with <i>.view.latte</i> extension. Selected file <b>rejected</b>.").arg(selected), KMessageWidget::Error, true);
showInlineMessage(i18n("<i>%0</i> does not end with <i>.view.latte</i> extension. Selected file <b>rejected</b>.").arg(selected),
KMessageWidget::Error,
true);
} else {
setFilepath(file);
}
@ -243,7 +247,7 @@ void ExportTemplateHandler::onExport()
});
showInlineMessage(i18nc("settings:template export success","Template <b>%0</b> export succeeded...").arg(curbasename),
KMessageWidget::Information,
KMessageWidget::Positive,
false,
actions);

@ -798,10 +798,10 @@ bool Layouts::importLayoutsFromV1ConfigFile(QString file)
if (importedlayouts.count() > 0) {
if (importedlayouts.count() == 1) {
m_handler->showInlineMessage(i18n("Layout <b>%0</b> imported successfully...").arg(importedlayouts[0]),
KMessageWidget::Information);
KMessageWidget::Positive);
} else {
m_handler->showInlineMessage(i18n("Layouts <b>%0</b> imported successfully...").arg(importedlayouts.join(",")),
KMessageWidget::Information);
KMessageWidget::Positive);
}
return true;

@ -350,7 +350,9 @@ void SettingsDialog::exportFullConfiguration()
connect(exportFileDialog, &QFileDialog::fileSelected, this, [&](const QString & file) {
auto showExportConfigurationError = [this]() {
showInlineMessage(i18n("Full configuration export <b>failed</b>..."), KMessageWidget::Error, true);
showInlineMessage(i18n("Full configuration export <b>failed</b>..."),
KMessageWidget::Error,
true);
};
if (m_corona->layoutsManager()->importer()->exportFullConfiguration(file)) {
@ -368,7 +370,7 @@ void SettingsDialog::exportFullConfiguration()
});
showInlineMessage(i18n("Full configuration export succeeded..."),
KMessageWidget::Information,
KMessageWidget::Positive,
false,
actions);
} else {

@ -708,7 +708,9 @@ void TabLayouts::exportLayoutForBackup()
actions);
} else if (file.endsWith(".latterc")) {
auto showExportConfigurationError = [this]() {
showInlineMessage(i18n("Full configuration export <b>failed</b>..."), KMessageWidget::Error, true);
showInlineMessage(i18n("Full configuration export <b>failed</b>..."),
KMessageWidget::Error,
true);
};
if (m_corona->layoutsManager()->importer()->exportFullConfiguration(file)) {

@ -319,7 +319,7 @@ void Views::pasteSelectedViews()
if (hascurrentlayoutcuttedviews) {
m_handler->showInlineMessage(i18n("Docks and panels from <b>Paste</b> action are already present in current layout"),
KMessageWidget::Information);
KMessageWidget::Warning);
}
}
@ -561,7 +561,10 @@ void Views::messageForErrorAppletsWithSameId(const Data::Error &error)
});
//! show message
m_handler->showInlineMessage(message, KMessageWidget::Error, true, actions);
m_handler->showInlineMessage(message,
KMessageWidget::Error,
true,
actions);
}
void Views::save()

@ -250,7 +250,7 @@ void ViewsHandler::newView(const Data::Generic &templateData)
Data::View newview = m_viewsController->appendViewFromViewTemplate(viewfromtemplate);
showInlineMessage(i18nc("settings:dock/panel added successfully","<b>%0</b> added successfully...").arg(newview.name),
KMessageWidget::Information);
KMessageWidget::Positive);
}
}

Loading…
Cancel
Save