about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorWill Song <incertia9474@gmail.com>2014-12-29 20:05:50 -0600
committerWill Song <incertia9474@gmail.com>2014-12-29 20:05:50 -0600
commit3561ff4d9754e61cf585a8b7b7e87b03a452f30d (patch)
tree204e97200e4c0127d9e9cd2febb6aebe0fa75329 /src
parente7ddff61dcb0831d8f8ca469844c0de0306f8994 (diff)
downloadprofani-tty-3561ff4d9754e61cf585a8b7b7e87b03a452f30d.tar.gz
set a nice title (instead of empty) on shutdown
Diffstat (limited to 'src')
-rw-r--r--src/profanity.c2
-rw-r--r--src/ui/core.c6
-rw-r--r--src/ui/ui.h1
3 files changed, 8 insertions, 1 deletions
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
@@ -2257,6 +2257,12 @@ ui_clear_win_title(void)
 }
 
 void
+ui_goodbye_title(void)
+{
+    printf("%c]0;Thanks for using Profanity%c", '\033', '\007');
+}
+
+void
 ui_statusbar_new(const int win)
 {
     status_bar_new(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);