# HG changeset patch # User Luke Schierer # Date 1100199633 0 # Node ID 829a569993e038ec759eb403d05d31553f06ab9f # Parent 3c88c2f1b732bb172c4b61a0fb2b24b01e787c39 [gaim-migrate @ 11263] DaSkreech noticed that the per-conversation logs could not over-rule the global options. I figured out that gaim_log_write was the cause, it was checking global options but not local ones. Stu determined that these checks were redundant. committer: Tailor Script diff -r 3c88c2f1b732 -r 829a569993e0 src/log.c --- a/src/log.c Thu Nov 11 18:00:32 2004 +0000 +++ b/src/log.c Thu Nov 11 19:00:33 2004 +0000 @@ -78,23 +78,17 @@ g_return_if_fail(log->logger); g_return_if_fail(log->logger->write); - if ((log->type == GAIM_LOG_IM && - gaim_prefs_get_bool("/core/logging/log_ims")) || - (log->type == GAIM_LOG_CHAT && - gaim_prefs_get_bool("/core/logging/log_chats")) || - (log->type == GAIM_LOG_SYSTEM && - gaim_prefs_get_bool("/core/logging/log_system"))) { - struct _gaim_logsize_user *lu; - (log->logger->write)(log, type, from, time, message); + struct _gaim_logsize_user *lu; + (log->logger->write)(log, type, from, time, message); + + lu = g_new(struct _gaim_logsize_user, 1); - lu = g_new(struct _gaim_logsize_user, 1); + lu->name = g_strdup(gaim_normalize(log->account, log->name)); + lu->account = log->account; + g_hash_table_remove(logsize_users, lu); + g_free(lu->name); + g_free(lu); - lu->name = g_strdup(gaim_normalize(log->account, log->name)); - lu->account = log->account; - g_hash_table_remove(logsize_users, lu); - g_free(lu->name); - g_free(lu); - } } char *gaim_log_read(GaimLog *log, GaimLogReadFlags *flags) diff -r 3c88c2f1b732 -r 829a569993e0 src/log.h --- a/src/log.h Thu Nov 11 18:00:32 2004 +0000 +++ b/src/log.h Thu Nov 11 19:00:33 2004 +0000 @@ -137,7 +137,7 @@ void gaim_log_free(GaimLog *log); /** - * Writes to a log file + * Writes to a log file. Assumes you have checked preferences already. * * @param log The log to write to * @param type The type of message being logged