pidgin/win32/gtkwin32dep.c

branch
release-2.x.y
changeset 33371
6d93866a4a3f
parent 30793
1f869064d3ee
child 33647
c76b490587d4
equal deleted inserted replaced
33367:36b1f6ba0564 33371:6d93866a4a3f
375 winpidgin_conv_blink(conv, flags); 375 winpidgin_conv_blink(conv, flags);
376 return FALSE; 376 return FALSE;
377 } 377 }
378 378
379 void winpidgin_init(HINSTANCE hint) { 379 void winpidgin_init(HINSTANCE hint) {
380 FARPROC proc; 380 typedef void (__cdecl* LPFNSETLOGFILE)(const LPCSTR);
381 LPFNSETLOGFILE MySetLogFile;
381 gchar *exchndl_dll_path; 382 gchar *exchndl_dll_path;
382 383
383 purple_debug_info("winpidgin", "winpidgin_init start\n"); 384 purple_debug_info("winpidgin", "winpidgin_init start\n");
384 385
385 exe_hInstance = hint; 386 exe_hInstance = hint;
386 387
387 exchndl_dll_path = g_build_filename(wpurple_install_dir(), "exchndl.dll", NULL); 388 exchndl_dll_path = g_build_filename(wpurple_install_dir(), "exchndl.dll", NULL);
388 proc = wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile"); 389 MySetLogFile = (LPFNSETLOGFILE) wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile");
389 g_free(exchndl_dll_path); 390 g_free(exchndl_dll_path);
390 exchndl_dll_path = NULL; 391 exchndl_dll_path = NULL;
391 if (proc) { 392 if (MySetLogFile) {
392 gchar *debug_dir, *locale_debug_dir; 393 gchar *debug_dir, *locale_debug_dir;
393 394
394 debug_dir = g_build_filename(purple_user_dir(), "pidgin.RPT", NULL); 395 debug_dir = g_build_filename(purple_user_dir(), "pidgin.RPT", NULL);
395 locale_debug_dir = g_locale_from_utf8(debug_dir, -1, NULL, NULL, NULL); 396 locale_debug_dir = g_locale_from_utf8(debug_dir, -1, NULL, NULL, NULL);
396 397
397 purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir); 398 purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir);
398 399
399 (proc)(locale_debug_dir); 400 MySetLogFile(locale_debug_dir);
400 401
401 g_free(debug_dir); 402 g_free(debug_dir);
402 g_free(locale_debug_dir); 403 g_free(locale_debug_dir);
403 } 404 }
404 405

mercurial