diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-02 15:09:08 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-02 15:09:08 +0200 |
commit | 3cf492544ee6ab6733de710ac7aee33039229b76 (patch) | |
tree | 37a92f2db905b35a200566e59612a3ad3c442db1 | |
parent | d00865bc2c4ce4508fc3cdc0226be542b17f1788 (diff) | |
download | gnome-contacts-3cf492544ee6ab6733de710ac7aee33039229b76.tar.gz |
Contact: put the constructor before the methods.
-rw-r--r-- | src/contacts-contact.vala | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala index 74bfe84..96e9a3c 100644 --- a/src/contacts-contact.vala +++ b/src/contacts-contact.vala @@ -65,6 +65,16 @@ public class Contacts.Contact : GLib.Object { private bool to_be_deleted; // this.hidden, part 1 private bool ignored; // this.hidden, part 2 + public Contact (Store store, Individual i) { + this.store = store; + this.individual = i; + this.individual.set_data ("contact", this); + this.individual.notify.connect(notify_cb); + + this.ignored = is_ignorable (); + this.is_main = calc_is_main (); + } + public static Contact from_individual (Individual i) { return i.get_data ("contact"); } @@ -86,17 +96,6 @@ public class Contacts.Contact : GLib.Object { return false; } - public Contact (Store store, Individual i) { - this.store = store; - individual = i; - individual.set_data ("contact", this); - - this.ignored = is_ignorable (); - this.is_main = calc_is_main (); - - individual.notify.connect(notify_cb); - } - public void replace_individual (Individual new_individual) { individual.notify.disconnect(notify_cb); individual = new_individual; |