| 136 | } |
| 137 | |
| 138 | void ExternalScriptView::removeScript() |
| 139 | { |
| 140 | ExternalScriptItem* item = currentItem(); |
| 141 | if (!item) { |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | int ret = KMessageBox::questionTwoActions( |
| 146 | this, |
| 147 | i18n("<p>Do you really want to remove the external script configuration for <i>%1</i>?</p>" |
| 148 | "<p><i>Note:</i> The script itself will not be removed.</p>", |
| 149 | item->text()), |
| 150 | i18nc("@title:window", "Confirm External Script Removal"), |
| 151 | KGuiItem(i18nc("@action:button", "Remove"), QStringLiteral("document-close")), KStandardGuiItem::cancel()); |
| 152 | if (ret == KMessageBox::PrimaryAction) { |
| 153 | m_plugin->model()->removeRow( |
| 154 | m_plugin->model()->indexFromItem(item).row() |
| 155 | ); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | void ExternalScriptView::editScript() |
| 160 | { |
nothing calls this directly
no test coverage detected