Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/jobuidelegate.cpp
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Line(s) | 211 | if (ask) { | |||
---|---|---|---|---|---|
227 | QWidget *widget = window(); | 227 | QWidget *widget = window(); | ||
228 | const KMessageBox::Options options(KMessageBox::Notify | KMessageBox::WindowModal); | 228 | const KMessageBox::Options options(KMessageBox::Notify | KMessageBox::WindowModal); | ||
229 | switch (deletionType) { | 229 | switch (deletionType) { | ||
230 | case Delete: | 230 | case Delete: | ||
231 | if (prettyList.count() == 1) { | 231 | if (prettyList.count() == 1) { | ||
232 | result = KMessageBox::warningContinueCancel( | 232 | result = KMessageBox::warningContinueCancel( | ||
233 | widget, | 233 | widget, | ||
234 | xi18nc("@info", "Do you really want to permanently delete this item?<nl/><filename>%1</filename><nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", prettyList.first()), | 234 | xi18nc("@info", "Do you really want to permanently delete this item?<nl/><filename>%1</filename><nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", prettyList.first()), | ||
235 | i18n("Delete Permanently?"), | 235 | i18n("Delete Permanently"), | ||
236 | KStandardGuiItem::del(), | 236 | KStandardGuiItem::del(), | ||
237 | KStandardGuiItem::cancel(), | 237 | KStandardGuiItem::cancel(), | ||
238 | keyName, options); | 238 | keyName, options); | ||
239 | } else { | 239 | } else { | ||
240 | result = KMessageBox::warningContinueCancelList( | 240 | result = KMessageBox::warningContinueCancelList( | ||
241 | widget, | 241 | widget, | ||
242 | xi18ncp("@info", "Do you really want to permanently delete this item?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", "Do you really want to permanently delete these %1 items?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", prettyList.count()), | 242 | xi18ncp("@info", "Do you really want to permanently delete this item?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", "Do you really want to permanently delete these %1 items?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>", prettyList.count()), | ||
243 | prettyList, | 243 | prettyList, | ||
244 | i18n("Delete Permanently?"), | 244 | i18n("Delete Permanently"), | ||
245 | KStandardGuiItem::del(), | 245 | KStandardGuiItem::del(), | ||
246 | KStandardGuiItem::cancel(), | 246 | KStandardGuiItem::cancel(), | ||
247 | keyName, options); | 247 | keyName, options); | ||
248 | } | 248 | } | ||
249 | break; | 249 | break; | ||
250 | case EmptyTrash: | 250 | case EmptyTrash: | ||
251 | result = KMessageBox::warningContinueCancel( | 251 | result = KMessageBox::warningContinueCancel( | ||
252 | widget, | 252 | widget, | ||
253 | xi18nc("@info", "Do you want to permanently delete all items from the Trash?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>"), | 253 | xi18nc("@info", "Do you want to permanently delete all items from the Trash?<nl/><nl/><emphasis strong='true'>This action cannot be undone.</emphasis>"), | ||
254 | i18n("Delete Permanently?"), | 254 | i18n("Delete Permanently"), | ||
255 | KGuiItem(i18nc("@action:button", "Empty Trash"), | 255 | KGuiItem(i18nc("@action:button", "Empty Trash"), | ||
256 | QIcon::fromTheme(QStringLiteral("user-trash"))), | 256 | QIcon::fromTheme(QStringLiteral("user-trash"))), | ||
257 | KStandardGuiItem::cancel(), | 257 | KStandardGuiItem::cancel(), | ||
258 | keyName, options); | 258 | keyName, options); | ||
259 | break; | 259 | break; | ||
260 | case Trash: | 260 | case Trash: | ||
261 | default: | 261 | default: | ||
262 | if (prettyList.count() == 1) { | 262 | if (prettyList.count() == 1) { | ||
263 | result = KMessageBox::warningContinueCancel( | 263 | result = KMessageBox::warningContinueCancel( | ||
264 | widget, | 264 | widget, | ||
265 | xi18nc("@info", "Do you really want to move this item to the Trash?<nl/><filename>%1</filename>", prettyList.first()), | 265 | xi18nc("@info", "Do you really want to move this item to the Trash?<nl/><filename>%1</filename>", prettyList.first()), | ||
266 | i18n("Delete Permanently?"), | 266 | i18n("Move to Trash"), | ||
267 | KGuiItem(i18n("Move to Trash"), QStringLiteral("user-trash")), | 267 | KGuiItem(i18n("Move to Trash"), QStringLiteral("user-trash")), | ||
268 | KStandardGuiItem::cancel(), | 268 | KStandardGuiItem::cancel(), | ||
269 | keyName, options); | 269 | keyName, options); | ||
270 | } else { | 270 | } else { | ||
271 | result = KMessageBox::warningContinueCancelList( | 271 | result = KMessageBox::warningContinueCancelList( | ||
272 | widget, | 272 | widget, | ||
273 | i18np("Do you really want to move this item to the trash?", "Do you really want to move these %1 items to the trash?", prettyList.count()), | 273 | i18np("Do you really want to move this item to the Trash?", "Do you really want to move these %1 items to the Trash?", prettyList.count()), | ||
274 | prettyList, | 274 | prettyList, | ||
275 | i18n("Move to Trash"), | 275 | i18n("Move to Trash"), | ||
276 | KGuiItem(i18n("Move to Trash"), QStringLiteral("user-trash")), | 276 | KGuiItem(i18n("Move to Trash"), QStringLiteral("user-trash")), | ||
277 | KStandardGuiItem::cancel(), | 277 | KStandardGuiItem::cancel(), | ||
278 | keyName, options); | 278 | keyName, options); | ||
279 | } | 279 | } | ||
280 | } | 280 | } | ||
281 | if (!keyName.isEmpty()) { | 281 | if (!keyName.isEmpty()) { | ||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |