1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

Fixed bug with prefixes in config file

This commit is contained in:
Sebastien Helleu
2008-02-01 16:45:43 +01:00
parent c3aa3efac8
commit b2c5a94e5d
2 changed files with 16 additions and 13 deletions
-7
View File
@@ -279,13 +279,6 @@ config_change_read_marker ()
void
config_change_prefix ()
{
int i;
for (i = 0; i < GUI_CHAT_PREFIX_NUMBER; i++)
{
if (gui_chat_prefix[i])
free (gui_chat_prefix[i]);
}
gui_chat_prefix_build ();
}
+16 -6
View File
@@ -56,12 +56,12 @@ int gui_chat_time_length = 0; /* length of time for each line (in chars) */
void
gui_chat_prefix_build_empty ()
{
gui_chat_prefix[GUI_CHAT_PREFIX_INFO] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_NETWORK] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_ACTION] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_JOIN] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_QUIT] = gui_chat_prefix_empty;
gui_chat_prefix[GUI_CHAT_PREFIX_INFO] = strdup (gui_chat_prefix_empty);
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR] = strdup (gui_chat_prefix_empty);
gui_chat_prefix[GUI_CHAT_PREFIX_NETWORK] = strdup (gui_chat_prefix_empty);
gui_chat_prefix[GUI_CHAT_PREFIX_ACTION] = strdup (gui_chat_prefix_empty);
gui_chat_prefix[GUI_CHAT_PREFIX_JOIN] = strdup (gui_chat_prefix_empty);
gui_chat_prefix[GUI_CHAT_PREFIX_QUIT] = strdup (gui_chat_prefix_empty);
}
/*
@@ -73,6 +73,16 @@ void
gui_chat_prefix_build ()
{
char prefix[128];
int i;
for (i = 0; i < GUI_CHAT_PREFIX_NUMBER; i++)
{
if (gui_chat_prefix[i])
{
free (gui_chat_prefix[i]);
gui_chat_prefix[i] = NULL;
}
}
snprintf (prefix, sizeof (prefix), "%s%s\t",
GUI_COLOR(GUI_COLOR_CHAT_PREFIX_INFO),