[glib] Fix property example in gobject tutorial
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix property example in gobject tutorial
- Date: Thu, 30 May 2013 14:26:14 +0000 (UTC)
commit a681e11f928e79d40d4d1e994dd5b65378f911a7
Author: William Jon McCann <jmccann redhat com>
Date: Wed Jan 30 00:46:43 2013 +0100
Fix property example in gobject tutorial
https://bugzilla.gnome.org/show_bug.cgi?id=692848
docs/reference/gobject/tut_howto.xml | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/gobject/tut_howto.xml b/docs/reference/gobject/tut_howto.xml
index fb52f67..1ee0051 100644
--- a/docs/reference/gobject/tut_howto.xml
+++ b/docs/reference/gobject/tut_howto.xml
@@ -930,7 +930,7 @@ struct _MamanBaz
{
GObject parent_instance;
- int instance_member;
+ gint instance_member;
};
struct _MamanBazClass
@@ -1173,22 +1173,20 @@ struct _MamanBaz
enum
{
PROP_0,
-
PROP_NAME
};
static void
maman_baz_set_property (GObject *object,
- guint property_id,
+ guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
MamanBaz *baz = MAMAN_BAZ (object);
- GObject *obj;
switch (prop_id)
{
- case ARG_NAME:
+ case PROP_NAME:
g_free (baz->name);
baz->name = g_value_dup_string (value);
break;
@@ -1209,7 +1207,7 @@ maman_baz_get_property (GObject *object,
switch (prop_id)
{
- case ARG_NAME:
+ case PROP_NAME:
g_value_set_string (value, baz->name);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]