Commit acf1d97c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use action texts for buttons of confirmation dialog

parent 1702b025
Pipeline #94061 passed with stage
in 6 minutes and 16 seconds
...@@ -55,7 +55,11 @@ void SieveEditorConfigureServerWidget::slotDeleteServer() ...@@ -55,7 +55,11 @@ void SieveEditorConfigureServerWidget::slotDeleteServer()
return; return;
} }
if (KMessageBox::Yes if (KMessageBox::Yes
== KMessageBox::questionYesNo(this, i18n("Do you want to remove this server \'%1\'?", item->text()), i18nc("@title:window", "Remove Sieve Server"))) { == KMessageBox::questionYesNo(this,
i18n("Do you want to remove this server \'%1\'?", item->text()),
i18nc("@title:window", "Remove Sieve Server"),
KStandardGuiItem::remove(),
KStandardGuiItem::cancel())) {
ui->serverSieveListWidget->deleteServerConfig(item); ui->serverSieveListWidget->deleteServerConfig(item);
delete item; delete item;
slotItemSelectionChanged(); slotItemSelectionChanged();
......
...@@ -592,7 +592,12 @@ void SieveEditorMainWidget::slotTabCloseRequested(int index) ...@@ -592,7 +592,12 @@ void SieveEditorMainWidget::slotTabCloseRequested(int index)
auto page = qobject_cast<SieveEditorPageWidget *>(mTabWidget->widget(index)); auto page = qobject_cast<SieveEditorPageWidget *>(mTabWidget->widget(index));
if (page) { if (page) {
if (page->isModified()) { if (page->isModified()) {
const int result = KMessageBox::questionYesNoCancel(this, i18n("Script was modified. Do you want to save before closing?"), i18n("Close script")); const int result = KMessageBox::questionYesNoCancel(this,
i18n("Script was modified. Do you want to save before closing?"),
i18n("Close script"),
KStandardGuiItem::close(),
KStandardGuiItem::no(),
KStandardGuiItem::cancel());
if (result == KMessageBox::Yes) { if (result == KMessageBox::Yes) {
if (page->uploadScriptAndCloseTab(index)) { if (page->uploadScriptAndCloseTab(index)) {
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment