Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 180:42a33611233b
[/trunk] Changeset 192 by mikael
* Improve history stuff: load buddy buffer even when not sending/receiving
a message.
author | mikael |
---|---|
date | Thu, 05 May 2005 12:44:32 +0000 |
parents | cfefae4b6de9 |
children | 4a0bde661562 |
comparison
equal
deleted
inserted
replaced
179:d416d5cb8ddb | 180:42a33611233b |
---|---|
10 #include "screen.h" | 10 #include "screen.h" |
11 #include "hbuf.h" | 11 #include "hbuf.h" |
12 #include "commands.h" | 12 #include "commands.h" |
13 #include "compl.h" | 13 #include "compl.h" |
14 #include "roster.h" | 14 #include "roster.h" |
15 #include "histolog.h" | |
15 #include "parsecfg.h" | 16 #include "parsecfg.h" |
16 #include "utils.h" | 17 #include "utils.h" |
17 #include "list.h" | 18 #include "list.h" |
18 | 19 |
19 #define window_entry(n) list_entry(n, window_entry_t, list) | 20 #define window_entry(n) list_entry(n, window_entry_t, list) |
303 // Display the chat window with the given identifier. | 304 // Display the chat window with the given identifier. |
304 void scr_ShowWindow(const char *winId) | 305 void scr_ShowWindow(const char *winId) |
305 { | 306 { |
306 window_entry_t *win_entry = scr_SearchWindow(winId); | 307 window_entry_t *win_entry = scr_SearchWindow(winId); |
307 | 308 |
308 if (win_entry != NULL) { | 309 if (!win_entry) { |
309 top_panel(win_entry->panel); | 310 win_entry = scr_CreateBuddyPanel(winId, FALSE); |
310 currentWindow = win_entry; | 311 } |
311 chatmode = TRUE; | 312 |
312 roster_msg_setflag(winId, FALSE); | 313 top_panel(win_entry->panel); |
313 roster_setflags(winId, ROSTER_FLAG_LOCK, TRUE); | 314 currentWindow = win_entry; |
314 update_roster = TRUE; | 315 chatmode = TRUE; |
315 | 316 roster_msg_setflag(winId, FALSE); |
316 // Refresh the window | 317 roster_setflags(winId, ROSTER_FLAG_LOCK, TRUE); |
317 scr_UpdateWindow(win_entry); | 318 update_roster = TRUE; |
318 | 319 |
319 // Finished :) | 320 // Refresh the window |
320 update_panels(); | 321 scr_UpdateWindow(win_entry); |
321 // doupdate(); (update_roster should be enough?) | 322 |
322 } else { | 323 // Finished :) |
323 top_panel(chatPanel); | 324 update_panels(); |
324 currentWindow = win_entry; // == NULL (current window empty) | |
325 } | |
326 | 325 |
327 top_panel(inputPanel); | 326 top_panel(inputPanel); |
328 } | 327 } |
329 | 328 |
330 // scr_ShowBuddyWindow() | 329 // scr_ShowBuddyWindow() |