From 9bebfa7c35d94e48cefc02a31be2f61365158044 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Wed, 9 Sep 2009 12:31:47 +0200 Subject: [PATCH] [AdgToyText] Returning proper type from constructor Returning the proper expected type instead of using an "arbitrary" convenient ancestor. --- adg/adg-toy-text.c | 8 ++++---- adg/adg-toy-text.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adg/adg-toy-text.c b/adg/adg-toy-text.c index 1f1a8e30..70ff6786 100644 --- a/adg/adg-toy-text.c +++ b/adg/adg-toy-text.c @@ -188,12 +188,12 @@ set_property(GObject *object, guint prop_id, * * Creates a new toy text entity using @label as its text * - * Returns: the new entity - */ -AdgEntity * + * Returns: the newly created toy text entity + **/ +AdgToyText * adg_toy_text_new(const gchar *label) { - return (AdgEntity *) g_object_new(ADG_TYPE_TOY_TEXT, "label", label, NULL); + return g_object_new(ADG_TYPE_TOY_TEXT, "label", label, NULL); } /** diff --git a/adg/adg-toy-text.h b/adg/adg-toy-text.h index 662c6078..8cbc7b94 100644 --- a/adg/adg-toy-text.h +++ b/adg/adg-toy-text.h @@ -50,7 +50,7 @@ struct _AdgToyTextClass { GType adg_toy_text_get_type (void) G_GNUC_CONST; -AdgEntity * adg_toy_text_new (const gchar *label); +AdgToyText * adg_toy_text_new (const gchar *label); const gchar * adg_toy_text_get_label (AdgToyText *toy_text); void adg_toy_text_set_label (AdgToyText *toy_text, const gchar *label); -- 2.11.4.GIT