[mutter] keybindings: Use G_DEFINE_BOXED_TYPE
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keybindings: Use G_DEFINE_BOXED_TYPE
- Date: Fri, 13 Jul 2012 04:00:51 +0000 (UTC)
commit e6ed29f0e23918eef24afd434a9cd3258c4a26b8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 10 01:25:13 2012 -0400
keybindings: Use G_DEFINE_BOXED_TYPE
https://bugzilla.gnome.org/show_bug.cgi?id=673824
src/core/keybindings.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index cba90f3..3c6c86d 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]