kcms/rules: Set a title for error messages
This commit is contained in:
parent
d8dc46856e
commit
1d5b3a3c89
3 changed files with 7 additions and 5 deletions
|
@ -135,8 +135,9 @@ ScrollViewKCM {
|
||||||
overlayModel.onlySuggestions = true;
|
overlayModel.onlySuggestions = true;
|
||||||
propertySheet.sheetOpen = true;
|
propertySheet.sheetOpen = true;
|
||||||
}
|
}
|
||||||
function onShowErrorMessage(message) {
|
function onShowErrorMessage(title, message) {
|
||||||
errorLabel.text = message
|
errorSheet.title = title
|
||||||
|
errorSheet.message = message
|
||||||
errorSheet.open()
|
errorSheet.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,7 +145,7 @@ ScrollViewKCM {
|
||||||
Kirigami.OverlaySheet {
|
Kirigami.OverlaySheet {
|
||||||
id: errorSheet
|
id: errorSheet
|
||||||
|
|
||||||
title: i18n("Error")
|
property alias message: errorLabel.text
|
||||||
|
|
||||||
Kirigami.Heading {
|
Kirigami.Heading {
|
||||||
id: errorLabel
|
id: errorLabel
|
||||||
|
|
|
@ -851,7 +851,8 @@ void RulesModel::selectX11Window()
|
||||||
self->deleteLater();
|
self->deleteLater();
|
||||||
if (!reply.isValid()) {
|
if (!reply.isValid()) {
|
||||||
if (reply.error().name() == QLatin1String("org.kde.KWin.Error.InvalidWindow")) {
|
if (reply.error().name() == QLatin1String("org.kde.KWin.Error.InvalidWindow")) {
|
||||||
Q_EMIT showErrorMessage(i18n("Could not detect window properties. The window is not managed by KWin."));
|
Q_EMIT showErrorMessage(i18n("Unmanaged window"),
|
||||||
|
i18n("Could not detect window properties. The window is not managed by KWin."));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ Q_SIGNALS:
|
||||||
void warningMessagesChanged();
|
void warningMessagesChanged();
|
||||||
|
|
||||||
void showSuggestions();
|
void showSuggestions();
|
||||||
void showErrorMessage(const QString &message);
|
void showErrorMessage(const QString &title, const QString &message);
|
||||||
|
|
||||||
void virtualDesktopsUpdated();
|
void virtualDesktopsUpdated();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue