From 4ad98ebc5208a291bea0a87a362a56f3a107d671 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 27 Sep 2003 19:49:06 +0000 Subject: Fixed nicklist display bug and added term window title --- src/gui/curses/gui-display.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/gui/curses') diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 39384562a..de9623917 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -1095,7 +1095,6 @@ gui_switch_to_window (t_gui_window *window) if (!another_window) { /* create new windows */ - gui_calculate_pos_size (window); window->win_title = newwin (1, COLS, 0, 0); window->win_chat = newwin (window->win_chat_height, window->win_chat_width, @@ -1113,12 +1112,12 @@ gui_switch_to_window (t_gui_window *window) } else { - gui_calculate_pos_size (window); - /* create chat & nick windows */ - if (WIN_IS_CHANNEL(window) && !(window->win_nick)) + if (WIN_IS_CHANNEL(window)) { - /* add nick list window */ + /* (re)create nicklist window */ + if (window->win_nick) + delwin (window->win_nick); delwin (window->win_chat); window->win_chat = newwin (window->win_chat_height, window->win_chat_width, @@ -1129,10 +1128,11 @@ gui_switch_to_window (t_gui_window *window) window->win_nick_y, window->win_nick_x); } - if (!(WIN_IS_CHANNEL(window)) && window->win_nick) + if (!(WIN_IS_CHANNEL(window))) { /* remove nick list window */ - delwin (window->win_nick); + if (window->win_nick) + delwin (window->win_nick); window->win_nick = NULL; delwin (window->win_chat); window->win_chat = newwin (window->win_chat_height, @@ -1505,6 +1505,12 @@ gui_init () signal (SIGWINCH, gui_resize_term_handler); + #ifdef __LINUX__ + /* set title for term window, not for console */ + if (strcmp (getenv ("TERM"), "linux") != 0) + printf ("\e]2;" WEECHAT_NAME " " WEECHAT_VERSION "\a\e]1;" WEECHAT_NAME " " WEECHAT_VERSION "\a"); + #endif + gui_ready = 1; } -- cgit v1.2.3