]> Pileus Git - ~andy/gtk/commitdiff
gtk/gtkmain.c Use the new
authorTor Lillqvist <tml@iki.fi>
Wed, 17 Jan 2001 22:26:19 +0000 (22:26 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 17 Jan 2001 22:26:19 +0000 (22:26 +0000)
2001-01-18  Tor Lillqvist  <tml@iki.fi>

* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.

* config.h.win32.in: New file.

* config.h.win32: Removed.

* configure.in: Output config.h.win32.

* Makefile.am: Add it to EXTRA_DIST.

* gtk/gtk.def: Update.

2001-01-16  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.

2001-01-18  Tor Lillqvist  <tml@iki.fi>

* gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
g_win32_get_package_installation_subdirectory() function.
(gtk_win32_get_installation_directory): Remove this then.

16 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
config.h.win32.in [moved from config.h.win32 with 98% similarity, mode: 0644]
configure.in
gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-io.c
gdk/win32/gdkwindow-win32.c
gtk/gtk.def
gtk/gtkmain.c
gtk/gtkrc.c

index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index 1bdaddba80e9182f6a2619b9c838be5751c95027..3ef0b0ec6315e5e0e9ebc96db622a52e75741498 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkmain.c
+       * gtk/gtkrc.c: (Win32) Use the new
+       g_win32_get_package_installation_(sub)directory() functions.
+
+       * config.h.win32.in: New file.
+       
+       * config.h.win32: Removed.
+
+       * configure.in: Output config.h.win32.
+
+       * Makefile.am: Add it to EXTRA_DIST.
+
+       * gtk/gtk.def: Update.
+
 Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_size_request): Set the
@@ -81,7 +97,12 @@ Mon Jan  8 11:58:05 2001  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkdnd.c (gtk_drag_update):
        Free info->last_event if gdk_drag_motion returned FALSE.
 
->>>>>>> 1.1676
+2001-01-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
+       Eliminate redraws when input-only windows are shown or
+       hidden. Thanks to jpe@archaeopteryx.com.
+
 Tue Jan 16 13:13:13 GMT 2001  Tony Gale <gale@gtk.org>
 
        * docs/faq/gtk-faq.sgml: FAQ update:
index e59df953bfc014a630dacba87e658f8d55ce0a24..1ee167e4112ecfa5dcef7f69aa2a8e68fda68924 100644 (file)
@@ -19,6 +19,7 @@ EXTRA_DIST =                  \
        README.cvs-commits      \
        README.win32            \
        README.nanox            \
+       config.h.win32          \
        intl/libgettext.h       \
        intl/po2tbl.sed.in      \
        po/README.tools         \
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from config.h.win32
rename to config.h.win32.in
index ecbc5b3..28c0e53
@@ -1,4 +1,4 @@
-/* config.h.win32.  Handcrafted for Microsoft C and gcc -mno-cygwin */
+/* config.h.win32.  Handcrafted for Microsoft C or mingw */
 
 #if ! (defined(_MSC_VER) || defined(__GNUC__))
 #error Unrecognized Win32 compiler, edit config.h.win32 by hand
 
 /* #undef HAVE_SIGSETJMP */
 
