From 3561ff4d9754e61cf585a8b7b7e87b03a452f30d Mon Sep 17 00:00:00 2001 From: Will Song Date: Mon, 29 Dec 2014 20:05:50 -0600 Subject: [PATCH] set a nice title (instead of empty) on shutdown --- src/profanity.c | 2 +- src/ui/core.c | 6 ++++++ src/ui/ui.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/profanity.c b/src/profanity.c index fb352879..0b8589df 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -288,7 +288,7 @@ _init(const int disable_tls, char *log_level) static void _shutdown(void) { - ui_clear_win_title(); + ui_goodbye_title(); ui_close_all_wins(); jabber_disconnect(); jabber_shutdown(); diff --git a/src/ui/core.c b/src/ui/core.c index 314810b1..96ac621d 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -2256,6 +2256,12 @@ ui_clear_win_title(void) printf("%c]0;%c", '\033', '\007'); } +void +ui_goodbye_title(void) +{ + printf("%c]0;Thanks for using Profanity%c", '\033', '\007'); +} + void ui_statusbar_new(const int win) { diff --git a/src/ui/ui.h b/src/ui/ui.h index e7b46766..4f78974c 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -190,6 +190,7 @@ void ui_handle_recipient_not_found(const char * const recipient, const char * co void ui_handle_recipient_error(const char * const recipient, const char * const err_msg); void ui_handle_error(const char * const err_msg); void ui_clear_win_title(void); +void ui_goodbye_title(void); void ui_handle_room_join_error(const char * const roomjid, const char * const err); void ui_handle_room_configuration(const char * const roomjid, DataForm *form); void ui_handle_room_configuration_form_error(const char * const roomjid, const char * const message);