comparison mcabber/screen.c @ 13:4c3d7b8a29c4

[/trunk] Changeset 28 by mikael * Display pending message indicator in the roaster. Not very good yet, because it isn't refreshed automatically.
author mikael
date Wed, 23 Mar 2005 20:26:08 +0000
parents 70ca5b9c648a
children c87d8adc9100
comparison
equal deleted inserted replaced
12:70ca5b9c648a 13:4c3d7b8a29c4
11 #include "buddies.h" 11 #include "buddies.h"
12 #include "parsecfg.h" 12 #include "parsecfg.h"
13 #include "lang.h" 13 #include "lang.h"
14 #include "server.h" 14 #include "server.h"
15 15
16 #include "list.h"
17
18 /* Definicion de tipos */ 16 /* Definicion de tipos */
19 #define window_entry(n) list_entry(n, window_entry_t, list) 17 #define window_entry(n) list_entry(n, window_entry_t, list)
20
21 typedef struct _window_entry_t {
22 WINDOW *win;
23 PANEL *panel;
24 char *name;
25 int nlines;
26 char **texto;
27 int pending_msg;
28 struct list_head list;
29 } window_entry_t;
30 18
31 LIST_HEAD(window_list); 19 LIST_HEAD(window_list);
32 20
33 /* Variables globales a SCREEN.C */ 21 /* Variables globales a SCREEN.C */
34 static WINDOW *rosterWnd, *chatWnd, *inputWnd; 22 static WINDOW *rosterWnd, *chatWnd, *inputWnd;
432 } 420 }
433 } 421 }
434 422
435 if (!dont_show) { 423 if (!dont_show) {
436 top_panel(tmp->panel); 424 top_panel(tmp->panel);
437 tmp->pending_msg = TRUE;
438 width = scr_WindowHeight(tmp->win); 425 width = scr_WindowHeight(tmp->win);
439 for (n = 0; n < tmp->nlines; n++) { 426 for (n = 0; n < tmp->nlines; n++) {
440 mvwprintw(tmp->win, n + 1, 1, ""); 427 mvwprintw(tmp->win, n + 1, 1, "");
441 for (i = 0; i < width - 2; i++) 428 for (i = 0; i < width - 2; i++)
442 waddch(tmp->win, ' '); 429 waddch(tmp->win, ' ');
443 mvwprintw(tmp->win, n + 1, 1, "%s", tmp->texto[n]); 430 mvwprintw(tmp->win, n + 1, 1, "%s", tmp->texto[n]);
444 } 431 }
445 432
446 update_panels(); 433 update_panels();
447 doupdate(); 434 doupdate();
435 } else {
436 tmp->pending_msg = TRUE;
448 } 437 }
449 } 438 }
450 439
451 void scr_InitCurses(void) 440 void scr_InitCurses(void)
452 { 441 {