Changeset View
Changeset View
Standalone View
Standalone View
src/lib/app/browserwindow.cpp
Show First 20 Lines • Show All 1490 Lines • ▼ Show 20 Line(s) | 1486 | { | |||
---|---|---|---|---|---|
1491 | 1491 | | |||
1492 | Settings settings; | 1492 | Settings settings; | ||
1493 | bool askOnClose = settings.value(QSL("Browser-Tabs-Settings/AskOnClosing"), true).toBool(); | 1493 | bool askOnClose = settings.value(QSL("Browser-Tabs-Settings/AskOnClosing"), true).toBool(); | ||
1494 | 1494 | | |||
1495 | if ((mApp->afterLaunch() == MainApplication::SelectSession || mApp->afterLaunch() == MainApplication::RestoreSession) && mApp->windowCount() == 1) { | 1495 | if ((mApp->afterLaunch() == MainApplication::SelectSession || mApp->afterLaunch() == MainApplication::RestoreSession) && mApp->windowCount() == 1) { | ||
1496 | askOnClose = false; | 1496 | askOnClose = false; | ||
1497 | } | 1497 | } | ||
1498 | 1498 | | |||
1499 | if (askOnClose && m_tabWidget->normalTabsCount() > 1) { | 1499 | if (askOnClose && m_tabWidget->normalTabsCount() > 1) { | ||
abogical: I don't think you're supposed to change this line. This will result in always warning you even… | |||||
jachin: It looks like for test. It is needed to recover. | |||||
1500 | CheckBoxDialog dialog(QMessageBox::Yes | QMessageBox::No, this); | 1500 | CheckBoxDialog dialog(QMessageBox::Yes | QMessageBox::No, this); | ||
1501 | dialog.setDefaultButton(QMessageBox::No); | 1501 | dialog.setDefaultButton(QMessageBox::No); | ||
1502 | //~ singular There is still %n open tab and your session won't be stored.\nAre you sure you want to close this window? | 1502 | //~ singular There is still %n open tab and your session won't be stored.\nAre you sure you want to close this window? | ||
1503 | //~ plural There are still %n open tabs and your session won't be stored.\nAre you sure you want to close this window? | 1503 | //~ plural There are still %n open tabs and your session won't be stored.\nAre you sure you want to close this window? | ||
1504 | dialog.setText(tr("There are still %n open tabs and your session won't be stored.\nAre you sure you want to close this window?", "", m_tabWidget->count())); | 1504 | dialog.setText(tr("There are still %n open tabs and your session won't be stored.\r\nAre you sure you want to close this window?", "", m_tabWidget->count())); | ||
1505 | dialog.setCheckBoxText(tr("Don't ask again")); | 1505 | dialog.setCheckBoxText(tr("Don't ask again")); | ||
1506 | dialog.setWindowTitle(tr("There are still open tabs")); | 1506 | dialog.setWindowTitle(tr("There are still open tabs")); | ||
1507 | dialog.setIcon(QMessageBox::Warning); | 1507 | dialog.setIcon(QMessageBox::Warning); | ||
1508 | 1508 | | |||
1509 | if (dialog.exec() != QMessageBox::Yes) { | 1509 | if (dialog.exec() != QMessageBox::Yes) { | ||
1510 | event->ignore(); | 1510 | event->ignore(); | ||
1511 | return; | 1511 | return; | ||
1512 | } | 1512 | } | ||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |
I don't think you're supposed to change this line. This will result in always warning you even if you told it to skip the warning next time.