-#define GETTEXT_PACKAGE "gtk20"
+#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
index a333fe0eb14819aacb8fdcc7aff8a068e9831070..bd3fb3074f830c1a82e3cb0b71b0b2b6645a9d75 100644 (file)
@@ -1142,6 +1142,7 @@ AC_PATH_PROG(SGML2HTML, sgml2html, no)
 AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
 
 AC_OUTPUT([
+config.h.win32
 gtk+.spec
 docs/gtk-config.1
 Makefile
index a7397810ba149e1090d2699a377335770a6bbe9f..f23023becd0d73f6e8356d1919d3d6aa04ab621c 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-18  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
+       g_win32_get_package_installation_subdirectory() function.
+       (gtk_win32_get_installation_directory): Remove this then.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * Makefile.am (libgdk_pixbuf_1_3_la_LDFLAGS): add
index b050c25f7ed32c08f5371385a0592543aacdadf7..d074629476e84babc44e66292948d14a5cfa3b6e 100644 (file)
@@ -215,55 +215,17 @@ pixbuf_module_symbol (GModule *module, const char *module_name, const char *symb
 
 #ifdef G_OS_WIN32
 
-/* What would be the right place for this function? Also
- * gtk needs this function (to find the gtkrc and themes).
- * But it seems stupid for the gdk-pixbuf DLL to depend
- * on the gtk DLL. Should it be in the gdk DLL? Or should we
- * have a small static library at the top gtk+ level?
- */
-
-static gchar *
-gtk_win32_get_installation_directory (void)
-{
-  static gboolean been_here = FALSE;
-  static gchar gtk_installation_dir[200];
-  gchar win_dir[100];
-  HKEY reg_key = NULL;
-  DWORD type;
-  DWORD nbytes = sizeof (gtk_installation_dir);
-
-  if (been_here)
-    return gtk_installation_dir;
-
-  been_here = TRUE;
-
-  if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\GNU\\GTk+", 0,
-                   KEY_QUERY_VALUE, &reg_key) != ERROR_SUCCESS
-      || RegQueryValueEx (reg_key, "InstallationDirectory", 0,
-                         &type, gtk_installation_dir, &nbytes) != ERROR_SUCCESS
-      || type != REG_SZ)
-    {
-      /* Uh oh. Use hard-coded %WinDir%\gtk+ value */
-      GetWindowsDirectory (win_dir, sizeof (win_dir));
-      sprintf (gtk_installation_dir, "%s\\gtk+", win_dir);
-    }
-
-  if (reg_key != NULL)
-    RegCloseKey (reg_key);
-
-  return gtk_installation_dir;
-}
-
 static char *
 get_libdir (void)
 {
   static char *libdir = NULL;
 
   if (libdir == NULL)
-    libdir = g_strdup_printf (gtk_win32_get_installation_directory (),
-                             G_DIR_SEPARATOR_S,
-                             "loaders",
-                             NULL);
+    libdir = g_win32_get_package_installation_subdirectory
+      (GETTEXT_PACKAGE,
+       g_strdup_printf ("gdk_pixbug-%d.%d.dll",
+                       GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR),
+       "loaders");
 
   return libdir;
 }
index 8a516965e1a940a5c457d5ae0a961899f03f0dd0..6a7fc6abec1b30dc751d487611b7ca111cd42cd8 100644 (file)
@@ -816,13 +816,24 @@ gdk_window_show (GdkWindow *window)
        }
       else
        {
-         ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
-         ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
-         SetForegroundWindow (GDK_WINDOW_HWND (window));
-         BringWindowToTop (GDK_WINDOW_HWND (window));
+          if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
+           {
+             SetWindowPos(GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0,
+                          SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | SWP_NOSIZE);
+           }
+          else
+            {
+             GdkWindow *parent = private->parent;
+
+             ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+             ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+              if (parent == gdk_parent_root)
+                SetForegroundWindow (GDK_WINDOW_HWND (window));
+             BringWindowToTop (GDK_WINDOW_HWND (window));
 #if 0
-         ShowOwnedPopups (GDK_WINDOW_HWND (window), TRUE);
+             ShowOwnedPopups (GDK_WINDOW_HWND (window), TRUE);
 #endif
+           }
        }
     }
 }
@@ -844,7 +855,15 @@ gdk_window_hide (GdkWindow *window)
       if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
        ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
 
-      ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
+      if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
+       {
+         SetWindowPos(GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0,
+                      SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
+       }
+      else
+       {
+         ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
+       }
     }
 }
 
index 9430d1f704e1f112c61cb48ee4554c6c71d5d3ed..a73b96fffc159b7469a5af5a1657e0387ac70f0c 100755 (executable)
@@ -1555,7 +1555,6 @@ EXPORTS
        gtk_widget_unparent
        gtk_widget_unrealize
        gtk_widget_unref
-       gtk_win32_get_installation_directory
        gtk_window_activate_default
        gtk_window_activate_focus
        gtk_window_add_accel_group
index c66f4922d27dcecd4d0db208866f78a1afa2e757..d3ba241d4c46439390dc61eaa1ec6cf948f44153 100644 (file)
@@ -406,12 +406,10 @@ gtk_init_check (int        *argc,
 #    endif
 #  else /* !G_OS_WIN32 */
   {
-    /* GTk+ locale dir is %WinDir%\gtk+\locale */
     bindtextdomain (GETTEXT_PACKAGE,
-                   g_strconcat (gtk_win32_get_installation_directory (),
-                                G_DIR_SEPARATOR_S,
-                                "locale",
-                                NULL));
+                   g_win32_get_package_installation_subdirectory (GETTEXT_PACKAGE,
+                                                                  g_strdup_printf ("gtk-%d.%d.dll", GTK_MAJOR_VERSION, GTK_MINOR_VERSION),
+                                                                  "locale"));
   }
 #endif
 #endif  
