diff --git a/src/GUI/PageRecord.cpp b/src/GUI/PageRecord.cpp index 5849ea2f..5de7af0c 100644 --- a/src/GUI/PageRecord.cpp +++ b/src/GUI/PageRecord.cpp @@ -431,9 +431,17 @@ PageRecord::~PageRecord() { bool PageRecord::ShouldBlockClose() { if(m_output_manager != NULL) { - if(MessageBox(QMessageBox::Warning, this, MainWindow::WINDOW_CAPTION, + enum_button answer = MessageBox(QMessageBox::Warning, this, MainWindow::WINDOW_CAPTION, tr("You have not saved the current recording yet, if you quit now it will be lost.\n" - "Are you sure that you want to quit?"), BUTTON_YES | BUTTON_NO, BUTTON_YES) != BUTTON_YES) { + "What would you like to do with it?"), BUTTON_SAVE | BUTTON_DISCARD | BUTTON_CANCEL); + if(answer == BUTTON_DISCARD) { + return false; + } + if(answer == BUTTON_CANCEL) { + return true; + } + if(answer == BUTTON_SAVE) { + OnRecordSave(); return true; } } diff --git a/src/common/Dialogs.cpp b/src/common/Dialogs.cpp index d5550e5e..50fc2a5d 100644 --- a/src/common/Dialogs.cpp +++ b/src/common/Dialogs.cpp @@ -38,6 +38,8 @@ enum_button MessageBox(QMessageBox::Icon icon, QWidget* parent, const QString& t {BUTTON_YES_ALWAYS, QDialogButtonBox::tr("Yes, always"), QMessageBox::YesRole , NULL}, {BUTTON_NO , QDialogButtonBox::tr("&No") , QMessageBox::NoRole , NULL}, {BUTTON_NO_NEVER , QDialogButtonBox::tr("No, never") , QMessageBox::NoRole , NULL}, + {BUTTON_DISCARD , QDialogButtonBox::tr("Discard") , QMessageBox::AcceptRole, NULL}, + {BUTTON_SAVE , QDialogButtonBox::tr("Save") , QMessageBox::YesRole , NULL} }; // add buttons diff --git a/src/common/Dialogs.h b/src/common/Dialogs.h index 8c64d44e..96adfc64 100644 --- a/src/common/Dialogs.h +++ b/src/common/Dialogs.h @@ -29,6 +29,8 @@ enum enum_button : int { BUTTON_YES_ALWAYS = 0x0008, BUTTON_NO = 0x0010, BUTTON_NO_NEVER = 0x0020, + BUTTON_DISCARD = 0x0040, + BUTTON_SAVE = 0x0080, }; // Shows a standard Qt dialog with translated buttons. diff --git a/src/translations/simplescreenrecorder_cs.ts b/src/translations/simplescreenrecorder_cs.ts index 9b8ca80c..30034d80 100644 --- a/src/translations/simplescreenrecorder_cs.ts +++ b/src/translations/simplescreenrecorder_cs.ts @@ -2207,9 +2207,9 @@ Tyto klávesy budou odchyceny a nebudou předány nahrávané aplikaci. You have not saved the current recording yet, if you quit now it will be lost. -Are you sure that you want to quit? +What would you like to do with it? Aktuální nahrávka dosud nebyla uložena a pokud program ukončíte nyní, bude ztracena. -Opravdu chcete program ukončit? +Co s ní chcete dělat? @@ -2551,6 +2551,11 @@ Tlačítko Spustit nahrávání je nahoře ;). No, never Ne, nikdy + + + Discard + Zahodit + QMessageBox