From e6ed29f0e23918eef24afd434a9cd3258c4a26b8 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 10 Apr 2012 01:25:13 -0400 Subject: [PATCH] keybindings: Use G_DEFINE_BOXED_TYPE https://bugzilla.gnome.org/show_bug.cgi?id=673824 --- src/core/keybindings.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index cba90f3a5..3c6c86d29 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -71,18 +71,10 @@ meta_key_binding_copy (MetaKeyBinding *binding) return g_slice_dup (MetaKeyBinding, binding); } -GType -meta_key_binding_get_type (void) -{ - static GType type_id = 0; - - 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; -} +G_DEFINE_BOXED_TYPE(MetaKeyBinding, + meta_key_binding, + meta_key_binding_copy, + meta_key_binding_free) const char * meta_key_binding_get_name (MetaKeyBinding *binding)