index 18ea5a6dbda36e33541135ad80fbf7afa589c845..03a12b3bfe3d0691b39a9d196a76742e8a458c04 100644 (file)
@@ -51,6 +51,7 @@
 #include <glib.h>
 #include "gdkconfig.h"
 
+#include "gtkcompat.h"
 #include "gtkrc.h"
 #include "gtkbindings.h"
 #include "gtkthemes.h"
@@ -58,7 +59,6 @@
 #include "gtkiconfactory.h"
 
 #ifdef G_OS_WIN32
-#include <windows.h>           /* For GetWindowsDirectory */
 #include <io.h>
 #endif
 
@@ -268,45 +268,23 @@ static GtkImageLoader image_loader = NULL;
 
 #ifdef G_OS_WIN32
 
-gchar *
-gtk_win32_get_installation_directory (void)
+static gchar *
+get_gtk_dll_name (void)
 {
-  static gboolean been_here = FALSE;
-  static gchar gtk_installation_dir[200];
-  gchar win_dir[100];
-  HKEY reg_key = NULL;
-  DWORD type;
-  DWORD nbytes = sizeof (gtk_installation_dir);
-
-  if (been_here)
-    return gtk_installation_dir;
-
-  been_here = TRUE;
+  static gchar *gtk_dll = NULL;
 
-  if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\GNU\\GTk+", 0,
-                   KEY_QUERY_VALUE, &reg_key) != ERROR_SUCCESS
-      || RegQueryValueEx (reg_key, "InstallationDirectory", 0,
-                         &type, gtk_installation_dir, &nbytes) != ERROR_SUCCESS
-      || type != REG_SZ)
-    {
-      /* Uh oh. Use the old hard-coded %WinDir%\GTk+ value */
-      GetWindowsDirectory (win_dir, sizeof (win_dir));
-      sprintf (gtk_installation_dir, "%s\\gtk+", win_dir);
-    }
+  if (!gtk_dll)
+    gtk_dll = g_strdup_printf ("gtk-%d.%d.dll", GTK_MAJOR_VERSION, GTK_MINOR_VERSION);
 
-  if (reg_key != NULL)
-    RegCloseKey (reg_key);
-
-  return gtk_installation_dir;
+  return gtk_dll;
 }
 
 static gchar *
 get_themes_directory (void)
 {
-  static gchar themes_dir[200];
-
-  sprintf (themes_dir, "%s\\themes", gtk_win32_get_installation_directory ());
-  return themes_dir;
+  return g_win32_get_package_installation_subdirectory (GETTEXT_PACKAGE,
+                                                       get_gtk_dll_name (),
+                                                       "themes");
 }
 
 #endif
@@ -358,7 +336,7 @@ gtk_rc_get_im_module_file (void)
 #ifndef G_OS_WIN32
        result = g_strdup (GTK_SYSCONFDIR G_DIR_SEPARATOR_S "gtk-2.0" G_DIR_SEPARATOR_S "gtk.immodules");
 #else
-       result = g_strdup_printf ("%s\\gtk.immodules", gtk_win32_get_installation_directory ());
+       result = g_strdup_printf ("%s\\gtk.immodules", g_win32_get_package_installation_directory (GETTEXT_PACKAGE, get_gtk_dll_name ()));
 #endif
     }
 
@@ -462,7 +440,7 @@ gtk_rc_add_initial_default_files (void)
 #ifndef G_OS_WIN32
       str = g_strdup (GTK_SYSCONFDIR G_DIR_SEPARATOR_S "gtk-2.0" G_DIR_SEPARATOR_S "gtkrc");
 #else
-      str = g_strdup_printf ("%s\\gtkrc", gtk_win32_get_installation_directory ());
+      str = g_strdup_printf ("%s\\gtkrc", g_win32_get_package_installation_directory (GETTEXT_PACKAGE, get_gtk_dll_name ()));
 #endif
 
       gtk_rc_add_default_file (str);