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, true)
        {
            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 OnTubeManagerClosed(object sender, EventArgs args)
        {
            TubeManager manager = sender as TubeManager;

            if (manager.CurrentActivity.InitiatorHandle != Contact.Connection.SelfHandle)
            {
//                if (dialog != null) {
//                    dialog.Destroy ();
//                    dialog = null;
//                }
                if (getting_response)
                {
                    ResetResponseMessage();
                }
            }
            else
            {
                TelepathyNotification.Create().Show(Contact.Name,
                                                    AddinManager.CurrentLocalizer.GetString("is no longer sharing their Banshee library with you"));
            }
        }
Beispiel #3
0
        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 ();
        }