Mercurial > pidgin
changeset 3856:50ac7e205045
[gaim-migrate @ 4008]
Gtkspell/aspell update
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sat, 02 Nov 2002 01:38:51 +0000 |
parents | 38c95b5835f9 |
children | ce2ed064d393 |
files | src/win32/win32dep.c |
diffstat | 1 files changed, 29 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/win32/win32dep.c Sat Nov 02 01:33:29 2002 +0000 +++ b/src/win32/win32dep.c Sat Nov 02 01:38:51 2002 +0000 @@ -31,7 +31,8 @@ /* * GLOBALS */ -HINSTANCE g_hInstance = 0; +HINSTANCE gaimexe_hInstance = 0; +HINSTANCE gaimdll_hInstance = 0; /* * STATIC CODE @@ -46,7 +47,7 @@ nid.uID=0; nid.uFlags=NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.uCallbackMessage=WM_TRAYMESSAGE; - nid.hIcon=LoadIcon(g_hInstance,MAKEINTRESOURCE(IDI_ICON2)); + nid.hIcon=LoadIcon(gaimexe_hInstance,MAKEINTRESOURCE(IDI_ICON2)); lstrcpy(nid.szTip,TEXT(GAIM_SYSTRAY_HINT)); if(bAdd) @@ -78,6 +79,8 @@ * PUBLIC CODE */ +/* Determine Gaim Paths during Runtime */ + char* wgaim_install_dir(void) { HMODULE hmod; char* buf; @@ -114,6 +117,8 @@ return (char*)&locale_dir; } +/* Systray related routines */ + GdkFilterReturn wgaim_window_filter( GdkXEvent *xevent, GdkEvent *event, gpointer data) { MSG *msg = (MSG*)xevent; @@ -137,9 +142,31 @@ return GDK_FILTER_CONTINUE; } +/* Windows Initializations */ + void wgaim_init(void) { + char* locale=0; + char newenv[128]; + /* Filter to catch systray events */ gdk_add_client_message_filter (GDK_POINTER_TO_ATOM (WM_TRAYMESSAGE), traymsg_filter_func, NULL); + /* get default locale */ + locale = g_win32_getlocale(); + debug_printf("Language profile used: %s\n", locale); + + /* + * Aspell config + */ + /* Set LANG env var */ + sprintf(newenv, "LANG=%s", locale); + if(putenv(newenv)<0) + debug_printf("putenv failed\n"); + g_free(locale); } + +BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { + gaimdll_hInstance = hinstDLL; + return TRUE; +}