]> git.0d.be Git - empathy.git/commitdiff
CONSTRUCT_ONLY properties must be writable
authorXavier Claessens <xclaesse@gmail.com>
Tue, 17 Feb 2009 14:47:27 +0000 (15:47 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:10 +0000 (12:21 +0200)
libempathy/empathy-contact.c

index 46d80d3be6e51854ee5a006b511f7573caa72ede..09da70fded012fe37e84eca462874ab93b3a23ca 100644 (file)
@@ -147,15 +147,15 @@ empathy_contact_class_init (EmpathyContactClass *class)
         "TpContact",
         "The TpContact associated with the contact",
         TP_TYPE_CONTACT,
-        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE));
+        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
-      PROP_TP_CONTACT,
+      PROP_ACCOUNT,
       g_param_spec_object ("account",
         "The account",
         "The account associated with the contact",
         MC_TYPE_ACCOUNT,
-        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE));
+        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
       PROP_ID,
@@ -379,6 +379,8 @@ contact_set_property (GObject *object,
 EmpathyContact *
 empathy_contact_new (TpContact *tp_contact)
 {
+  g_return_val_if_fail (TP_IS_CONTACT (tp_contact), NULL);
+
   return g_object_new (EMPATHY_TYPE_CONTACT,
       "tp-contact", tp_contact,
       NULL);