From 38848aaa4ffecf6cccf576df496d41f4ce984579 Mon Sep 17 00:00:00 2001 From: Paul Pogonyshev Date: Sat, 9 Aug 2008 15:09:42 +0000 Subject: Bug 546135 – GIcon and implementations improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-08-09 Paul Pogonyshev Bug 546135 – GIcon and implementations improvements * gio/gio.defs (g_file_icon_new): Change from method of gio.File to constructor of gio.FileIcon. * tests/test_gicon.py (TestIcon.test_eq, Test_Eq.test_hash) (TestLoadableIcon.setUp): Adapt accordingly. (TestFileIcon): New test case. svn path=/trunk/; revision=933 --- gio/gio.defs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gio') diff --git a/gio/gio.defs b/gio/gio.defs index 0396d65..c083ff3 100644 --- a/gio/gio.defs +++ b/gio/gio.defs @@ -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 -- cgit