[gtk+] Remove gtktypeutils altogether



commit 98440ad03190396bd2bef02557f8d41e12dd5795
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 4 14:51:19 2011 -0500

    Remove gtktypeutils altogether
    
    Based on patches by Javier Jardón.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629955

 gtk/Makefile.am            |    2 -
 gtk/gtk.h                  |    2 +-
 gtk/gtkaboutdialog.c       |    1 +
 gtk/gtkactiongroup.h       |    2 +-
 gtk/gtkassistant.c         |    2 +-
 gtk/gtkbindings.c          |  655 +++++++++++++++++++++++---------------------
 gtk/gtkbutton.c            |    1 +
 gtk/gtkcellrendereraccel.c |    1 +
 gtk/gtkcombobox.c          |    1 +
 gtk/gtkcontainer.c         |    6 +-
 gtk/gtkentry.c             |    1 +
 gtk/gtkfilechooserbutton.c |    1 +
 gtk/gtkframe.c             |    1 +
 gtk/gtkhandlebox.c         |    3 +
 gtk/gtkiconfactory.c       |    4 +-
 gtk/gtkiconview.c          |    1 +
 gtk/gtkimage.c             |    2 +
 gtk/gtkinfobar.c           |    1 +
 gtk/gtklabel.c             |    1 +
 gtk/gtkmain.h              |    1 -
 gtk/gtkmenu.c              |    1 +
 gtk/gtkmenubar.c           |    2 +-
 gtk/gtkmenuitem.c          |    2 +
 gtk/gtkmenushell.c         |    1 +
 gtk/gtkmessagedialog.c     |    2 +
 gtk/gtknotebook.c          |    1 +
 gtk/gtkpaned.c             |    2 +-
 gtk/gtkprintoperation.c    |    8 +-
 gtk/gtkprintsettings.c     |    6 +-
 gtk/gtkprintunixdialog.c   |   21 +-
 gtk/gtkrange.c             |    1 +
 gtk/gtkscalebutton.c       |    2 +-
 gtk/gtkscrolledwindow.c    |    1 +
 gtk/gtkspinbutton.c        |    1 +
 gtk/gtkstatusbar.c         |    2 +
 gtk/gtkstatusicon.c        |   16 +-
 gtk/gtkstock.h             |   15 +-
 gtk/gtktexttag.c           |    8 +-
 gtk/gtktextview.c          |    1 +
 gtk/gtktoolbar.c           |    1 +
 gtk/gtktoolitemgroup.c     |    6 +-
 gtk/gtktoolpalette.c       |    2 +-
 gtk/gtktrayicon-x11.c      |   10 +-
 gtk/gtktreeview.c          |    1 +
 gtk/gtktreeviewcolumn.c    |    1 +
 gtk/gtktypeutils.c         |   47 ----
 gtk/gtktypeutils.h         |   50 ----
 gtk/gtkwidget.c            |    1 +
 gtk/gtkwindow.c            |    5 +-
 po-properties/POTFILES.in  |    1 -
 po/POTFILES.in             |    1 -
 51 files changed, 438 insertions(+), 470 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 6dd2e01..79aeb45 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -333,7 +333,6 @@ gtk_public_h_sources = 		\
 	gtktreestore.h		\
 	gtktreeview.h		\
 	gtktreeviewcolumn.h	\
-	gtktypeutils.h		\
 	gtkuimanager.h		\
 	gtkvbbox.h		\
 	gtkvbox.h		\
@@ -662,7 +661,6 @@ gtk_base_c_sources = 		\
 	gtktreeview.c		\
 	gtktreeviewcolumn.c	\
 	gtktypebuiltins.c	\
-	gtktypeutils.c		\
 	gtkuimanager.c		\
 	gtkvbbox.c		\
 	gtkvbox.c		\
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 0d85793..29b41f2 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -217,7 +217,7 @@
 #include <gtk/gtktreestore.h>
 #include <gtk/gtktreeview.h>
 #include <gtk/gtktreeviewcolumn.h>
-#include <gtk/gtktypeutils.h>
+#include <gtk/gtktypebuiltins.h>
 #include <gtk/gtkuimanager.h>
 #include <gtk/gtkvbbox.h>
 #include <gtk/gtkvbox.h>
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index ea4d930..d63054f 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -54,6 +54,7 @@
 #include "gtkmain.h"
 #include "gtkmessagedialog.h"
 #include "gtktogglebutton.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkactiongroup.h b/gtk/gtkactiongroup.h
index c77987c..33fa000 100644
--- a/gtk/gtkactiongroup.h
+++ b/gtk/gtkactiongroup.h
@@ -36,7 +36,7 @@
 #define __GTK_ACTION_GROUP_H__
 
 #include <gtk/gtkaction.h>
-#include <gtk/gtktypeutils.h> /* for GtkTranslateFunc */
+#include <gtk/gtkstock.h>
 
 G_BEGIN_DECLS
 
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index e3a5af7..fa740bd 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -71,7 +71,7 @@
 #include "gtksizegroup.h"
 #include "gtksizerequest.h"
 #include "gtkstock.h"
-
+#include "gtktypebuiltins.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkbuildable.h"
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index e8b0b63..733c9b1 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -11,7 +11,7 @@
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
@@ -32,14 +32,17 @@
 #include <stdarg.h>
 
 #include "gtkbindings.h"
-#include "gtktypeutils.h"
 #include "gtkkeyhash.h"
 #include "gtkwidget.h"
 #include "gtkrc.h"
-
+#include "gtkintl.h"
 
 /* --- defines --- */
-#define	BINDING_MOD_MASK()	(gtk_accelerator_get_default_mod_mask () | GDK_RELEASE_MASK)
+#define BINDING_MOD_MASK() (gtk_accelerator_get_default_mod_mask () | GDK_RELEASE_MASK)
+
+
+#define GTK_TYPE_IDENTIFIER (gtk_identifier_get_type ())
+GType gtk_identifier_get_type (void) G_GNUC_CONST;
 
 
 /* --- structures --- */
@@ -52,14 +55,28 @@ typedef struct {
 
 
 /* --- variables --- */
-static GHashTable	*binding_entry_hash_table = NULL;
+static GHashTable       *binding_entry_hash_table = NULL;
 static GSList           *binding_key_hashes = NULL;
-static GSList		*binding_set_list = NULL;
-static const gchar	 key_class_binding_set[] = "gtk-class-binding-set";
-static GQuark		 key_id_class_binding_set = 0;
+static GSList           *binding_set_list = NULL;
+static const gchar       key_class_binding_set[] = "gtk-class-binding-set";
+static GQuark            key_id_class_binding_set = 0;
 
 
 /* --- functions --- */
+GType
+gtk_identifier_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    {
+      GTypeInfo tinfo = { 0, };
+      our_type = g_type_register_static (G_TYPE_STRING, I_("GtkIdentifier"), &tinfo, 0);
+    }
+
+  return our_type;
+}
+
 static void
 pattern_spec_free (PatternSpec *pspec)
 {
@@ -70,7 +87,7 @@ pattern_spec_free (PatternSpec *pspec)
 
 static GtkBindingSignal*
 binding_signal_new (const gchar *signal_name,
-		    guint	 n_args)
+                    guint        n_args)
 {
   GtkBindingSignal *signal;
 
@@ -91,7 +108,7 @@ binding_signal_free (GtkBindingSignal *sig)
   for (i = 0; i < sig->n_args; i++)
     {
       if (G_TYPE_FUNDAMENTAL (sig->args[i].arg_type) == G_TYPE_STRING)
-	g_free (sig->args[i].d.string_data);
+        g_free (sig->args[i].d.string_data);
     }
   g_slice_free1 (sizeof (GtkBindingSignal) + sig->n_args * sizeof (GtkBindingArg), sig);
 }
