Skip to content
Snippets Groups Projects
Commit 5e270cdc authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Load text.dat to get customized node status strings from text.dat/text.ini

parent d116f362
No related branches found
No related tags found
No related merge requests found
Pipeline #7354 passed
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "util_funcs.h" #include "util_funcs.h"
scfg_t cfg; scfg_t cfg;
char* text[TOTAL_TEXT];
int nodes=0; int nodes=0;
GtkListStore *store = NULL; GtkListStore *store = NULL;
GtkTreeSelection *sel; GtkTreeSelection *sel;
...@@ -76,7 +77,7 @@ void refresh_events(void) ...@@ -76,7 +77,7 @@ void refresh_events(void)
/* Read .cfg files here */ /* Read .cfg files here */
free_cfg(&cfg); free_cfg(&cfg);
if(!load_cfg(&cfg, /* text: */NULL, /* prep: */TRUE, /* node: */FALSE, str, sizeof(str))) { if(!load_cfg(&cfg, text, /* prep: */TRUE, /* node: */FALSE, str, sizeof(str))) {
char error[256]; char error[256];
SAFEPRINTF(error, "ERROR Loading Configuration Files: %s", str); SAFEPRINTF(error, "ERROR Loading Configuration Files: %s", str);
display_message("Load Error",error,"gtk-dialog-error"); display_message("Load Error",error,"gtk-dialog-error");
......
...@@ -829,6 +829,7 @@ int main(int argc, char** argv) { ...@@ -829,6 +829,7 @@ int main(int argc, char** argv) {
int main_bar=0; int main_bar=0;
int sys_cur=0; int sys_cur=0;
char str[256],ctrl_dir[MAX_PATH + 1]; char str[256],ctrl_dir[MAX_PATH + 1];
char* text[TOTAL_TEXT] = {NULL};
int i,j; int i,j;
node_t node; node_t node;
int nodefile = -1; int nodefile = -1;
...@@ -887,7 +888,7 @@ int main(int argc, char** argv) { ...@@ -887,7 +888,7 @@ int main(int argc, char** argv) {
memset(&cfg,0,sizeof(cfg)); memset(&cfg,0,sizeof(cfg));
cfg.size=sizeof(cfg); cfg.size=sizeof(cfg);
SAFECOPY(cfg.ctrl_dir,bbs_startup.ctrl_dir); SAFECOPY(cfg.ctrl_dir,bbs_startup.ctrl_dir);
if(!load_cfg(&cfg, /* text: */NULL, /* prep: */TRUE, /* node: */FALSE, str, sizeof(str))) { if(!load_cfg(&cfg, text, /* prep: */TRUE, /* node: */FALSE, str, sizeof(str))) {
printf("ERROR! %s\n",str); printf("ERROR! %s\n",str);
exit(1); exit(1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment