X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/4cc7be2f1b2212541321468f58762879985a5411..56beb0d2b20edc2f0ac8716c020053f8a103577d:/examples/my-person.gob diff --git a/examples/my-person.gob b/examples/my-person.gob index 7f4e9b3..ba7be44 100644 --- a/examples/my-person.gob +++ b/examples/my-person.gob @@ -12,12 +12,12 @@ requires 2.0.0 class My:Person from G:Object { /* the name of the person */ - private char *name = {g_strdup(_("Nobody"))} + private char *name = {g_strdup("Nobody")} destroywith g_free; property STRING name - (nick = _("Name"), - blurb = _("Name of the person"), - default_value = _("Nobody"), + (nick = "Name", + blurb = "Name of the person", + default_value = "Nobody", /* Export get/set functions for this property */ export, /* link to the data memeber 'name' */ @@ -26,8 +26,8 @@ class My:Person from G:Object { /* date of birth as a time_t */ private long dob = 0; property LONG dob - (nick = _("Date of birth"), - blurb = _("Date of birth of the person"), + (nick = "Date of birth", + blurb = "Date of birth of the person", minimum = 0, maximum = LONG_MAX, default_value = 0, @@ -44,8 +44,8 @@ class My:Person from G:Object { /* date of death as a time_t */ private long dod = 0; property LONG dod - (nick = _("Date of death"), - blurb = _("Date of death of the person"), + (nick = "Date of death", + blurb = "Date of death of the person", minimum = 0, maximum = LONG_MAX, default_value = 0, @@ -62,7 +62,8 @@ class My:Person from G:Object { birth (self, long dob) { g_object_set (G_OBJECT (self), - "dob", dob); + "dob", dob, + NULL); } /* when the person dies, sends out a signal, the caller @@ -72,7 +73,8 @@ class My:Person from G:Object { death (self, long dod) { g_object_set (G_OBJECT (self), - "dod", dod); + "dod", dod, + NULL); } public @@ -88,7 +90,7 @@ class My:Person from G:Object { shoot_oneself_in_the_head (self) { if (self->_priv->rounds_in_shotgun == 0) { - g_warning (_("No rounds in the shotgun!")); + g_warning ("No rounds in the shotgun!"); return; } @@ -96,7 +98,7 @@ class My:Person from G:Object { self->_priv->rounds_in_shotgun--; /* death is imminent if we shoot oneself in the head */ - death (self, (long)time (NULL)); + self_death (self, (long)time (NULL)); } public GObject *