Index: gtk/gdk.override
===================================================================
--- gtk/gdk.override	(revision 3036)
+++ gtk/gdk.override	(working copy)
@@ -92,7 +92,8 @@
 import pango.Font as PyPangoFont_Type
 import pango.Layout as PyPangoLayout_Type
 import pango.Renderer as PyPangoRenderer_Type
-import gio.AppLaunchContext as PyGAppLaunchContext_Type
+import gio.AppLaunchContext as PyGAppLaunchContext_Type for GAppLaunchContext
+import gio.Icon as PyGIcon_Type for GIcon
 %%
 ignore
   gdk_window_set_debug_updates
Index: gtk/gtk.override
===================================================================
--- gtk/gtk.override	(revision 3036)
+++ gtk/gtk.override	(working copy)
@@ -125,7 +125,9 @@
 import pango.Context as PyPangoContext_Type
 import pango.Font as PyPangoFont_Type
 import pango.Layout as PyPangoLayout_Type
-import gio.MountOperation as PyGMountOperation_Type
+import gio.File as PyGFile_Type for GFile
+import gio.Icon as PyGIcon_Type for GIcon
+import gio.MountOperation as PyGMountOperation_Type for GMountOperation
 %%
 ignore
   gtk_accel_group_add
Index: gtk/Makefile.am
===================================================================
--- gtk/Makefile.am	(revision 3036)
+++ gtk/Makefile.am	(working copy)
@@ -187,11 +187,17 @@
 endif
 
 
+extra_codegen_args =
+
+if HAVE_GIO_TYPES_DEFS
+extra_codegen_args += --register $(PYGOBJECT_DEFSDIR)/gio-types.defs
+endif
+
 .defs.c: 
 	($(PYTHON) $(CODEGENDIR)/codegen.py \
 	   $(PYGTK_CODEGEN_DEFINES) \
 	    -I $(srcdir) \
-	    --py_ssize_t-clean \
+	    --py_ssize_t-clean $(extra_codegen_args) \
 	    --register $(top_srcdir)/pango-types.defs \
 	    --register $(top_srcdir)/atk-types.defs \
 	    --register gdk-types.defs \
Index: configure.ac
===================================================================
--- configure.ac	(revision 3036)
+++ configure.ac	(working copy)
@@ -143,6 +143,22 @@
 PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
 AC_SUBST(PYGOBJECT_DATADIR)
 
+
+dnl PyGObject defs
+AC_SUBST(PYGOBJECT_DEFSDIR)
+PYGOBJECT_DEFSDIR=`$PKG_CONFIG --variable defsdir pygobject-2.0`
+
+AC_MSG_CHECKING([for gio-types.defs])
+CODEGENDIR=`$PKG_CONFIG --variable codegendir pygobject-2.0`
+
+if test -e $PYGOBJECT_DEFSDIR/gio-types.defs; then
+  AM_CONDITIONAL(HAVE_GIO_TYPES_DEFS, true)
+else
+  AM_CONDITIONAL(HAVE_GIO_TYPES_DEFS, false)
+fi
+
+
+dnl Documentation
 PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
 AC_SUBST(PYGOBJECT_FIXXREF)
 
