Mercurial > pidgin
diff plugins/mono/loader/status-glue.c @ 11996:ecd33ffb0b0a
[gaim-migrate @ 14289]
more mono cleanups from Eoin Coffey
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Sun, 06 Nov 2005 23:09:07 +0000 |
parents | 67fbd2ff4c4e |
children | 8edb08af68c7 |
line wrap: on
line diff
--- a/plugins/mono/loader/status-glue.c Sun Nov 06 23:02:39 2005 +0000 +++ b/plugins/mono/loader/status-glue.c Sun Nov 06 23:09:07 2005 +0000 @@ -4,22 +4,11 @@ MonoObject* gaim_status_build_status_object(void* data) { MonoObject *obj = NULL; - MonoClass *klass = NULL; - GaimStatus *status = (GaimStatus*)data; - klass = mono_class_from_name(ml_get_api_image(), "Gaim", "Status"); - if (!klass) { - gaim_debug(GAIM_DEBUG_FATAL, "mono", "couldn't build the class!\n"); - } - - obj = mono_object_new(ml_get_domain(), klass); - if (!obj) { - gaim_debug(GAIM_DEBUG_FATAL, "mono", "couldn't create the object!\n"); - } - - mono_runtime_object_init(obj); - + obj = ml_create_api_object("Status"); + g_return_val_if_fail(obj != NULL, NULL); + ml_set_prop_string(obj, "Id", (char*)gaim_status_get_id(status)); return obj;