1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Clear window title bar on exit

This commit is contained in:
James Booth 2014-04-03 21:13:59 +01:00
parent e083e20313
commit 95c081666a
3 changed files with 9 additions and 0 deletions

View File

@ -313,6 +313,7 @@ _init(const int disable_tls, char *log_level)
static void static void
_shutdown(void) _shutdown(void)
{ {
ui_clear_win_title();
ui_close_all_wins(); ui_close_all_wins();
jabber_disconnect(); jabber_disconnect();
jabber_shutdown(); jabber_shutdown();

View File

@ -1497,6 +1497,12 @@ _ui_chat_win_contact_offline(PContact contact, char *resource, char *status)
free(display_str); free(display_str);
} }
static void
_ui_clear_win_title(void)
{
printf("\033]0;\007");
}
static void static void
_ui_draw_win_title(void) _ui_draw_win_title(void)
{ {
@ -1777,4 +1783,5 @@ ui_init_module(void)
ui_handle_recipient_error = _ui_handle_recipient_error; ui_handle_recipient_error = _ui_handle_recipient_error;
ui_handle_error = _ui_handle_error; ui_handle_error = _ui_handle_error;
ui_current_update_virtual = _ui_current_update_virtual; ui_current_update_virtual = _ui_current_update_virtual;
ui_clear_win_title = _ui_clear_win_title;
} }

View File

@ -132,6 +132,7 @@ void (*ui_chat_win_contact_offline)(PContact contact, char *resource, char *stat
void (*ui_handle_recipient_not_found)(const char * const recipient, const char * const err_msg); void (*ui_handle_recipient_not_found)(const char * const recipient, const char * const err_msg);
void (*ui_handle_recipient_error)(const char * const recipient, const char * const err_msg); 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_handle_error)(const char * const err_msg);
void (*ui_clear_win_title)(void);
// contact status functions // contact status functions
void (*ui_status_room)(const char * const contact); void (*ui_status_room)(const char * const contact);