changeset 12145:5bda6a03d43b

[gaim-migrate @ 14446] A fix for SimGuy. He says that we should actually honor the system log preference under all cases. I suppose, maybe he's right. (01:05:24) Kevin Stange (SimGuy): I have the system log off (01:05:33) Kevin Stange (SimGuy): and yet somehow my own status changes are winding up in it (01:05:56) Kevin Stange (SimGuy): seems to just be idle changes (01:06:16) Kevin Stange (SimGuy): ---- +++ kevin_m_stange became unidle @ 2005-11-16 09:04:06 ---- (01:06:33) Kevin Stange (SimGuy): it is only logging my own idleness changes :) (01:07:10) Kevin Stange (SimGuy): I was just messing around and opening the dialogs from the tools menu and rather than being warned I have no system log, it showed me my system log, which shouldn't have happened :) (01:11:35) Kevin Stange (SimGuy): rlaager: it's clearly because of line ~ 1353 in status.c not checking the preference committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sat, 19 Nov 2005 01:19:51 +0000
parents d93e6979b77a
children a2d574a73028
files src/status.c
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/status.c	Sat Nov 19 00:34:04 2005 +0000
+++ b/src/status.c	Sat Nov 19 01:19:51 2005 +0000
@@ -1342,22 +1342,25 @@
 	else if(gaim_presence_get_context(presence) == GAIM_PRESENCE_CONTEXT_ACCOUNT)
 	{
 		GaimAccount *account;
-		GaimLog *log;
-		char *msg;
 		GaimConnection *gc;
 		GaimPluginProtocolInfo *prpl_info = NULL;
 
 		account = gaim_presence_get_account(presence);
-		log = gaim_account_get_log(account);
+
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
+		{
+			GaimLog *log = gaim_account_get_log(account);
+			char *msg;
 
-		if (idle)
-			msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account));
-		else
-			msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account));
-		gaim_log_write(log, GAIM_MESSAGE_SYSTEM,
-					   gaim_account_get_username(account),
-					   idle_time, msg);
-		g_free(msg);
+			if (idle)
+				msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account));
+			else
+				msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account));
+			gaim_log_write(log, GAIM_MESSAGE_SYSTEM,
+						   gaim_account_get_username(account),
+						   idle_time, msg);
+			g_free(msg);
+		}
 
 		gc = gaim_account_get_connection(account);