1041 |
another_window = 0; |
another_window = 0; |
1042 |
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) |
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) |
1043 |
{ |
{ |
1044 |
if (ptr_win->win_title) |
if (ptr_win->is_displayed) |
1045 |
{ |
{ |
1046 |
/* TODO: manage splitted windows */ |
/* TODO: manage splitted windows */ |
1047 |
another_window = 1; |
another_window = 1; |
1055 |
ptr_win->win_nick = NULL; |
ptr_win->win_nick = NULL; |
1056 |
ptr_win->win_status = NULL; |
ptr_win->win_status = NULL; |
1057 |
ptr_win->win_input = NULL; |
ptr_win->win_input = NULL; |
1058 |
|
ptr_win->is_displayed = 0; |
1059 |
break; |
break; |
1060 |
} |
} |
1061 |
} |
} |
1116 |
/* change current window to the new window */ |
/* change current window to the new window */ |
1117 |
gui_current_window = window; |
gui_current_window = window; |
1118 |
|
|
1119 |
|
window->is_displayed = 1; |
1120 |
window->unread_data = 0; |
window->unread_data = 0; |
1121 |
} |
} |
1122 |
|
|
1232 |
} |
} |
1233 |
|
|
1234 |
/* |
/* |
1235 |
|
* gui_window_init_subwindows: init subwindows for a WeeChat window |
1236 |
|
*/ |
1237 |
|
|
1238 |
|
void |
1239 |
|
gui_window_init_subwindows (t_gui_window *window) |
1240 |
|
{ |
1241 |
|
window->win_title = NULL; |
1242 |
|
window->win_chat = NULL; |
1243 |
|
window->win_nick = NULL; |
1244 |
|
window->win_status = NULL; |
1245 |
|
window->win_input = NULL; |
1246 |
|
} |
1247 |
|
|
1248 |
|
/* |
1249 |
* gui_init_colors: init GUI colors |
* gui_init_colors: init GUI colors |
1250 |
*/ |
*/ |
1251 |
|
|
1364 |
|
|
1365 |
gui_init_colors (); |
gui_init_colors (); |
1366 |
|
|
1367 |
/* create windows */ |
/* create a new window */ |
1368 |
gui_current_window = gui_window_new (NULL, NULL /*0, 0, COLS, LINES*/); |
gui_current_window = gui_window_new (NULL, NULL /*0, 0, COLS, LINES*/); |
1369 |
|
|
1370 |
signal (SIGWINCH, gui_curses_resize_handler); |
signal (SIGWINCH, gui_curses_resize_handler); |
1523 |
gui_add_message (window, MSG_TYPE_TIME, COLOR_WIN_CHAT_TIME, timestamp); |
gui_add_message (window, MSG_TYPE_TIME, COLOR_WIN_CHAT_TIME, timestamp); |
1524 |
gui_add_message (window, MSG_TYPE_TIME, COLOR_WIN_CHAT_DARK, "] "); |
gui_add_message (window, MSG_TYPE_TIME, COLOR_WIN_CHAT_DARK, "] "); |
1525 |
} |
} |
1526 |
gui_add_message (window, type, color, pos+1); |
gui_add_message (window, type, color, pos + 1); |
1527 |
pos = strchr (pos+1, '\n'); |
pos = strchr (pos + 1, '\n'); |
1528 |
if (pos) |
if (pos && !pos[1]) |
1529 |
if (pos[1] == '\0') |
pos = NULL; |
|
pos = NULL; |
|
1530 |
} |
} |
1531 |
|
|
1532 |
wrefresh (window->win_chat); |
wrefresh (window->win_chat); |