diff options
author | Tor Lillqvist <tml@novell.com> | 2008-09-13 19:31:29 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-09-13 19:31:29 +0000 |
commit | 4125df1d8ec75641728902c135a0499197d5f6c6 (patch) | |
tree | 272f135d088c0a41371fcf19d0aab2991a12b6b4 /gdk-pixbuf/gdk-pixbuf-io.c | |
parent | 42ec45e3c2dc352b8e5d96ffdae9b81e779f80e5 (diff) | |
download | gtk+-4125df1d8ec75641728902c135a0499197d5f6c6.tar.gz |
gdk-pixbuf/gdk-pixbuf-io.c Don't use the deprectated
2008-09-13 Tor Lillqvist <tml@novell.com>
* gdk-pixbuf/gdk-pixbuf-io.c
* gtk/gtkmain.c: Don't use the deprectated
g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory() functions. Use
g_win32_get_package_installation_directory_of_module()
instead. Also, don't use the deprecated silly
G_WIN32_DLLMAIN_FOR_DLL_NAME macro, but an explicit minimal
DllMain() that just saves the DLL handle.
svn path=/trunk/; revision=21381
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-io.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 967febbbd6..d6ddce76a2 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -228,8 +228,23 @@ skip_space (const char **pos) #ifdef G_OS_WIN32 -/* DllMain function needed to tuck away the gdk-pixbuf DLL name */ -G_WIN32_DLLMAIN_FOR_DLL_NAME (static, dll_name) +/* DllMain function needed to tuck away the gdk-pixbuf DLL handle */ + +static HMODULE gdk_pixbuf_dll; + +BOOL WINAPI +DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) +{ + switch (fdwReason) { + case DLL_PROCESS_ATTACH: + gdk_pixbuf_dll = (HMODULE) hinstDLL; + break; + } + + return TRUE; +} static char * get_toplevel (void) @@ -237,8 +252,7 @@ get_toplevel (void) static char *toplevel = NULL; if (toplevel == NULL) - toplevel = g_win32_get_package_installation_subdirectory - (NULL, dll_name, ""); + toplevel = g_win32_get_package_installation_directory_of_module (gdk_pixbuf_dll); return toplevel; } @@ -249,8 +263,7 @@ get_sysconfdir (void) static char *sysconfdir = NULL; if (sysconfdir == NULL) - sysconfdir = g_win32_get_package_installation_subdirectory - (NULL, dll_name, "etc"); + sysconfdir = g_build_filename (get_toplevel (), "etc", NULL); return sysconfdir; } |