~ken-vandine/ubuntu/precise/folks/precise

« back to all changes in this revision

Viewing changes to folks/individual.vala

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-12-21 17:40:15 UTC
  • mfrom: (1.2.5 upstream) (4.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221174015-4o0mdnok2a83mcch
Tags: 0.3.3-1ubuntu1
* Merge with Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Build-depend on dh-autoreconf
  - Bump build-depends on valac-0.12, libvala-0.12-dev
  - Add Vcs-Bzr link
* debian/rules:
  - Build with autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 */
65
65
public class Folks.Individual : Object,
66
66
    Aliasable,
67
 
    Avatar,
68
 
    Favourite,
 
67
    Favouritable,
69
68
    Groupable,
70
 
    IMable,
71
 
    Presence
 
69
    HasAvatar,
 
70
    HasPresence,
 
71
    IMable
72
72
{
73
73
  private bool _is_favourite;
74
74
  private string _alias;
121
121
  /**
122
122
   * Whether the Individual is the user.
123
123
   *
124
 
   * Iff the Individual represents the user – the person who owns the
125
 
   * account in the backend for each {@link Persona} in the Individual –
 
124
   * Iff the Individual represents the user (the person who owns the
 
125
   * account in the backend for each {@link Persona} in the Individual)
126
126
   * this is `true`.
127
127
   *
128
128
   * It is //not// guaranteed that every {@link Persona} in the Individual has
234
234
          this._is_favourite = value;
235
235
          this._persona_list.foreach ((p) =>
236
236
            {
237
 
              if (p is Favourite)
 
237
              if (p is Favouritable)
238
238
                {
239
239
                  SignalHandler.block_by_func (p,
240
240
                      (void*) this.notify_is_favourite_cb, this);
241
 
                  ((Favourite) p).is_favourite = value;
 
241
                  ((Favouritable) p).is_favourite = value;
242
242
                  SignalHandler.unblock_by_func (p,
243
243
                      (void*) this.notify_is_favourite_cb, this);
244
244
                }
515
515
      /* Choose the most available presence from our personas */
516
516
      this._persona_list.foreach ((p) =>
517
517
        {
518
 
          if (p is Presence)
 
518
          if (p is HasPresence)
519
519
            {
520
 
              unowned Presence presence = (Presence) p;
 
520
              unowned HasPresence presence = (HasPresence) p;
521
521
 
522
 
              if (Presence.typecmp (presence.presence_type, presence_type) > 0)
 
522
              if (HasPresence.typecmp (presence.presence_type,
 
523
                  presence_type) > 0)
523
524
                {
524
525
                  presence_type = presence.presence_type;
525
526
                  presence_message = presence.presence_message;
546
547
 
547
548
      this._persona_list.foreach ((p) =>
548
549
        {
549
 
          if (favourite == false && p is Favourite)
 
550
          if (favourite == false && p is Favouritable)
550
551
            {
551
 
              favourite = ((Favourite) p).is_favourite;
 
552
              favourite = ((Favouritable) p).is_favourite;
552
553
              if (favourite == true)
553
554
                return;
554
555
            }
654
655
 
655
656
      this._persona_list.foreach ((p) =>
656
657
        {
657
 
          if (avatar == null && p is Avatar)
 
658
          if (avatar == null && p is HasAvatar)
658
659
            {
659
 
              avatar = ((Avatar) p).avatar;
 
660
              avatar = ((HasAvatar) p).avatar;
660
661
              return;
661
662
            }
662
663
        });