Show the escape key properly when server unavailable.

Fixes #624.

Signed-off-by: John Hood <cgull@glup.org>
This commit is contained in:
John Hood
2015-06-08 21:57:08 -04:00
parent 39c8b04c97
commit fc80eaaecf
3 changed files with 10 additions and 2 deletions
+8
View File
@@ -145,6 +145,7 @@ namespace Overlay {
private:
uint64_t last_word_from_server;
uint64_t last_acked_state;
string escape_key_string;
wstring message;
bool message_is_network_exception;
uint64_t message_expiration;
@@ -174,6 +175,13 @@ namespace Overlay {
show_quit_keystroke = s_show_quit_keystroke;
}
void set_escape_key_string( const string &s_name )
{
char tmp[ 128 ];
snprintf( tmp, sizeof tmp, " [To quit: %s .]", s_name.c_str() );
escape_key_string = tmp;
}
void set_network_exception( const std::exception &e )
{
wchar_t tmp[ 128 ];