~ubuntu-branches/ubuntu/trusty/gnome-contacts/trusty-proposed

« back to all changes in this revision

Viewing changes to src/contacts-contact.vala

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-30 14:26:00 UTC
  • mfrom: (1.3.2)
  • Revision ID: package-import@ubuntu.com-20120730142600-evecglz3pai4rrmt
Tags: 3.5.4.1-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libfolks-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1199
1199
    return false;
1200
1200
  }
1201
1201
 
 
1202
  /**
 
1203
   * Return true only for personas which are in a Google address book, but which
 
1204
   * are not in the user's "My Contacts" group in the address book.
 
1205
   */
1202
1206
  public static bool persona_is_google_other (Persona persona) {
1203
1207
    if (!persona_is_google (persona))
1204
1208
      return false;
1205
1209
 
1206
 
    var g = persona as GroupDetails;
1207
 
    if (g != null && !g.groups.contains (eds_personal_google_group_name ()))
1208
 
      return true;
 
1210
    var p = persona as Edsf.Persona;
 
1211
    if (p != null)
 
1212
      return !p.in_google_personal_group;
1209
1213
    return false;
1210
1214
  }
1211
1215
 
1287
1291
 
1288
1292
  public static async Persona? create_primary_persona_for_details (Folks.PersonaStore store, HashTable<string, Value?> details) throws GLib.Error {
1289
1293
    var p = yield store.add_persona_from_details (details);
1290
 
    if (p != null && persona_is_google (p)) {
1291
 
      var g = p as GroupDetails;
1292
 
      yield g.change_group (eds_personal_google_group_name (), true);
1293
 
    }
1294
1294
    return p;
1295
1295
  }
1296
1296