Index: tests/test_gicon.py
===================================================================
--- tests/test_gicon.py	(revision 931)
+++ tests/test_gicon.py	(working copy)
@@ -8,21 +8,21 @@
 
 class TestIcon(unittest.TestCase):
     def test_eq(self):
-        self.assertEquals(gio.File('foo.png').icon_new(),
-                          gio.File('foo.png').icon_new())
+        self.assertEquals(gio.FileIcon(gio.File('foo.png')),
+                          gio.FileIcon(gio.File('foo.png')))
         self.assertEquals(gio.ThemedIcon('foo'),
                           gio.ThemedIcon('foo'))
 
-        self.assertNotEqual(gio.File('foo.png').icon_new(),
-                            gio.File('bar.png').icon_new())
+        self.assertNotEqual(gio.FileIcon(gio.File('foo.png')),
+                            gio.FileIcon(gio.File('bar.png')))
         self.assertNotEquals(gio.ThemedIcon('foo'),
                              gio.ThemedIcon('bar'))
-        self.assertNotEquals(gio.File('foo.png').icon_new(),
+        self.assertNotEquals(gio.FileIcon(gio.File('foo.png')),
                              gio.ThemedIcon('foo'))
 
     def test_hash(self):
-        self.assertEquals(hash(gio.File('foo.png').icon_new()),
-                          hash(gio.File('foo.png').icon_new()))
+        self.assertEquals(hash(gio.FileIcon(gio.File('foo.png'))),
+                          hash(gio.FileIcon(gio.File('foo.png'))))
         self.assertEquals(hash(gio.ThemedIcon('foo')),
                           hash(gio.ThemedIcon('foo')))
 
@@ -35,7 +35,7 @@
                     '<svg width="32" height="32"/>')
         self.file.write(self.svg)
         self.file.close()
-        self.icon = gio.File('temp.svg').icon_new()
+        self.icon = gio.FileIcon(gio.File('temp.svg'))
 
     def tearDown(self):
         if os.path.exists('temp.svg'):
@@ -64,6 +64,11 @@
         loop = glib.MainLoop()
         loop.run()
 
+class TestFileIcon(unittest.TestCase):
+    def test_constructor(self):
+        file = gio.File('foo.png')
+        self.assert_(file is gio.FileIcon(file).get_file())
+
 class TestThemedIcon(unittest.TestCase):
     def setUp(self):
         self.icon = gio.ThemedIcon("open")
Index: gio/gio.defs
===================================================================
--- gio/gio.defs	(revision 931)
+++ gio/gio.defs	(working copy)
@@ -2314,10 +2314,16 @@
   (return-type "GType")
 )
 
-(define-method icon_new
-  (of-object "GFile")
+(define-function file_icon_new
   (c-name "g_file_icon_new")
+  (is-constructor-of "GFileIcon")
   (return-type "GIcon*")
+  ;; Note: starting with GLib 2.18 we could use (properties ...)
+  ;; instead, but I don't know if it is possible to branch on version
+  ;; in codegen.
+  (parameters
+    '("GFile*" "file")
+  )
 )
 
 (define-method get_file