@@ -110,7 +127,7 @@ binding_entry_hash (gconstpointer  key)
 
 static gint
 binding_entries_compare (gconstpointer  a,
-			 gconstpointer  b)
+                         gconstpointer  b)
 {
   register const GtkBindingEntry *ea = a;
   register const GtkBindingEntry *eb = b;
@@ -120,7 +137,7 @@ binding_entries_compare (gconstpointer  a,
 
 static void
 binding_key_hash_insert_entry (GtkKeyHash      *key_hash,
-			       GtkBindingEntry *entry)
+                               GtkBindingEntry *entry)
 {
   guint keyval = entry->keyval;
   
@@ -130,9 +147,9 @@ binding_key_hash_insert_entry (GtkKeyHash      *key_hash,
   if (entry->modifiers & GDK_SHIFT_MASK)
     {
       if (keyval == GDK_KEY_Tab)
-	keyval = GDK_KEY_ISO_Left_Tab;
+        keyval = GDK_KEY_ISO_Left_Tab;
       else
-	keyval = gdk_keyval_to_upper (keyval);
+        keyval = gdk_keyval_to_upper (keyval);
     }
   
   _gtk_key_hash_add_entry (key_hash, keyval, entry->modifiers & ~GDK_RELEASE_MASK, entry);
@@ -149,8 +166,8 @@ binding_key_hash_destroy (gpointer data)
 
 static void
 insert_entries_into_key_hash (gpointer key,
-			      gpointer value,
-			      gpointer data)
+                              gpointer value,
+                              gpointer data)
 {
   GtkKeyHash *key_hash = data;
   GtkBindingEntry *entry = value;
@@ -176,9 +193,9 @@ binding_key_hash_for_keymap (GdkKeymap *keymap)
       g_object_set_qdata_full (G_OBJECT (keymap), key_hash_quark, key_hash, binding_key_hash_destroy);
 
       if (binding_entry_hash_table)
-	g_hash_table_foreach (binding_entry_hash_table,
-			      insert_entries_into_key_hash,
-			      key_hash);
+        g_hash_table_foreach (binding_entry_hash_table,
+                              insert_entries_into_key_hash,
+                              key_hash);
 
       binding_key_hashes = g_slist_prepend (binding_key_hashes, key_hash);
     }
@@ -189,8 +206,8 @@ binding_key_hash_for_keymap (GdkKeymap *keymap)
 
 static GtkBindingEntry*
 binding_entry_new (GtkBindingSet  *binding_set,
-		   guint           keyval,
-		   GdkModifierType modifiers)
+                   guint           keyval,
+                   GdkModifierType modifiers)
 {
   GSList *tmp_list;
   GtkBindingEntry *entry;
@@ -230,9 +247,9 @@ binding_entry_free (GtkBindingEntry *entry)
   GtkBindingSignal *sig;
 
   g_assert (entry->set_next == NULL &&
-	    entry->hash_next == NULL &&
-	    entry->in_emission == FALSE &&
-	    entry->destroyed == TRUE);
+            entry->hash_next == NULL &&
+            entry->in_emission == FALSE &&
+            entry->destroyed == TRUE);
 
   entry->destroyed = FALSE;
   
@@ -264,13 +281,13 @@ binding_entry_destroy (GtkBindingEntry *entry)
   while (tmp)
     {
       if (tmp == entry)
-	{
-	  if (last)
-	    last->set_next = entry->set_next;
-	  else
-	    entry->binding_set->entries = entry->set_next;
-	  break;
-	}
+        {
+          if (last)
+            last->set_next = entry->set_next;
+          else
+            entry->binding_set->entries = entry->set_next;
+          break;
+        }
       last = tmp;
       tmp = last->set_next;
     }
@@ -283,13 +300,13 @@ binding_entry_destroy (GtkBindingEntry *entry)
   while (tmp)
     {
       if (tmp == entry)
-	{
-	  if (last)
-	    last->hash_next = entry->hash_next;
-	  else
-	    begin = entry->hash_next;
-	  break;
-	}
+        {
+          if (last)
+            last->hash_next = entry->hash_next;
+          else
+            begin = entry->hash_next;
+          break;
+        }
       last = tmp;
       tmp = last->hash_next;
     }
@@ -317,8 +334,8 @@ binding_entry_destroy (GtkBindingEntry *entry)
 
 static GtkBindingEntry*
 binding_ht_lookup_entry (GtkBindingSet  *set,
-			 guint		 keyval,
-			 GdkModifierType modifiers)
+                         guint           keyval,
+                         GdkModifierType modifiers)
 {
   GtkBindingEntry lookup_entry = { 0 };
   GtkBindingEntry *entry;
@@ -339,9 +356,9 @@ binding_ht_lookup_entry (GtkBindingSet  *set,
 
 static gboolean
 binding_compose_params (GObject         *object,
-			GtkBindingArg	*args,
-			GSignalQuery	*query,
-			GValue	       **params_p)
+                        GtkBindingArg   *args,
+                        GSignalQuery    *query,
+                        GValue         **params_p)
 {
   GValue *params;
   const GType *types;
@@ -366,85 +383,85 @@ binding_compose_params (GObject         *object,
       g_value_init (params, *types);
 
       switch (G_TYPE_FUNDAMENTAL (args->arg_type))
-	{
-	case G_TYPE_DOUBLE:
-	  g_value_init (&tmp_value, G_TYPE_DOUBLE);
-	  g_value_set_double (&tmp_value, args->d.double_data);
-	  break;
-	case G_TYPE_LONG:
-	  g_value_init (&tmp_value, G_TYPE_LONG);
-	  g_value_set_long (&tmp_value, args->d.long_data);
-	  break;
-	case G_TYPE_STRING:
-	  /* gtk_rc_parse_flags/enum() has fancier parsing for this; we can't call
-	   * that since we don't have a GParamSpec, so just do something simple
-	   */
-	  if (G_TYPE_FUNDAMENTAL (*types) == G_TYPE_ENUM)
-	    {
-	      GEnumClass *class = G_ENUM_CLASS (g_type_class_ref (*types));
-	      
-	      valid = FALSE;
-	      
-	      if (args->arg_type == GTK_TYPE_IDENTIFIER)
-		{
-		  GEnumValue *enum_value = NULL;
-		  enum_value = g_enum_get_value_by_name (class, args->d.string_data);
-		  if (!enum_value)
-		    enum_value = g_enum_get_value_by_nick (class, args->d.string_data);
-		  if (enum_value)
-		    {
-		      g_value_init (&tmp_value, *types);
-		      g_value_set_enum (&tmp_value, enum_value->value);
-		      valid = TRUE;
-		    }
-		}
-
-	      g_type_class_unref (class);
-	    }
-	  /* This is just a hack for compatibility with GTK+-1.2 where a string
-	   * could be used for a single flag value / without the support for multiple
-	   * values in gtk_rc_parse_flags(), this isn't very useful.
-	   */
-	  else if (G_TYPE_FUNDAMENTAL (*types) == G_TYPE_FLAGS)
-	    {
-	      GFlagsClass *class = G_FLAGS_CLASS (g_type_class_ref (*types));
-	      
-	      valid = FALSE;
-	      
-	      if (args->arg_type == GTK_TYPE_IDENTIFIER)
-		{
-		  GFlagsValue *flags_value = NULL;
-		  flags_value = g_flags_get_value_by_name (class, args->d.string_data);
-		  if (!flags_value)
-		    flags_value = g_flags_get_value_by_nick (class, args->d.string_data);
-		  if (flags_value)
-		    {
-		      g_value_init (&tmp_value, *types);
-		      g_value_set_flags (&tmp_value, flags_value->value);
-		      valid = TRUE;
-		    }
-		}
-
-	      g_type_class_unref (class);
-	    }
-	  else
-	    {
-	      g_value_init (&tmp_value, G_TYPE_STRING);
-	      g_value_set_static_string (&tmp_value, args->d.string_data);
-	    }
-	  break;
-	default:
-	  valid = FALSE;
-	  break;
-	}
+        {
+        case G_TYPE_DOUBLE:
+          g_value_init (&tmp_value, G_TYPE_DOUBLE);
+          g_value_set_double (&tmp_value, args->d.double_data);
+          break;
+        case G_TYPE_LONG:
+          g_value_init (&tmp_value, G_TYPE_LONG);
+          g_value_set_long (&tmp_value, args->d.long_data);
+          break;
+        case G_TYPE_STRING:
+          /* gtk_rc_parse_flags/enum() has fancier parsing for this; we can't call
+           * that since we don't have a GParamSpec, so just do something simple
+           */
+          if (G_TYPE_FUNDAMENTAL (*types) == G_TYPE_ENUM)
+            {
+              GEnumClass *class = G_ENUM_CLASS (g_type_class_ref (*types));
+
+              valid = FALSE;
+
+              if (args->arg_type == GTK_TYPE_IDENTIFIER)
+                {
+                  GEnumValue *enum_value = NULL;
+                  enum_value = g_enum_get_value_by_name (class, args->d.string_data);
+                  if (!enum_value)
+                    enum_value = g_enum_get_value_by_nick (class, args->d.string_data);
+                  if (enum_value)
+                    {
+                      g_value_init (&tmp_value, *types);
+                      g_value_set_enum (&tmp_value, enum_value->value);
+                      valid = TRUE;
+                    }
+                }
+
+              g_type_class_unref (class);
+            }
+          /* This is just a hack for compatibility with GTK+-1.2 where a string
+           * could be used for a single flag value / without the support for multiple
+           * values in gtk_rc_parse_flags(), this isn't very useful.
+           */
+          else if (G_TYPE_FUNDAMENTAL (*types) == G_TYPE_FLAGS)
+            {
+              GFlagsClass *class = G_FLAGS_CLASS (g_type_class_ref (*types));
+
+              valid = FALSE;
+
+              if (args->arg_type == GTK_TYPE_IDENTIFIER)
+                {
+                  GFlagsValue *flags_value = NULL;
+                  flags_value = g_flags_get_value_by_name (class, args->d.string_data);
+                  if (!flags_value)
+                    flags_value = g_flags_get_value_by_nick (class, args->d.string_data);
+                  if (flags_value)
+                    {
+                      g_value_init (&tmp_value, *types);
+                      g_value_set_flags (&tmp_value, flags_value->value);
+                      valid = TRUE;
+                    }
+                }
+
+              g_type_class_unref (class);
+            }
+          else
+            {
+              g_value_init (&tmp_value, G_TYPE_STRING);
+              g_value_set_static_string (&tmp_value, args->d.string_data);
+            }
+          break;
+        default:
+          valid = FALSE;
+          break;
+        }
 
       if (valid)
-	{
-	  if (!g_value_transform (&tmp_value, params))
-	    valid = FALSE;
+        {
+          if (!g_value_transform (&tmp_value, params))
+            valid = FALSE;
 
-	  g_value_unset (&tmp_value);
-	}
+          g_value_unset (&tmp_value);
+        }
       
       types++;
       params++;
@@ -456,7 +473,7 @@ binding_compose_params (GObject         *object,
       guint j;
 
       for (j = 0; j < i; j++)
-	g_value_unset (&(*params_p)[j]);
+        g_value_unset (&(*params_p)[j]);
       
       g_free (*params_p);
       *params_p = NULL;
@@ -467,7 +484,7 @@ binding_compose_params (GObject         *object,
 
 static gboolean
 gtk_binding_entry_activate (GtkBindingEntry *entry,
-			    GObject	    *object)
+                            GObject         *object)
 {
   GtkBindingSignal *sig;
   gboolean old_emission;
@@ -489,65 +506,65 @@ gtk_binding_entry_activate (GtkBindingEntry *entry,
       
       signal_id = g_signal_lookup (sig->signal_name, G_OBJECT_TYPE (object));
       if (!signal_id)
-	{
-	  accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
-	  g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
-		     "could not find signal \"%s\" in the `%s' class ancestry",
-		     entry->binding_set->set_name,
-		     accelerator,
-		     sig->signal_name,
-		     g_type_name (G_OBJECT_TYPE (object)));
-	  g_free (accelerator);
-	  continue;
-	}
-      
+        {
+          accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
+          g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
+                     "could not find signal \"%s\" in the `%s' class ancestry",
+                     entry->binding_set->set_name,
+                     accelerator,
+                     sig->signal_name,
+                     g_type_name (G_OBJECT_TYPE (object)));
+          g_free (accelerator);
+          continue;
+        }
+
       g_signal_query (signal_id, &query);
       if (query.n_params != sig->n_args ||
-	  (query.return_type != G_TYPE_NONE && query.return_type != G_TYPE_BOOLEAN) || 
-	  !binding_compose_params (object, sig->args, &query, &params))
-	{
-	  accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
-	  g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
-		     "signature mismatch for signal \"%s\" in the `%s' class ancestry",
-		     entry->binding_set->set_name,
-		     accelerator,
-		     sig->signal_name,
-		     g_type_name (G_OBJECT_TYPE (object)));
-	}
+          (query.return_type != G_TYPE_NONE && query.return_type != G_TYPE_BOOLEAN) ||
+          !binding_compose_params (object, sig->args, &query, &params))
+        {
+          accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
+          g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
+                     "signature mismatch for signal \"%s\" in the `%s' class ancestry",
+                     entry->binding_set->set_name,
+                     accelerator,
+                     sig->signal_name,
+                     g_type_name (G_OBJECT_TYPE (object)));
+        }
       else if (!(query.signal_flags & G_SIGNAL_ACTION))
-	{
-	  accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
-	  g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
-		     "signal \"%s\" in the `%s' class ancestry cannot be used for action emissions",
-		     entry->binding_set->set_name,
-		     accelerator,
-		     sig->signal_name,
-		     g_type_name (G_OBJECT_TYPE (object)));
-	}
+        {
+          accelerator = gtk_accelerator_name (entry->keyval, entry->modifiers);
+          g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
+                     "signal \"%s\" in the `%s' class ancestry cannot be used for action emissions",
+                     entry->binding_set->set_name,
+                     accelerator,
+                     sig->signal_name,
+                     g_type_name (G_OBJECT_TYPE (object)));
+        }
       g_free (accelerator);
       if (accelerator)
