Changeset View
Changeset View
Standalone View
Standalone View
shell/shell.cpp
Show First 20 Lines • Show All 566 Lines • ▼ Show 20 Line(s) | |||||
567 | { | 567 | { | ||
568 | return QApplication::desktop()->availableGeometry( this ).size() * 0.75; | 568 | return QApplication::desktop()->availableGeometry( this ).size() * 0.75; | ||
569 | } | 569 | } | ||
570 | 570 | | |||
571 | bool Shell::queryClose() | 571 | bool Shell::queryClose() | ||
572 | { | 572 | { | ||
573 | if (m_tabs.count() > 1) | 573 | if (m_tabs.count() > 1) | ||
574 | { | 574 | { | ||
575 | const QString dontAskAgainName = "ShowTabWarning"; | 575 | const QString dontAskAgainName = QStringLiteral("ShowTabWarning"); | ||
576 | KMessageBox::ButtonCode dummy; | 576 | KMessageBox::ButtonCode dummy; | ||
577 | if (shouldBeShownYesNo(dontAskAgainName, dummy)) | 577 | if (shouldBeShownYesNo(dontAskAgainName, dummy)) | ||
578 | { | 578 | { | ||
579 | QDialog *dialog = new QDialog(this); | 579 | QDialog *dialog = new QDialog(this); | ||
580 | dialog->setWindowTitle(i18n("Confirm Close")); | 580 | dialog->setWindowTitle(i18n("Confirm Close")); | ||
581 | 581 | | |||
582 | QDialogButtonBox *buttonBox = new QDialogButtonBox(dialog); | 582 | QDialogButtonBox *buttonBox = new QDialogButtonBox(dialog); | ||
583 | buttonBox->setStandardButtons(QDialogButtonBox::Yes | QDialogButtonBox::No); | 583 | buttonBox->setStandardButtons(QDialogButtonBox::Yes | QDialogButtonBox::No); | ||
584 | KGuiItem::assign(buttonBox->button(QDialogButtonBox::Yes), KGuiItem(i18n("Close Tabs"), "tab-close")); | 584 | KGuiItem::assign(buttonBox->button(QDialogButtonBox::Yes), KGuiItem(i18n("Close Tabs"), QStringLiteral("tab-close"))); | ||
585 | KGuiItem::assign(buttonBox->button(QDialogButtonBox::No), KStandardGuiItem::cancel()); | 585 | KGuiItem::assign(buttonBox->button(QDialogButtonBox::No), KStandardGuiItem::cancel()); | ||
586 | 586 | | |||
587 | 587 | | |||
588 | bool checkboxResult = true; | 588 | bool checkboxResult = true; | ||
589 | const int result = KMessageBox::createKMessageBox(dialog, buttonBox, QMessageBox::Question, | 589 | const int result = KMessageBox::createKMessageBox(dialog, buttonBox, QMessageBox::Question, | ||
590 | i18n("You are about to close %1 tabs. Are you sure you want to continue?", m_tabs.count()), QStringList(), | 590 | i18n("You are about to close %1 tabs. Are you sure you want to continue?", m_tabs.count()), QStringList(), | ||
591 | i18n("Warn me when I attempt to close multiple tabs"), | 591 | i18n("Warn me when I attempt to close multiple tabs"), | ||
592 | &checkboxResult, KMessageBox::Notify); | 592 | &checkboxResult, KMessageBox::Notify); | ||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |