summaryrefslogtreecommitdiff
path: root/gtk/gtkinvisible.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-06-26 18:22:42 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-06-26 19:06:43 -0400
commit9c37b3de7466a22d4c784657a86c522e2a4f118a (patch)
tree8efe1f75cef57d9af8484324dca0c35714a1ca16 /gtk/gtkinvisible.c
parent66492678b5a3043f4acd77a6a41405bc4f8097b3 (diff)
downloadgtk+-9c37b3de7466a22d4c784657a86c522e2a4f118a.tar.gz
gtk: Don't use GObjectClass.constructor
Use the newer constructed instead, which has a fast path in GObject.
Diffstat (limited to 'gtk/gtkinvisible.c')
-rw-r--r--gtk/gtkinvisible.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 628b2d2d55..5d07914260 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -69,10 +69,7 @@ static void gtk_invisible_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-
-static GObject *gtk_invisible_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params);
+static void gtk_invisible_constructed (GObject *object);
G_DEFINE_TYPE_WITH_PRIVATE (GtkInvisible, gtk_invisible, GTK_TYPE_WIDGET)
@@ -93,7 +90,7 @@ gtk_invisible_class_init (GtkInvisibleClass *class)
gobject_class->set_property = gtk_invisible_set_property;
gobject_class->get_property = gtk_invisible_get_property;
- gobject_class->constructor = gtk_invisible_constructor;
+ gobject_class->constructed = gtk_invisible_constructed;
g_object_class_install_property (gobject_class,
PROP_SCREEN,
@@ -322,18 +319,10 @@ gtk_invisible_get_property (GObject *object,
/* We use a constructor here so that we can realize the invisible on
* the correct screen after the “screen” property has been set
*/
-static GObject*
-gtk_invisible_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params)
+static void
+gtk_invisible_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (gtk_invisible_parent_class)->constructor (type,
- n_construct_properties,
- construct_params);
+ G_OBJECT_CLASS (gtk_invisible_parent_class)->constructed (object);
gtk_widget_realize (GTK_WIDGET (object));
-
- return object;
}