changeset 29488:80e05718db82

Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 25 Feb 2010 07:09:11 +0000
parents c08740a93dd1
children 7e150a194aef
files pidgin/win32/gtkwin32dep.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/win32/gtkwin32dep.c	Thu Feb 25 06:35:35 2010 +0000
+++ b/pidgin/win32/gtkwin32dep.c	Thu Feb 25 07:09:11 2010 +0000
@@ -375,11 +375,27 @@
 }
 
 void winpidgin_init(HINSTANCE hint) {
+	FARPROC proc;
 
 	purple_debug_info("winpidgin", "winpidgin_init start\n");
 
 	exe_hInstance = hint;
 
+	proc = wpurple_find_and_loadproc("exchndl.dll", "SetLogFile");
+	if (proc) {
+		gchar *debug_dir, *locale_debug_dir;
+		
+		debug_dir = g_build_filename(purple_user_dir(), "pidgin.RPT", NULL);
+		locale_debug_dir = g_locale_from_utf8(debug_dir, -1, NULL, NULL, NULL);
+
+		purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir);
+
+		(proc)(locale_debug_dir);
+
+		g_free(debug_dir);
+		g_free(locale_debug_dir);
+	}
+
 	/* IdleTracker Initialization */
 	if(!winpidgin_set_idlehooks())
 		purple_debug_error("winpidgin", "Failed to initialize idle tracker\n");