DolphinWX: Shut down cleanly on signal

This makes DolphinWX shut down cleanly, just like it would with
File->Exit when it receives a SIGINT, SIGTERM (Unix) or some signals
on Windows.

The default signal handler will be restored after a first shutdown
signal so a second signal will exit Dolphin forcefully.
This commit is contained in:
Léo Lam
2016-07-08 16:35:03 +02:00
parent 3f03e2d5fe
commit 0f028df6b2
2 changed files with 56 additions and 1 deletions

View File

@ -186,6 +186,7 @@ private:
};
wxTimer m_poll_hotkey_timer;
wxTimer m_handle_signal_timer;
wxBitmap m_Bitmaps[EToolbar_Max];
@ -328,6 +329,7 @@ private:
void PollHotkeys(wxTimerEvent&);
void ParseHotkeys();
void HandleSignal(wxTimerEvent&);
bool InitControllers();