summaryrefslogtreecommitdiff
path: root/gtk/gtkactivatable.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-04-14 03:35:30 +0200
committerJavier Jardón <jjardon@gnome.org>2010-08-25 15:06:40 +0200
commit45e217668377cfb8bb0de23edf8c66549ec1b634 (patch)
tree9228c901e87eae4ffd5d15e68ba2941a3b596c3f /gtk/gtkactivatable.c
parentd5a8a3c9bc2a5dc30c1f16f2ac38869299aa86b9 (diff)
downloadgtk+-45e217668377cfb8bb0de23edf8c66549ec1b634.tar.gz
Use G_DEFINE_INTERFACE macro in gtkactivatable
https://bugzilla.gnome.org/show_bug.cgi?id=605186
Diffstat (limited to 'gtk/gtkactivatable.c')
-rw-r--r--gtk/gtkactivatable.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/gtk/gtkactivatable.c b/gtk/gtkactivatable.c
index 77b019ba4d..5f2bbeaad6 100644
--- a/gtk/gtkactivatable.c
+++ b/gtk/gtkactivatable.c
@@ -268,28 +268,11 @@
#include "gtkintl.h"
-static void gtk_activatable_class_init (gpointer g_iface);
-
-GType
-gtk_activatable_get_type (void)
-{
- static GType activatable_type = 0;
-
- if (!activatable_type) {
- activatable_type =
- g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkActivatable"),
- sizeof (GtkActivatableIface),
- (GClassInitFunc) gtk_activatable_class_init,
- 0, NULL, 0);
-
- g_type_interface_add_prerequisite (activatable_type, G_TYPE_OBJECT);
- }
-
- return activatable_type;
-}
+typedef GtkActivatableIface GtkActivatableInterface;
+G_DEFINE_INTERFACE (GtkActivatable, gtk_activatable, G_TYPE_OBJECT)
static void
-gtk_activatable_class_init (gpointer g_iface)
+gtk_activatable_default_init (GtkActivatableInterface *iface)
{
/**
* GtkActivatable:related-action:
@@ -302,7 +285,7 @@ gtk_activatable_class_init (gpointer g_iface)
*
* Since: 2.16
*/
- g_object_interface_install_property (g_iface,
+ g_object_interface_install_property (iface,
g_param_spec_object ("related-action",
P_("Related Action"),
P_("The action this activatable will activate and receive updates from"),
@@ -325,7 +308,7 @@ gtk_activatable_class_init (gpointer g_iface)
*
* Since: 2.16
*/
- g_object_interface_install_property (g_iface,
+ g_object_interface_install_property (iface,
g_param_spec_boolean ("use-action-appearance",
P_("Use Action Appearance"),
P_("Whether to use the related actions appearance properties"),