diff options
author | James Booth <boothj5@gmail.com> | 2012-05-04 01:00:01 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-05-04 01:00:01 +0100 |
commit | 6e46e8fec0165f5e5ef337df0718481e9113bc94 (patch) | |
tree | 0338113cc5cac4a9ad9e1fb301d396696b11c453 /windows.c | |
parent | 30dbbad54422aaf3544f9701a27933b3acbcc092 (diff) | |
download | profani-tty-6e46e8fec0165f5e5ef337df0718481e9113bc94.tar.gz |
Added contact module
Diffstat (limited to 'windows.c')
-rw-r--r-- | windows.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/windows.c b/windows.c index 6b3355c4..7af787d8 100644 --- a/windows.c +++ b/windows.c @@ -22,9 +22,12 @@ #include <string.h> #include <stdlib.h> + #include <ncurses.h> + #include "windows.h" #include "util.h" +#include "contact.h" #define CONS_WIN_TITLE "_cons" #define PAD_SIZE 200 @@ -299,14 +302,14 @@ void cons_show_online_contacts(struct contact_node_t *list) struct contact_node_t *curr = list; while(curr) { - struct contact_t *contact = curr->contact; + PContact contact = curr->contact; _win_show_time(_cons_win); wattron(_cons_win, COLOR_PAIR(2)); - wprintw(_cons_win, "%s", contact->name); - if (contact->show) - wprintw(_cons_win, " is %s", contact->show); - if (contact->status) - wprintw(_cons_win, ", \"%s\"", contact->status); + wprintw(_cons_win, "%s", p_contact_name(contact)); + if (p_contact_show(contact)) + wprintw(_cons_win, " is %s", p_contact_show(contact)); + if (p_contact_status(contact)) + wprintw(_cons_win, ", \"%s\"", p_contact_status(contact)); wprintw(_cons_win, "\n"); wattroff(_cons_win, COLOR_PAIR(2)); |