changeset 10171:829a569993e0

[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 <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 11 Nov 2004 19:00:33 +0000
parents 3c88c2f1b732
children 374d63326461
files src/log.c src/log.h
diffstat 2 files changed, 10 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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