comparison mcabber/screen.c @ 22:6a97e7cd00d9

[/trunk] Changeset 37 by mikael * Unexport the scr_SearchWindow() function. Use the new scr_IsHiddenMessage() function instead.
author mikael
date Sun, 27 Mar 2005 19:32:38 +0000
parents 7eeda3a06b21
children
comparison
equal deleted inserted replaced
21:7eeda3a06b21 22:6a97e7cd00d9
11 #include "utils.h" 11 #include "utils.h"
12 #include "buddies.h" 12 #include "buddies.h"
13 #include "parsecfg.h" 13 #include "parsecfg.h"
14 #include "lang.h" 14 #include "lang.h"
15 #include "server.h" 15 #include "server.h"
16 #include "list.h"
16 17
17 /* Definicion de tipos */ 18 /* Definicion de tipos */
18 #define window_entry(n) list_entry(n, window_entry_t, list) 19 #define window_entry(n) list_entry(n, window_entry_t, list)
19 20
20 LIST_HEAD(window_list); 21 LIST_HEAD(window_list);
22
23 typedef struct _window_entry_t {
24 WINDOW *win;
25 PANEL *panel;
26 char *name;
27 int nlines;
28 char **texto;
29 int hidden_msg;
30 struct list_head list;
31 } window_entry_t;
32
21 33
22 /* Variables globales a SCREEN.C */ 34 /* Variables globales a SCREEN.C */
23 static WINDOW *rosterWnd, *chatWnd, *inputWnd; 35 static WINDOW *rosterWnd, *chatWnd, *inputWnd;
24 static WINDOW *logWnd, *logWnd_border; 36 static WINDOW *logWnd, *logWnd_border;
25 static PANEL *rosterPanel, *chatPanel, *inputPanel; 37 static PANEL *rosterPanel, *chatPanel, *inputPanel;
586 598
587 update_panels(); 599 update_panels();
588 doupdate(); 600 doupdate();
589 } 601 }
590 602
603 // scr_IsHiddenMessage(jid)
604 // Returns TRUE if there is a hidden message in the window
605 // for the jid contact.
606 int scr_IsHiddenMessage(char *jid) {
607 window_entry_t *wintmp;
608
609 wintmp = scr_SearchWindow(jid);
610 if ((wintmp) && (wintmp->hidden_msg))
611 return TRUE;
612
613 return FALSE;
614 }
591 615
592 void send_message(int sock, char *msg) 616 void send_message(int sock, char *msg)
593 { 617 {
594 char **submsgs; 618 char **submsgs;
595 char *buffer = (char *) calloc(1, 24+strlen(msg)); 619 char *buffer = (char *) calloc(1, 24+strlen(msg));