comparison mcabber/src/screen.c @ 181:4a0bde661562

[/trunk] Changeset 193 by mikael * Cosmetic changes
author mikael
date Thu, 05 May 2005 12:50:37 +0000
parents 42a33611233b
children b5aa2b9c425a
comparison
equal deleted inserted replaced
180:42a33611233b 181:4a0bde661562
26 typedef struct _window_entry_t { 26 typedef struct _window_entry_t {
27 WINDOW *win; 27 WINDOW *win;
28 PANEL *panel; 28 PANEL *panel;
29 char *name; 29 char *name;
30 GList *hbuf; 30 GList *hbuf;
31 GList *top; // If top is not specified (NULL), we'll display the last lines 31 GList *top; // If top is NULL, we'll display the last lines
32 char cleared; // For ex, user has issued a /clear command... 32 char cleared; // For ex, user has issued a /clear command...
33 struct list_head list; 33 struct list_head list;
34 } window_entry_t; 34 } window_entry_t;
35 35
36 36
37 static WINDOW *rosterWnd, *chatWnd, *inputWnd; 37 static WINDOW *rosterWnd, *chatWnd, *inputWnd;
218 else 218 else
219 top_panel(chatPanel); 219 top_panel(chatPanel);
220 } 220 }
221 update_panels(); 221 update_panels();
222 222
223 // Load buddy history from file (if enabled)
223 hlog_read_history(title, &tmp->hbuf, maxX - scr_WindowWidth(rosterWnd) - 14); 224 hlog_read_history(title, &tmp->hbuf, maxX - scr_WindowWidth(rosterWnd) - 14);
225
224 list_add_tail(&tmp->list, &window_list); 226 list_add_tail(&tmp->list, &window_list);
225 227
226 return tmp; 228 return tmp;
227 } 229 }
228 230
304 // Display the chat window with the given identifier. 306 // Display the chat window with the given identifier.
305 void scr_ShowWindow(const char *winId) 307 void scr_ShowWindow(const char *winId)
306 { 308 {
307 window_entry_t *win_entry = scr_SearchWindow(winId); 309 window_entry_t *win_entry = scr_SearchWindow(winId);
308 310
309 if (!win_entry) { 311 if (!win_entry)
310 win_entry = scr_CreateBuddyPanel(winId, FALSE); 312 win_entry = scr_CreateBuddyPanel(winId, FALSE);
311 }
312 313
313 top_panel(win_entry->panel); 314 top_panel(win_entry->panel);
314 currentWindow = win_entry; 315 currentWindow = win_entry;
315 chatmode = TRUE; 316 chatmode = TRUE;
316 roster_msg_setflag(winId, FALSE); 317 roster_msg_setflag(winId, FALSE);