protected internal Avatar(Contact contact) : this() { this.contact = contact; avatars = DBusUtility.GetProxy <IAvatars> (Connection.Bus, Connection.BusName, Connection.ObjectPath); }
public ContactSource (Contact contact) : base (AddinManager.CurrentLocalizer.GetString ("Contact"), String.Format ("{0} ({1})", contact != null ? contact.Name : String.Empty, contact != null ? contact.Status.ToString () : String.Empty), contact !=null ? contact.ToString () : String.Empty, 300) { Contact = contact; Contact.ContactUpdated += OnContactUpdated; Hyena.Log.DebugFormat ("ContactSource created for {0}", Contact.Name); //Properties.SetString ("UnmapSourceActionLabel", AddinManager.CurrentLocalizer.GetString ("Disconnect")); //Properties.SetString ("UnmapSourceActionIconName", "gtk-disconnect"); Properties.SetString ("Icon.Name", "stock_person"); Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml"); Properties.Set<bool> ("ActiveSourceUIResourcePropagate", true); Properties.SetString ("GtkActionPath", "/ContactSourcePopup"); Properties.SetString ("TrackView.ColumnControllerXml", @" <column-controller> <add-all-defaults /> <column modify-default=""IndicatorColumn""> <renderer type=""Banshee.Telepathy.Gui.ColumnCellContactStatusIndicator"" /> </column> </column-controller> " ); SupportsPlaylists = false; if (SavedCount > 0) { CleanUpData (); } SavedCount = 0; tube_manager = new TubeManager (contact); ContactSourceInitialize (); AfterInitialized (); }
private void AddContactSource (Contact contact) { if (contact.SupportedChannels.GetChannelInfo <DBusTubeChannelInfo> (MetadataProviderService.BusName) != null) { ContactSource source = new ContactSource (contact); container.AddChildSource (source); source_map[contact.Connection.AccountObjectPath].Add (contact, source); } contact.ContactServicesChanged += OnContactServicesChanged; }
private void RemoveContactSource (Contact contact) { if (source_map[contact.Connection.AccountObjectPath].ContainsKey (contact)) { ContactSource source = source_map[contact.Connection.AccountObjectPath][contact]; if (source.Contact.Connection.Status == ConnectionStatus.Disconnected) { source.Contact.ContactServicesChanged -= OnContactServicesChanged; } // remove and close all channels, in case we don't get closed events contact.DispatchManager.RemoveAll (contact); source.Dispose (); container.RemoveChildSource (source); source_map[contact.Connection.AccountObjectPath].Remove (contact); } }
public TubeManager(Contact c) { Contact = c; Initialize (); }