mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Added look_infobar_timestamp config option
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2004-01-18
|
||||
ChangeLog - 2004-01-20
|
||||
|
||||
|
||||
Version 0.0.5 (under dev!):
|
||||
* info bar timestamp is added to config ("look_infobar_timestamp")
|
||||
* added info bar (optional, "look_infobar" to enable it, "on" by default)
|
||||
* fixed crash with /oper command
|
||||
* for default config file, nick is now based on un*x username (thanks to Witukind)
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include "../plugins/plugins.h"
|
||||
|
||||
|
||||
char *var_LANG; /* LANG environment variable */
|
||||
int quit_weechat; /* = 1 if quit request from user... why ? :'( */
|
||||
char *weechat_home; /* WeeChat home dir. (example: /home/toto/.weechat) */
|
||||
FILE *log_file; /* WeeChat log file (~/.weechat/weechat.log) */
|
||||
@@ -429,8 +428,6 @@ wee_shutdown ()
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
var_LANG = getenv ("LANG"); /* get LANG environment variable */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale (LC_ALL, ""); /* initialize gettext */
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
|
||||
/* global variables and functions */
|
||||
|
||||
extern char *var_LANG;
|
||||
extern int quit_weechat;
|
||||
extern char *weechat_home;
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ int cfg_look_nickmode_empty;
|
||||
char *cfg_look_no_nickname;
|
||||
char *cfg_look_completor;
|
||||
int cfg_look_infobar;
|
||||
char *cfg_look_infobar_timestamp;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
{ { "look_set_title", N_("set title for terminal window (curses GUI) with name & version"),
|
||||
@@ -142,6 +143,10 @@ t_config_option weechat_options_look[] =
|
||||
N_("enable info bar"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_infobar, NULL, NULL },
|
||||
{ "look_infobar_timestamp", N_("timestamp for time in infobar"),
|
||||
N_("timestamp for time in infobar"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%B, %A %d %G - %H:%M", NULL, NULL, &cfg_look_infobar_timestamp, NULL },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ extern int cfg_look_nickmode_empty;
|
||||
extern char *cfg_look_no_nickname;
|
||||
extern char *cfg_look_completor;
|
||||
extern int cfg_look_infobar;
|
||||
extern char *cfg_look_infobar_timestamp;
|
||||
|
||||
extern int cfg_col_title;
|
||||
extern int cfg_col_title_bg;
|
||||
|
||||
@@ -926,7 +926,7 @@ gui_draw_window_infobar (t_gui_window *window)
|
||||
{
|
||||
time_t time_seconds;
|
||||
struct tm *local_time;
|
||||
char text[256];
|
||||
char text[1024 + 1];
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
@@ -943,10 +943,7 @@ gui_draw_window_infobar (t_gui_window *window)
|
||||
|
||||
time_seconds = time (NULL);
|
||||
local_time = localtime (&time_seconds);
|
||||
if (strncmp (var_LANG, "fr", 2) == 0)
|
||||
strftime (text, 255, "%A %d %B %G - %H:%M", local_time);
|
||||
else
|
||||
strftime (text, 255, "%B, %A %d %G - %H:%M", local_time);
|
||||
strftime (text, 1024, cfg_look_infobar_timestamp, local_time);
|
||||
wprintw (window->win_infobar, "%s", text);
|
||||
|
||||
wrefresh (window->win_infobar);
|
||||
|
||||
+2
-1
@@ -1,10 +1,11 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2004-01-18
|
||||
ChangeLog - 2004-01-20
|
||||
|
||||
|
||||
Version 0.0.5 (under dev!):
|
||||
* info bar timestamp is added to config ("look_infobar_timestamp")
|
||||
* added info bar (optional, "look_infobar" to enable it, "on" by default)
|
||||
* fixed crash with /oper command
|
||||
* for default config file, nick is now based on un*x username (thanks to Witukind)
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include "../plugins/plugins.h"
|
||||
|
||||
|
||||
char *var_LANG; /* LANG environment variable */
|
||||
int quit_weechat; /* = 1 if quit request from user... why ? :'( */
|
||||
char *weechat_home; /* WeeChat home dir. (example: /home/toto/.weechat) */
|
||||
FILE *log_file; /* WeeChat log file (~/.weechat/weechat.log) */
|
||||
@@ -429,8 +428,6 @@ wee_shutdown ()
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
var_LANG = getenv ("LANG"); /* get LANG environment variable */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale (LC_ALL, ""); /* initialize gettext */
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
|
||||
/* global variables and functions */
|
||||
|
||||
extern char *var_LANG;
|
||||
extern int quit_weechat;
|
||||
extern char *weechat_home;
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ int cfg_look_nickmode_empty;
|
||||
char *cfg_look_no_nickname;
|
||||
char *cfg_look_completor;
|
||||
int cfg_look_infobar;
|
||||
char *cfg_look_infobar_timestamp;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
{ { "look_set_title", N_("set title for terminal window (curses GUI) with name & version"),
|
||||
@@ -142,6 +143,10 @@ t_config_option weechat_options_look[] =
|
||||
N_("enable info bar"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_infobar, NULL, NULL },
|
||||
{ "look_infobar_timestamp", N_("timestamp for time in infobar"),
|
||||
N_("timestamp for time in infobar"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%B, %A %d %G - %H:%M", NULL, NULL, &cfg_look_infobar_timestamp, NULL },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ extern int cfg_look_nickmode_empty;
|
||||
extern char *cfg_look_no_nickname;
|
||||
extern char *cfg_look_completor;
|
||||
extern int cfg_look_infobar;
|
||||
extern char *cfg_look_infobar_timestamp;
|
||||
|
||||
extern int cfg_col_title;
|
||||
extern int cfg_col_title_bg;
|
||||
|
||||
@@ -926,7 +926,7 @@ gui_draw_window_infobar (t_gui_window *window)
|
||||
{
|
||||
time_t time_seconds;
|
||||
struct tm *local_time;
|
||||
char text[256];
|
||||
char text[1024 + 1];
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
@@ -943,10 +943,7 @@ gui_draw_window_infobar (t_gui_window *window)
|
||||
|
||||
time_seconds = time (NULL);
|
||||
local_time = localtime (&time_seconds);
|
||||
if (strncmp (var_LANG, "fr", 2) == 0)
|
||||
strftime (text, 255, "%A %d %B %G - %H:%M", local_time);
|
||||
else
|
||||
strftime (text, 255, "%B, %A %d %G - %H:%M", local_time);
|
||||
strftime (text, 1024, cfg_look_infobar_timestamp, local_time);
|
||||
wprintw (window->win_infobar, "%s", text);
|
||||
|
||||
wrefresh (window->win_infobar);
|
||||
|
||||
Reference in New Issue
Block a user