-	continue;
+        continue;
 
       if (query.return_type == G_TYPE_BOOLEAN)
-	g_value_init (&return_val, G_TYPE_BOOLEAN);
+        g_value_init (&return_val, G_TYPE_BOOLEAN);
       
       g_signal_emitv (params, signal_id, 0, &return_val);
 
       if (query.return_type == G_TYPE_BOOLEAN)
-	{
-	  if (g_value_get_boolean (&return_val))
-	    handled = TRUE;
-	  g_value_unset (&return_val);
-	}
+        {
+          if (g_value_get_boolean (&return_val))
+            handled = TRUE;
+          g_value_unset (&return_val);
+        }
       else
-	handled = TRUE;
+        handled = TRUE;
       
       for (i = 0; i < query.n_params + 1; i++)
-	g_value_unset (&params[i]);
+        g_value_unset (&params[i]);
       g_free (params);
       
       if (entry->destroyed)
-	break;
+        break;
     }
   
   g_object_unref (object);
@@ -617,9 +634,9 @@ gtk_binding_set_by_class (gpointer object_class)
 
   binding_set = gtk_binding_set_new (g_type_name (G_OBJECT_CLASS_TYPE (class)));
   gtk_binding_set_add_path (binding_set,
-			    GTK_PATH_CLASS,
-			    g_type_name (G_OBJECT_CLASS_TYPE (class)),
-			    GTK_PATH_PRIO_GTK);
+                            GTK_PATH_CLASS,
+                            g_type_name (G_OBJECT_CLASS_TYPE (class)),
+                            GTK_PATH_PRIO_GTK);
   g_dataset_id_set_data (class, key_id_class_binding_set, binding_set);
 
   return binding_set;
