summaryrefslogtreecommitdiff
path: root/src/gui/curses
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2003-09-27 19:49:06 +0000
committerSebastien Helleu <flashcode@flashtux.org>2003-09-27 19:49:06 +0000
commit4ad98ebc5208a291bea0a87a362a56f3a107d671 (patch)
tree140d4b50c004e59ae6854964be0e23c18ca5fd07 /src/gui/curses
parentc32bc12d8ea9429197419f2877ec678deb0beec1 (diff)
downloadweechat-4ad98ebc5208a291bea0a87a362a56f3a107d671.zip
Fixed nicklist display bug and added term window title
Diffstat (limited to 'src/gui/curses')
-rw-r--r--src/gui/curses/gui-display.c20
1 files changed, 13 insertions, 7 deletions
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;
}