Fix #4477
This commit is contained in:
parent
d2b98456a7
commit
41bbe3df20
@ -63,6 +63,7 @@
|
|||||||
#include "tracks/track.hpp"
|
#include "tracks/track.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
|
#include "main_loop.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -636,5 +637,19 @@ void MainMenuScreen::onDisabledItemClicked(const std::string& item)
|
|||||||
|
|
||||||
bool MainMenuScreen::onEscapePressed()
|
bool MainMenuScreen::onEscapePressed()
|
||||||
{
|
{
|
||||||
return true;
|
class ConfirmClose :
|
||||||
|
public MessageDialog::IConfirmDialogListener
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void onConfirm()
|
||||||
|
{
|
||||||
|
GUIEngine::ModalDialog::dismiss();
|
||||||
|
main_loop->abort();
|
||||||
|
} // onConfirm
|
||||||
|
}; // ConfirmClose
|
||||||
|
|
||||||
|
new MessageDialog(_("Are you sure to quit STK?"),
|
||||||
|
MessageDialog::MESSAGE_DIALOG_YESNO, new ConfirmClose(),
|
||||||
|
true/*delete_listener*/);
|
||||||
|
return false;
|
||||||
} // onEscapePressed
|
} // onEscapePressed
|
||||||
|
Loading…
Reference in New Issue
Block a user