@@ -648,7 +665,7 @@ gtk_binding_set_find (const gchar *set_name)
       
       binding_set = slist->data;
       if (g_str_equal (binding_set->set_name, (gpointer) set_name))
-	return binding_set;
+        return binding_set;
     }
   return NULL;
 }
@@ -666,10 +683,10 @@ gtk_binding_set_find (const gchar *set_name)
  * Return value: %TRUE if a binding was found and activated
  */
 gboolean
-gtk_binding_set_activate (GtkBindingSet	 *binding_set,
-			  guint		  keyval,
-			  GdkModifierType modifiers,
-			  GObject	 *object)
+gtk_binding_set_activate (GtkBindingSet  *binding_set,
+                          guint           keyval,
+                          GdkModifierType modifiers,
+                          GObject        *object)
 {
   GtkBindingEntry *entry;
   
@@ -745,9 +762,9 @@ gtk_binding_entry_skip (GtkBindingSet  *binding_set,
  * gtk_binding_entry_add_signal() on @binding_set.
  */
 void
-gtk_binding_entry_remove (GtkBindingSet	 *binding_set,
-			  guint		  keyval,
-			  GdkModifierType modifiers)
+gtk_binding_entry_remove (GtkBindingSet  *binding_set,
+                          guint           keyval,
+                          GdkModifierType modifiers)
 {
   GtkBindingEntry *entry;
   
@@ -775,10 +792,10 @@ gtk_binding_entry_remove (GtkBindingSet	 *binding_set,
  */
 void
 gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
-                               guint	       keyval,
+                               guint           keyval,
                                GdkModifierType modifiers,
                                const gchar    *signal_name,
-                               GSList	      *binding_args)
+                               GSList         *binding_args)
 {
   _gtk_binding_entry_add_signall (binding_set,
                                   keyval, modifiers,
@@ -787,10 +804,10 @@ gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
 
 void
 _gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
-                                guint	       keyval,
+                                guint          keyval,
                                 GdkModifierType modifiers,
                                 const gchar    *signal_name,
-                                GSList	      *binding_args)
+                                GSList        *binding_args)
 {
   GtkBindingEntry *entry;
   GtkBindingSignal *signal, **signal_p;
@@ -813,40 +830,40 @@ _gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
       
       tmp_arg = slist->data;
       if (!tmp_arg)
-	{
-	  g_warning ("gtk_binding_entry_add_signall(): arg[%u] is `NULL'", n);
-	  binding_signal_free (signal);
-	  return;
-	}
+        {
+          g_warning ("gtk_binding_entry_add_signall(): arg[%u] is `NULL'", n);
+          binding_signal_free (signal);
+          return;
+        }
       switch (G_TYPE_FUNDAMENTAL (tmp_arg->arg_type))
-	{
-	case  G_TYPE_LONG:
-	  arg->arg_type = G_TYPE_LONG;
-	  arg->d.long_data = tmp_arg->d.long_data;
-	  break;
-	case  G_TYPE_DOUBLE:
-	  arg->arg_type = G_TYPE_DOUBLE;
-	  arg->d.double_data = tmp_arg->d.double_data;
-	  break;
-	case  G_TYPE_STRING:
+        {
+        case  G_TYPE_LONG:
+          arg->arg_type = G_TYPE_LONG;
+          arg->d.long_data = tmp_arg->d.long_data;
+          break;
+        case  G_TYPE_DOUBLE:
+          arg->arg_type = G_TYPE_DOUBLE;
+          arg->d.double_data = tmp_arg->d.double_data;
+          break;
+        case  G_TYPE_STRING:
           if (tmp_arg->arg_type != GTK_TYPE_IDENTIFIER)
-	    arg->arg_type = G_TYPE_STRING;
-	  else
-	    arg->arg_type = GTK_TYPE_IDENTIFIER;
-	  arg->d.string_data = g_strdup (tmp_arg->d.string_data);
-	  if (!arg->d.string_data)
-	    {
-	      g_warning ("gtk_binding_entry_add_signall(): value of `string' arg[%u] is `NULL'", n);
-	      binding_signal_free (signal);
-	      return;
-	    }
-	  break;
-	default:
-	  g_warning ("gtk_binding_entry_add_signall(): unsupported type `%s' for arg[%u]",
-		     g_type_name (arg->arg_type), n);
-	  binding_signal_free (signal);
-	  return;
-	}
+            arg->arg_type = G_TYPE_STRING;
+          else
+            arg->arg_type = GTK_TYPE_IDENTIFIER;
+          arg->d.string_data = g_strdup (tmp_arg->d.string_data);
+          if (!arg->d.string_data)
+            {
+              g_warning ("gtk_binding_entry_add_signall(): value of `string' arg[%u] is `NULL'", n);
+              binding_signal_free (signal);
+              return;
+            }
+          break;
+        default:
+          g_warning ("gtk_binding_entry_add_signall(): unsupported type `%s' for arg[%u]",
+                     g_type_name (arg->arg_type), n);
+          binding_signal_free (signal);
+          return;
+        }
       arg++;
       n++;
     }
@@ -879,11 +896,11 @@ _gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
  */
 void
 gtk_binding_entry_add_signal (GtkBindingSet  *binding_set,
-			      guint           keyval,
-			      GdkModifierType modifiers,
-			      const gchar    *signal_name,
-			      guint           n_args,
-			      ...)
+                              guint           keyval,
+                              GdkModifierType modifiers,
+                              const gchar    *signal_name,
+                              guint           n_args,
+                              ...)
 {
   GSList *slist, *free_slist;
   va_list args;
@@ -903,45 +920,45 @@ gtk_binding_entry_add_signal (GtkBindingSet  *binding_set,
 
       arg->arg_type = va_arg (args, GType);
       switch (G_TYPE_FUNDAMENTAL (arg->arg_type))
-	{
-	case G_TYPE_CHAR:
-	case G_TYPE_UCHAR:
-	case G_TYPE_INT:
-	case G_TYPE_UINT:
-	case G_TYPE_BOOLEAN:
-	case G_TYPE_ENUM:
-	case G_TYPE_FLAGS:
-	  arg->arg_type = G_TYPE_LONG;
-	  arg->d.long_data = va_arg (args, gint);
-	  break;
-	case G_TYPE_LONG:
-	case G_TYPE_ULONG:
-	  arg->arg_type = G_TYPE_LONG;
-	  arg->d.long_data = va_arg (args, glong);
-	  break;
-	case G_TYPE_FLOAT:
-	case G_TYPE_DOUBLE:
-	  arg->arg_type = G_TYPE_DOUBLE;
-	  arg->d.double_data = va_arg (args, gdouble);
-	  break;
-	case G_TYPE_STRING:
-	  if (arg->arg_type != GTK_TYPE_IDENTIFIER)
-	    arg->arg_type = G_TYPE_STRING;
-	  arg->d.string_data = va_arg (args, gchar*);
-	  if (!arg->d.string_data)
-	    {
-	      g_warning ("gtk_binding_entry_add_signal(): type `%s' arg[%u] is `NULL'",
-			 g_type_name (arg->arg_type),
-			 i);
-	      i += n_args + 1;
-	    }
-	  break;
-	default:
-	  g_warning ("gtk_binding_entry_add_signal(): unsupported type `%s' for arg[%u]",
-		     g_type_name (arg->arg_type), i);
-	  i += n_args + 1;
-	  break;
-	}
+        {
+        case G_TYPE_CHAR:
+        case G_TYPE_UCHAR:
+        case G_TYPE_INT:
+        case G_TYPE_UINT:
+        case G_TYPE_BOOLEAN:
+        case G_TYPE_ENUM:
+        case G_TYPE_FLAGS:
+          arg->arg_type = G_TYPE_LONG;
+          arg->d.long_data = va_arg (args, gint);
+          break;
+        case G_TYPE_LONG:
+        case G_TYPE_ULONG:
+          arg->arg_type = G_TYPE_LONG;
+          arg->d.long_data = va_arg (args, glong);
+          break;
+        case G_TYPE_FLOAT:
+        case G_TYPE_DOUBLE:
+          arg->arg_type = G_TYPE_DOUBLE;
+          arg->d.double_data = va_arg (args, gdouble);
+          break;
+        case G_TYPE_STRING:
+          if (arg->arg_type != GTK_TYPE_IDENTIFIER)
+            arg->arg_type = G_TYPE_STRING;
+          arg->d.string_data = va_arg (args, gchar*);
+          if (!arg->d.string_data)
+            {
+              g_warning ("gtk_binding_entry_add_signal(): type `%s' arg[%u] is `NULL'",
+                         g_type_name (arg->arg_type),
+                         i);
+              i += n_args + 1;
+            }
+          break;
+        default:
+          g_warning ("gtk_binding_entry_add_signal(): unsupported type `%s' for arg[%u]",
+                     g_type_name (arg->arg_type), i);
+          i += n_args + 1;
+          break;
+        }
     }
   va_end (args);
 
@@ -973,10 +990,10 @@ gtk_binding_entry_add_signal (GtkBindingSet  *binding_set,
  * Deprecated: 3.0
  */
 void
-gtk_binding_set_add_path (GtkBindingSet	     *binding_set,
-			  GtkPathType	      path_type,
-			  const gchar	     *path_pattern,
-			  GtkPathPriorityType priority)
+gtk_binding_set_add_path (GtkBindingSet      *binding_set,
+                          GtkPathType         path_type,
+                          const gchar        *path_pattern,
+                          GtkPathPriorityType priority)
 {
   PatternSpec *pspec;
   GSList **slist_p, *slist;
@@ -1024,18 +1041,18 @@ gtk_binding_set_add_path (GtkBindingSet	     *binding_set,
       slist = slist->next;
       
       if (g_pattern_spec_equal (tmp_pspec->pspec, pspec->pspec))
-	{
-	  GtkPathPriorityType lprio = tmp_pspec->seq_id >> 28;
-
-	  pattern_spec_free (pspec);
-	  pspec = NULL;
-	  if (lprio < priority)
-	    {
-	      tmp_pspec->seq_id &= 0x0fffffff;
-	      tmp_pspec->seq_id |= priority << 28;
-	    }
-	  break;
-	}
+        {
+          GtkPathPriorityType lprio = tmp_pspec->seq_id >> 28;
+
+          pattern_spec_free (pspec);
+          pspec = NULL;
+          if (lprio < priority)
+            {
+              tmp_pspec->seq_id &= 0x0fffffff;
+              tmp_pspec->seq_id |= priority << 28;
+            }
+          break;
+        }
     }
   if (pspec)
     {
@@ -1046,10 +1063,10 @@ gtk_binding_set_add_path (GtkBindingSet	     *binding_set,
 
 static gboolean
 binding_match_activate (GSList          *pspec_list,
-			GObject	        *object,
-			guint	         path_length,
-			gchar           *path,
-			gchar           *path_reversed,
+                        GObject         *object,
+                        guint            path_length,
+                        gchar           *path,
+                        gchar           *path_reversed,
                         gboolean        *unbound)
 {
   GSList *slist;
@@ -1067,7 +1084,7 @@ binding_match_activate (GSList          *pspec_list,
       if (pspec->type != GTK_PATH_WIDGET_CLASS)
         {
           if (g_pattern_match (pspec->pspec, path_length, path, path_reversed))
-	    binding_set = pspec->user_data;
+            binding_set = pspec->user_data;
         }
 
       if (binding_set)
@@ -1088,7 +1105,7 @@ binding_match_activate (GSList          *pspec_list,
 
 static gint
 gtk_binding_pattern_compare (gconstpointer new_pattern,
-			     gconstpointer existing_pattern)
+                             gconstpointer existing_pattern)
 {
   register const PatternSpec *np  = new_pattern;
   register const PatternSpec *ep  = existing_pattern;
@@ -1102,8 +1119,8 @@ gtk_binding_pattern_compare (gconstpointer new_pattern,
 
 static GSList*
 gtk_binding_entries_sort_patterns (GSList      *entries,
-				   GtkPathType  path_id,
-				   gboolean     is_release)
+                                   GtkPathType  path_id,
+                                   gboolean     is_release)
 {
   GSList *patterns;
   GSList *tmp_list;
@@ -1125,34 +1142,34 @@ gtk_binding_entries_sort_patterns (GSList      *entries,
       GSList *slist = NULL;
 
       if (is_release != ((entry->modifiers & GDK_RELEASE_MASK) != 0))
-	continue;
+        continue;
 
       binding_set = entry->binding_set;
 
       if (binding_set->current)
-	continue;
+        continue;
       binding_set->current = entry;
 
       switch (path_id)
-	{
-	case GTK_PATH_WIDGET:
-	  slist = binding_set->widget_path_pspecs;
-	  break;
-	case GTK_PATH_WIDGET_CLASS:
-	  slist = binding_set->widget_class_pspecs;
-	  break;
-	case GTK_PATH_CLASS:
-	  slist = binding_set->class_branch_pspecs;
-	  break;
-	}
+        {
+        case GTK_PATH_WIDGET:
+          slist = binding_set->widget_path_pspecs;
+          break;
+        case GTK_PATH_WIDGET_CLASS:
+          slist = binding_set->widget_class_pspecs;
+          break;
+        case GTK_PATH_CLASS:
+          slist = binding_set->class_branch_pspecs;
+          break;
+        }
 
       for (; slist; slist = slist->next)
-	{
-	  PatternSpec *pspec;
+        {
+          PatternSpec *pspec;
 
-	  pspec = slist->data;
-	  patterns = g_slist_insert_sorted (patterns, pspec, gtk_binding_pattern_compare);
-	}
+          pspec = slist->data;
+          patterns = g_slist_insert_sorted (patterns, pspec, gtk_binding_pattern_compare);
+        }
     }
 
   return patterns;
@@ -1160,8 +1177,8 @@ gtk_binding_entries_sort_patterns (GSList      *entries,
 
 static gboolean
 gtk_bindings_activate_list (GObject   *object,
-			    GSList    *entries,
-			    gboolean   is_release)
+                            GSList    *entries,
+                            gboolean   is_release)
 {
   gboolean handled = FALSE;
 
@@ -1179,24 +1196,24 @@ gtk_bindings_activate_list (GObject   *object,
       patterns = gtk_binding_entries_sort_patterns (entries, GTK_PATH_CLASS, is_release);
       class_type = G_TYPE_FROM_INSTANCE (object);
       while (class_type && !handled)
-	{
-	  guint path_length;
-	  gchar *path;
-	  gchar *path_reversed;
-
-	  path = g_strdup (g_type_name (class_type));
-	  path_reversed = g_strdup (path);
-	  g_strreverse (path_reversed);
-	  path_length = strlen (path);
-	  handled = binding_match_activate (patterns, object, path_length, path, path_reversed, &unbound);
-	  g_free (path);
-	  g_free (path_reversed);
+        {
+          guint path_length;
+          gchar *path;
+          gchar *path_reversed;
+
+          path = g_strdup (g_type_name (class_type));
+          path_reversed = g_strdup (path);
+          g_strreverse (path_reversed);
+          path_length = strlen (path);
+          handled = binding_match_activate (patterns, object, path_length, path, path_reversed, &unbound);
+          g_free (path);
+          g_free (path_reversed);
 
           if (unbound)
             break;
 
-	  class_type = g_type_parent (class_type);
-	}
+          class_type = g_type_parent (class_type);
+        }
       g_slist_free (patterns);
 
       if (unbound)
@@ -1219,8 +1236,8 @@ gtk_bindings_activate_list (GObject   *object,
  */
 gboolean
 gtk_bindings_activate (GObject         *object,
-		       guint	        keyval,
-		       GdkModifierType  modifiers)
+                       guint            keyval,
+                       GdkModifierType  modifiers)
 {
   GSList *entries = NULL;
   GdkDisplay *display;
@@ -1274,13 +1291,13 @@ gtk_bindings_activate_event (GObject     *object,
   key_hash = binding_key_hash_for_keymap (gdk_keymap_get_for_display (display));
 
   entries = _gtk_key_hash_lookup (key_hash,
-				  event->hardware_keycode,
-				  event->state,
-				  BINDING_MOD_MASK () & ~GDK_RELEASE_MASK,
-				  event->group);
+                                  event->hardware_keycode,
+                                  event->state,
+                                  BINDING_MOD_MASK () & ~GDK_RELEASE_MASK,
+                                  event->group);
   
   handled = gtk_bindings_activate_list (object, entries,
-					event->type == GDK_KEY_RELEASE);
+                                        event->type == GDK_KEY_RELEASE);
 
   g_slist_free (entries);
 
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 40b93c1..374d7df 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -55,6 +55,7 @@
 #include "gtkiconfactory.h"
 #include "gtkactivatable.h"
 #include "gtksizerequest.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index e1ad0f8..cbd4b35 100644
--- a/gtk/gtkcellrendereraccel.c
+++ b/gtk/gtkcellrendereraccel.c
@@ -28,6 +28,7 @@
 #include "gtkeventbox.h"
 #include "gtkmain.h"
 #include "gtksizerequest.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 
 
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 4fdcfe5..c1ca3bc 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -40,6 +40,7 @@
 #include "gtktreeselection.h"
 #include "gtkvseparator.h"
 #include "gtkwindow.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 
 #include <gobject/gvaluecollector.h>
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 0ae0827..d513520 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -32,8 +32,12 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include <gobject/gobjectnotifyqueue.c>
+#include <gobject/gvaluecollector.h>
+
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkmain.h"
 #include "gtkmarshalers.h"
@@ -42,8 +46,6 @@
 #include "gtkwindow.h"
 #include "gtkintl.h"
 #include "gtktoolbar.h"
-#include <gobject/gobjectnotifyqueue.c>
-#include <gobject/gvaluecollector.h>
 
 
 /**
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 67c28d8..0920037 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -58,6 +58,7 @@
 #include "gtkwindow.h"
 #include "gtktreeview.h"
 #include "gtktreeselection.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkentryprivate.h"
 #include "gtkcelllayout.h"
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index c68bb5b..670ca89 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -52,6 +52,7 @@
 
 #include "gtkfilechooserbutton.h"
 
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 
 /* **************** *
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 5a8843f..04950f6 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -29,6 +29,7 @@
 #include "gtkframe.h"
 #include "gtklabel.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 #include "gtkintl.h"
 #include "gtkbuildable.h"
 
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index c96f665..a57d81b 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -26,12 +26,15 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
+
 #include "gtkhandlebox.h"
 #include "gtkinvisible.h"
 #include "gtkmain.h"
 #include "gtkmarshalers.h"
 #include "gtkwindow.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 2c2f95e..4674449 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -25,9 +25,11 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
+
 #include "gtkiconfactory.h"
 #include "gtkiconcache.h"
 #include "gtkdebug.h"
@@ -38,7 +40,7 @@
 #include "gtkintl.h"
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
-
+#include "gtktypebuiltins.h"
 
 static GSList *all_icon_factories = NULL;
 
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 69d0564..73b8b25 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -41,6 +41,7 @@
 #include "gtkscrollable.h"
 #include "gtksizerequest.h"
 #include "gtktreednd.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 
 /**
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 340b71c..2d8e130 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -25,6 +25,7 @@
  */
 
 #include "config.h"
+
 #include <math.h>
 #include <string.h>
 
@@ -36,6 +37,7 @@
 #include "gtksizerequest.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 
 /**
  * SECTION:gtkimage
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 9905e98..e82095e 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -46,6 +46,7 @@
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkstock.h"
+#include "gtktypebuiltins.h"
 
 /**
  * SECTION:gtkinfobar
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 1d66463..1ae4596 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -50,6 +50,7 @@
 #include "gtkshow.h"
 #include "gtktooltip.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 
 /*rint() is only available in GCC and/or C99*/
 #if (__STDC_VERSION__ < 199901L && !defined __GNUC__)
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 82a7392..6fe41c4 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -33,7 +33,6 @@
 
 
 #include <gdk/gdk.h>
-#include <gtk/gtktypeutils.h>
 #include <gtk/gtkwidget.h>
 #ifdef G_PLATFORM_WIN32
 #include <gtk/gtkbox.h>
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 200b7fd..adb6646 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -46,6 +46,7 @@
 #include "gtksettings.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 #define NAVIGATION_REGION_OVERSHOOT 50  /* How much the navigation region
                                          * extends below the submenu
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index 66669fa..42f2f25 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -37,9 +37,9 @@
 #include "gtksettings.h"
 #include "gtksizerequest.h"
 #include "gtkwindow.h"
-
 #include "gtkintl.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 
 #define BORDER_SPACING  0
 #define DEFAULT_IPADDING 1
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index ec60a85..6cfc53e 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -25,6 +25,7 @@
  */
 
 #include "config.h"
+
 #include <string.h>
 
 #include "gtkaccellabel.h"
@@ -40,6 +41,7 @@
 #include "gtkbuildable.h"
 #include "gtkactivatable.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 
 enum {
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 1dfecc2..92b58e7 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -40,6 +40,7 @@
 #include "gtkwindow.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 #define MENU_SHELL_TIMEOUT   500
 
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 38d39a1..dfa3131 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -26,6 +26,7 @@
  */
 
 #include "config.h"
+
 #include <string.h>
 
 #include "gtkmessagedialog.h"
@@ -39,6 +40,7 @@
 #include "gtkiconfactory.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 
 /**
  * SECTION:gtkmessagedialog
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 6034851..0d9d9fa 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -42,6 +42,7 @@
 #include "gtkprivate.h"
 #include "gtkdnd.h"
 #include "gtkbuildable.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index e3cfc98..1a7e51e 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -33,7 +33,7 @@
 #include "gtkmarshalers.h"
 #include "gtkorientable.h"
 #include "gtkwindow.h"
-
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index a810174..139041a 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -21,16 +21,18 @@
 #include "config.h"
 
 #include <errno.h>
-#include <stdlib.h>       
+#include <stdlib.h>
 #include <math.h>
-
 #include <string.h>
+
+#include <cairo-pdf.h>
+
 #include "gtkprintoperation-private.h"
 #include "gtkmarshalers.h"
-#include <cairo-pdf.h>
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkmessagedialog.h"
+#include "gtktypebuiltins.h"
 
 #define SHOW_PROGRESS_TIME 1200
 
diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c
index 2235864..7507bd7 100644
--- a/gtk/gtkprintsettings.c
+++ b/gtk/gtkprintsettings.c
@@ -19,12 +19,16 @@
  */
 
 #include "config.h"
+
 #include <string.h>
 #include <stdlib.h>
+
 #include <glib/gprintf.h>
-#include <gtk/gtk.h>
+
 #include "gtkprintsettings.h"
 #include "gtkprintutils.h"
+#include "gtktypebuiltins.h"
+#include "gtkwidget.h"
 
 
 typedef struct _GtkPrintSettingsClass GtkPrintSettingsClass;
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 7cb734c..2d61cda 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -20,14 +20,20 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <math.h>
 
-#include "gtkintl.h"
-#include "gtkprivate.h"
+#include "gtkprintunixdialog.h"
+
+#include "gtkcustompaperunixdialog.h"
+#include "gtkprintbackend.h"
+#include "gtkprinter-private.h"
+#include "gtkprinteroptionwidget.h"
+#include "gtkprintutils.h"
 
 #include "gtkspinbutton.h"
 #include "gtkcellrendererpixbuf.h"
@@ -49,16 +55,11 @@
 #include "gtklabel.h"
 #include "gtkeventbox.h"
 #include "gtkbuildable.h"
-
-#include "gtkcustompaperunixdialog.h"
-#include "gtkprintbackend.h"
-#include "gtkprinter-private.h"
-#include "gtkprintunixdialog.h"
-#include "gtkprinteroptionwidget.h"
-#include "gtkprintutils.h"
-
 #include "gtkmessagedialog.h"
 #include "gtkbutton.h"
+#include "gtkintl.h"
+#include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 
 #define EXAMPLE_PAGE_AREA_SIZE 110
 #define RULER_DISTANCE 7.5
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 7a7bebf..3d3e856 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -39,6 +39,7 @@
 #include "gtkwindow.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 /**
  * SECTION:gtkrange
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 689425f..78d01ac 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -53,7 +53,7 @@
 #include "gtkstock.h"
 #include "gtkvbox.h"
 #include "gtkwindow.h"
-
+#include "gtktypebuiltins.h"
 #include "gtkintl.h"
 
 /**
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 81726cd..828dd8a 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -34,6 +34,7 @@
 #include "gtkscrolledwindow.h"
 #include "gtkwindow.h"
 #include "gtkprivate.h"
+#include "gtktypebuiltins.h"
 #include "gtkintl.h"
 
 
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index c3f87d5..5148f0e 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -43,6 +43,7 @@
 #include "gtksettings.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 #define MIN_SPIN_BUTTON_WIDTH 30
 #define MAX_TIMER_CALLS       5
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index e38b448..334c9a4 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -26,6 +26,7 @@
  */
 
 #include "config.h"
+
 #include "gtkframe.h"
 #include "gtklabel.h"
 #include "gtkmarshalers.h"
@@ -34,6 +35,7 @@
 #include "gtkprivate.h"
 #include "gtkintl.h"
 #include "gtkbuildable.h"
+#include "gtktypebuiltins.h"
 
 /**
  * SECTION:gtkstatusbar
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 27f85d9..6e0751e 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -42,27 +42,19 @@
 #include "gtkprivate.h"
 #include "gtkwidget.h"
 #include "gtktooltip.h"
+#include "gtkicontheme.h"
+#include "gtklabel.h"
+#include "gtktypebuiltins.h"
 
 #ifdef GDK_WINDOWING_X11
 #include "gdk/x11/gdkx.h"
 #endif
-#ifdef GDK_WINDOWING_WIN32
-#include "gdk/win32/gdkwin32.h"
-#endif
 
 #ifdef GDK_WINDOWING_WIN32
-#include "gtkicontheme.h"
-#include "gtklabel.h"
-
-#include "win32/gdkwin32.h"
+#include "gdk/win32/gdkwin32.h"
 #define WM_GTK_TRAY_NOTIFICATION (WM_USER+1)
 #endif
 
-#ifdef GDK_WINDOWING_QUARTZ
-#include "gtkicontheme.h"
-#include "gtklabel.h"
-#endif
-
 #define BLINK_TIMEOUT 500
 
 enum
diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h
index 57e4b8f..b32d4b1 100644
--- a/gtk/gtkstock.h
+++ b/gtk/gtkstock.h
@@ -33,10 +33,23 @@
 
 
 #include <gdk/gdk.h>
-#include <gtk/gtktypeutils.h> /* for GtkTranslateFunc */
 
 G_BEGIN_DECLS
 
+/*
+ * GtkTranslateFunc:
+ * @path: The id of the message. In #GtkActionGroup this will be a label
+ *   or tooltip from a #GtkActionEntry.
+ * @func_data: user data passed in when registering the function
+ *
+ * The function used to translate messages in e.g. #GtkIconFactory
+ * and #GtkActionGroup.
+ *
+ * Returns: the translated message
+ */
+typedef gchar * (*GtkTranslateFunc) (const gchar  *path,
+                                     gpointer      func_data);
+
 typedef struct _GtkStockItem GtkStockItem;
 
 struct _GtkStockItem
diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c
index cb62ebf..b54cad7 100644
--- a/gtk/gtktexttag.c
+++ b/gtk/gtktexttag.c
@@ -48,6 +48,10 @@
  */
 
 #include "config.h"
+
+#include <stdlib.h>
+#include <string.h>
+
 #include "gtkmain.h"
 #include "gtktexttag.h"
 #include "gtktexttypes.h"
@@ -55,9 +59,7 @@
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
 #include "gtkprivate.h"
-
-#include <stdlib.h>
-#include <string.h>
+#include "gtktypebuiltins.h"
 
 enum {
   EVENT,
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 1b07b59..b57db0f 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -50,6 +50,7 @@
 #include "gtkwidgetprivate.h"
 #include "gtkwindow.h"
 #include "gtkscrollable.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index c2161a7..23ebab6 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -55,6 +55,7 @@
 #include "gtkvbox.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index abcc640..20cc10b 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -22,11 +22,11 @@
 
 #include "config.h"
 
-#include "gtktoolpaletteprivate.h"
-
-#include <gtk/gtk.h>
 #include <math.h>
 #include <string.h>
+
+#include "gtktoolpaletteprivate.h"
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index 5429039..195a43a 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -26,7 +26,7 @@
 
 #include "gtktoolpaletteprivate.h"
 #include "gtkmarshalers.h"
-
+#include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkscrollable.h"
 #include "gtkintl.h"
diff --git a/gtk/gtktrayicon-x11.c b/gtk/gtktrayicon-x11.c
index 2bdd421..a8f6a11 100644
--- a/gtk/gtktrayicon-x11.c
+++ b/gtk/gtktrayicon-x11.c
@@ -23,18 +23,20 @@
  */
 
 #include "config.h"
+
 #include <math.h>
 #include <string.h>
 
+#include "x11/gdkx.h"
+#include <X11/Xatom.h>
+#include <cairo-xlib.h>
+
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtktrayicon.h"
 #include "gtktestutils.h"
 #include "gtkdebug.h"
-
-#include "x11/gdkx.h"
-#include <X11/Xatom.h>
-#include <cairo-xlib.h>
+#include "gtktypebuiltins.h"
 
 #define SYSTEM_TRAY_REQUEST_DOCK    0
 #define SYSTEM_TRAY_BEGIN_MESSAGE   1
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index d861306..0032ae5 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -49,6 +49,7 @@
 #include "gtkprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtkentryprivate.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 43f5921..00a2ea7 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -36,6 +36,7 @@
 #include "gtkcellareabox.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 4836a35..66811ff 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -63,6 +63,7 @@
 #include "gtkmodifierstyle.h"
 #include "gtkversion.h"
 #include "gtkdebug.h"
+#include "gtktypebuiltins.h"
 
 
 /**
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f514206..19501f2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -26,7 +26,7 @@
 
 #include "config.h"
 
-#include "gtkintl.h"
+#include "gtkwindow.h"
 
 #include <string.h>
 #include <stdlib.h>
@@ -35,7 +35,6 @@
 
 #include "gtkprivate.h"
 #include "gtkrc.h"
-#include "gtkwindow.h"
 #include "gtkwindowprivate.h"
 #include "gtkaccelgroupprivate.h"
 #include "gtkbindings.h"
@@ -49,6 +48,8 @@
 #include "gtkplug.h"
 #include "gtkbuildable.h"
 #include "gtkwidgetprivate.h"
+#include "gtkintl.h"
+#include "gtktypebuiltins.h"
 
 #ifdef GDK_WINDOWING_X11
 #include "x11/gdkx.h"
diff --git a/po-properties/POTFILES.in b/po-properties/POTFILES.in
index da8ed2b..5af4548 100644
--- a/po-properties/POTFILES.in
+++ b/po-properties/POTFILES.in
@@ -197,7 +197,6 @@ gtk/gtktreesortable.c
 gtk/gtktreestore.c
 gtk/gtktreeview.c
 gtk/gtktreeviewcolumn.c
-gtk/gtktypeutils.c
 gtk/gtkuimanager.c
 gtk/gtkvbbox.c
 gtk/gtkvbox.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3bb4266..55dee16 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -198,7 +198,6 @@ gtk/gtktreesortable.c
 gtk/gtktreestore.c
 gtk/gtktreeview.c
 gtk/gtktreeviewcolumn.c
-gtk/gtktypeutils.c
 gtk/gtkuimanager.c
 gtk/gtkvbbox.c
 gtk/gtkvbox.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]