[folks] Prefer to use object members directly instead of accessors.



commit e79e0fa114237c638f776f4e8df5ec451e1c8c52
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Tue Sep 28 16:23:32 2010 -0700

    Prefer to use object members directly instead of accessors.
    
    Patch by Patryk Zawadzki.

 backends/telepathy/lib/tpf-persona-store.vala |    4 ++--
 backends/telepathy/lib/tpf-persona.vala       |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index c03f1d1..7aa0795 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -393,7 +393,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
       else if (new_status != TelepathyGLib.ConnectionStatus.CONNECTED)
         return;
 
-      var conn = this.account.get_connection ();
+      var conn = this.account.connection;
       conn.notify["connection-ready"].connect (this.connection_ready_cb);
 
       /* Deal with the case where the connection is already ready
@@ -921,7 +921,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
         {
           /* the changes queued above will be resolve in the NewChannels handler
            */
-          this.ll.connection_create_group_async (this.account.get_connection (),
+          this.ll.connection_create_group_async (this.account.connection,
               group);
         }
       else
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 8e9fa03..994af54 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -213,7 +213,7 @@ public class Tpf.Persona : Folks.Persona,
         throw new Tpf.PersonaError.INVALID_ARGUMENT ("contact has an " +
             "invalid ID");
 
-      unowned Connection connection = contact.get_connection ();
+      unowned Connection connection = contact.connection;
       var account = account_for_connection (connection);
       string uid = this.build_uid ("telepathy", account.get_protocol (), id);
 
@@ -304,7 +304,7 @@ public class Tpf.Persona : Folks.Persona,
       accounts.foreach ((l) =>
         {
           unowned Account account = (Account) l;
-          if (account.get_connection () == conn)
+          if (account.connection == conn)
             {
               account_found = account;
               return;
@@ -355,7 +355,7 @@ public class Tpf.Persona : Folks.Persona,
 
   private void contact_notify_avatar ()
     {
-      var file = this.contact.get_avatar_file ();
+      var file = this.contact.avatar_file;
       if (this.avatar != file)
         this.avatar = file;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]