Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinmainwindow.cpp
Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Line(s) | 395 | if (m_tabWidget->count() > 1 && GeneralSettings::confirmClosingMultipleTabs() && closedByUser) { | |||
---|---|---|---|---|---|
397 | // Open a confirmation dialog with 3 buttons: | 397 | // Open a confirmation dialog with 3 buttons: | ||
398 | // QDialogButtonBox::Yes -> Quit | 398 | // QDialogButtonBox::Yes -> Quit | ||
399 | // QDialogButtonBox::No -> Close only the current tab | 399 | // QDialogButtonBox::No -> Close only the current tab | ||
400 | // QDialogButtonBox::Cancel -> do nothing | 400 | // QDialogButtonBox::Cancel -> do nothing | ||
401 | QDialog *dialog = new QDialog(this, Qt::Dialog); | 401 | QDialog *dialog = new QDialog(this, Qt::Dialog); | ||
402 | dialog->setWindowTitle(i18nc("@title:window", "Confirmation")); | 402 | dialog->setWindowTitle(i18nc("@title:window", "Confirmation")); | ||
403 | dialog->setModal(true); | 403 | dialog->setModal(true); | ||
404 | QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No | QDialogButtonBox::Cancel); | 404 | QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No | QDialogButtonBox::Cancel); | ||
405 | KGuiItem::assign(buttons->button(QDialogButtonBox::Yes), KStandardGuiItem::quit()); | | |||
406 | KGuiItem::assign(buttons->button(QDialogButtonBox::No), KGuiItem(i18n("C&lose Current Tab"), QIcon::fromTheme(QStringLiteral("tab-close")))); | 405 | KGuiItem::assign(buttons->button(QDialogButtonBox::No), KGuiItem(i18n("C&lose Current Tab"), QIcon::fromTheme(QStringLiteral("tab-close")))); | ||
407 | KGuiItem::assign(buttons->button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel()); | 406 | KGuiItem::assign(buttons->button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel()); | ||
408 | buttons->button(QDialogButtonBox::Yes)->setDefault(true); | 407 | buttons->button(QDialogButtonBox::Yes)->setDefault(true); | ||
409 | 408 | | |||
410 | bool doNotAskAgainCheckboxResult = false; | 409 | bool doNotAskAgainCheckboxResult = false; | ||
411 | 410 | | |||
412 | const int result = KMessageBox::createKMessageBox(dialog, | 411 | const int result = KMessageBox::createKMessageBox(dialog, | ||
413 | buttons, | 412 | buttons, | ||
▲ Show 20 Lines • Show All 1215 Lines • Show Last 20 Lines |