summaryrefslogtreecommitdiff
path: root/gtk/gtkimmodule.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@gimp.org>2011-10-22 08:48:13 +0200
committerMichael Natterer <mitch@gimp.org>2011-10-22 23:53:55 +0200
commit2688ccdbc4c8976ba4f7d681533d70ab9edc8b32 (patch)
treeebc5503bb0dc4be70f273bde1499225feb8d0e1b /gtk/gtkimmodule.c
parent88ad614c735a92f8e0b029e2b5070bf0f8db5016 (diff)
downloadgtk+-2688ccdbc4c8976ba4f7d681533d70ab9edc8b32.tar.gz
gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h - add gtkprivate.c and move stuff there from gtkmain.c - add gtkwin32.c and move stuff there from gtkmain.c - don't redefine GTK_DATADIR and friends in gtkprivate.h - have _gtk_get_datadir() and friends on all platforms - remove the horrid hacks where gtkprivate.h can't be included, or must be included later due to redefinition of the compile-time directories
Diffstat (limited to 'gtk/gtkimmodule.c')
-rw-r--r--gtk/gtkimmodule.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 593a868504..93ac7b9077 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -36,17 +36,9 @@
#include "gtkimcontextsimple.h"
#include "gtksettings.h"
#include "gtkmainprivate.h"
+#include "gtkprivate.h"
#include "gtkintl.h"
-/* Do *not* include "gtkprivate.h" in this file. If you do, the
- * correct_libdir_prefix() and correct_localedir_prefix() functions
- * below will have to move somewhere else.
- */
-
-#ifdef __GTK_PRIVATE_H__
-#error gtkprivate.h should not be included in this file
-#endif
-
#define SIMPLE_ID "gtk-im-context-simple"
/**
@@ -239,10 +231,7 @@ add_module (GtkIMModule *module, GSList *infos)
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.
- */
+ /* GTK_LIBDIR is the build-time libdir */
if (strncmp (*path, GTK_LIBDIR, strlen (GTK_LIBDIR)) == 0)
{
/* This is an entry put there by make install on the
@@ -253,7 +242,6 @@ 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_get_libdir (), tem + strlen (GTK_LIBDIR), NULL);
g_free (tem);
@@ -263,12 +251,9 @@ correct_libdir_prefix (gchar **path)
static void
correct_localedir_prefix (gchar **path)
{
- /* As above, but for GTK_LOCALEDIR. Use separate function in case
- * GTK_LOCALEDIR isn't a subfolder of GTK_LIBDIR.
- */
+ /* See above */
if (strncmp (*path, GTK_LOCALEDIR, strlen (GTK_LOCALEDIR)) == 0)
{
- extern const gchar *_gtk_get_localedir ();
gchar *tem = *path;
*path = g_strconcat (_gtk_get_localedir (), tem + strlen (GTK_LOCALEDIR), NULL);
g_free (tem);