1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 22:33:02 +01:00

add dhtstatus window

This commit is contained in:
Aaron Lipinski 2013-08-11 14:49:41 +12:00
parent 1af9d84aad
commit 662b1f2bac
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#include "friendlist.h" #include "friendlist.h"
#include "prompt.h" #include "prompt.h"
#include "dhtstatus.h"
#include "windows.h" #include "windows.h"
/* Holds status of chat windows */ /* Holds status of chat windows */
@ -164,8 +165,10 @@ ToxWindow *init_windows()
w_num = 0; w_num = 0;
int n_prompt = 0; int n_prompt = 0;
int n_friendslist = 1; int n_friendslist = 1;
int n_dhtstatus = 2;
if (add_window(m, new_prompt(on_friendadded), n_prompt) == -1 if (add_window(m, new_prompt(on_friendadded), n_prompt) == -1
|| add_window(m, new_friendlist(WINDOW_STATUS), n_friendslist) == -1) { || add_window(m, new_friendlist(WINDOW_STATUS), n_friendslist) == -1
|| add_window(m, new_dhtstatus(), n_dhtstatus) == -1) {
fprintf(stderr, "add_window() failed.\n"); fprintf(stderr, "add_window() failed.\n");
endwin(); endwin();
exit(1); exit(1);

View File

@ -14,7 +14,7 @@
#define KEY_SIZE_BYTES 32 #define KEY_SIZE_BYTES 32
/* number of permanent default windows */ /* number of permanent default windows */
#define N_DEFAULT_WINS 2 #define N_DEFAULT_WINS 3
/* maximum window slots for WINDOW_STATUS array */ /* maximum window slots for WINDOW_STATUS array */
#define MAX_WINDOW_SLOTS N_DEFAULT_WINS+MAX_FRIENDS_NUM #define MAX_WINDOW_SLOTS N_DEFAULT_WINS+MAX_FRIENDS_NUM