]> git.draconx.ca Git - gob-dx.git/blobdiff - examples/my-person.gob
Release 2.0.15
[gob-dx.git] / examples / my-person.gob
index 7f4e9b3bf8db4580570ff80d8cadb547f1921b94..ba7be441022e27066c31e972e700e6c778b0e39c 100644 (file)
@@ -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 *