1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 03:56:45 +02:00

implement basic user settings

This commit is contained in:
Jfreegman
2014-04-07 04:42:10 -04:00
parent a9bcab4aee
commit 92948abcf1
12 changed files with 214 additions and 6 deletions

View File

@ -31,8 +31,10 @@
#include "toxic_windows.h"
#include "misc_tools.h"
#include "settings.h"
extern ToxWindow *prompt;
extern struct user_settings *user_settings;
static uint64_t current_unix_time;
@ -57,7 +59,8 @@ struct tm *get_time(void)
void get_time_str(uint8_t *buf)
{
strftime(buf, TIME_STR_SIZE, "[%H:%M:%S] ", get_time());
const char *t = user_settings->time == TIME_24 ? "[%H:%M:%S] " : "[%I:%M:%S %p] ";
strftime(buf, TIME_STR_SIZE, t, get_time());
}
/* XXX: FIX */