keybindings: Use G_DEFINE_BOXED_TYPE

https://bugzilla.gnome.org/show_bug.cgi?id=673824
This commit is contained in:
Jasper St. Pierre 2012-04-10 01:25:13 -04:00
parent 15f11f879d
commit e6ed29f0e2

View File

@ -71,18 +71,10 @@ meta_key_binding_copy (MetaKeyBinding *binding)
return g_slice_dup (MetaKeyBinding, binding); return g_slice_dup (MetaKeyBinding, binding);
} }
GType G_DEFINE_BOXED_TYPE(MetaKeyBinding,
meta_key_binding_get_type (void) meta_key_binding,
{ meta_key_binding_copy,
static GType type_id = 0; meta_key_binding_free)
if (G_UNLIKELY (type_id == 0))
type_id = g_boxed_type_register_static (g_intern_static_string ("MetaKeyBinding"),
(GBoxedCopyFunc)meta_key_binding_copy,
(GBoxedFreeFunc)meta_key_binding_free);
return type_id;
}
const char * const char *
meta_key_binding_get_name (MetaKeyBinding *binding) meta_key_binding_get_name (MetaKeyBinding *binding)