]> Pileus Git - ~andy/gtk/commitdiff
Can't include gtkprivate.h (I added the include yesterday, without really
authorTor Lillqvist <tml@iki.fi>
Sat, 3 Nov 2001 23:26:03 +0000 (23:26 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 3 Nov 2001 23:26:03 +0000 (23:26 +0000)
2001-11-04  Tor Lillqvist  <tml@iki.fi>

* gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
include yesterday, without really thinking), as that defeats the
working of correct_libdir_prefix() (it becomes a no-op.). Add
comment mentioning that. Thanks to Hans Breuer for noticing.

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
gtk/gtkimmodule.c

index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 8d4b6f85f7bca73f9ae03dca81516a10d7265995..e43b75f4792f0d4f7630b1b8e658196c38cb5b61 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-04  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtkimmodule.c: Can't include gtkprivate.h (I added the
+       include yesterday, without really thinking), as that defeats the
+       working of correct_libdir_prefix() (it becomes a no-op.). Add
+       comment mentioning that. Thanks to Hans Breuer for noticing.
+       
 2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
index 1be18f554d2f7f3809e5d36073241f782f240ba9..85f1c927ca127bab175b52d9adadb8258ff7b2cb 100644 (file)
 #include <pango/pango-utils.h>
 #include "gtkimmodule.h"
 #include "gtkimcontextsimple.h"
-#include "gtkprivate.h"
 #include "gtkrc.h"
 #include "config.h"
 #include "gtkintl.h"
 
+/* Do *not* include "gtkprivate.h" in this file. If you do, the
+ * correct_libdir_prefix() function below will have to move somewhere
+ * else.
+ */
+
 #define SIMPLE_ID "gtk-im-context-simple"
 
 typedef struct _GtkIMModule      GtkIMModule;
@@ -223,10 +227,20 @@ add_module (GtkIMModule *module, GSList *infos)
   modules_list = g_slist_prepend (modules_list, module);
 }
 
-#ifdef G_OS_WIN32
+#if defined (G_OS_WIN32) && defined (GTK_LIBDIR)
+/* This is needes on Win32, but not wanted when compiling with MSVC,
+ * as the makefile.msc doesn't define any GTK_LIBDIR value.
+ */
+
+#define DO_CORRECT_LIBDIR_PREFIX /* Flag to check below whether to call this */
+
 static void
 correct_libdir_prefix (gchar **path)
 {
+  /* GTK_LIBDIR here is supposed to still have the definition from
+   * Makefile.am, i.e. the build-time value. Do *not* include gtkprivate.h
+   * in this file.
+   */
   if (strncmp (*path, GTK_LIBDIR, strlen (GTK_LIBDIR)) == 0)
     {
       /* This is an entry put there by make install on the
@@ -237,8 +251,9 @@ correct_libdir_prefix (gchar **path)
        * builder's machine. Replace the path with the real
        * one on this machine.
        */
+      extern const gchar *_gtk_get_libdir ();
       gchar *tem = *path;
-      *path = g_strconcat (GTK_LIBDIR, tem + strlen (GTK_LIBDIR), NULL);
+      *path = g_strconcat (_gtk_get_libdir (), tem + strlen (GTK_LIBDIR), NULL);
       g_free (tem);
     }
 }
@@ -303,7 +318,7 @@ gtk_im_module_init ()
            }
 
          module->path = g_strdup (tmp_buf->str);
-#ifdef G_OS_WIN32
+#ifdef DO_CORRECT_LIBDIR_PREFIX
          correct_libdir_prefix (&module->path);
 #endif
          g_type_module_set_name (G_TYPE_MODULE (module), module->path);
@@ -329,7 +344,7 @@ gtk_im_module_init ()
          if (!pango_scan_string (&p, tmp_buf))
            goto context_error;
          info->domain_dirname = g_strdup (tmp_buf->str);
-#ifdef G_OS_WIN32
+#ifdef DO_CORRECT_LIBDIR_PREFIX
          correct_libdir_prefix (&info->domain_dirname);
 #endif