Пример #1
0
 /// <summary>
 /// This function removes object, it is being called only by destructor of quassel core
 /// </summary>
 /// <param name="protocol">Quassel core</param>
 public bool RemoveQuassel(ProtocolQuassel protocol)
 {
     lock (queueQs)
     {
         if (queueQs.Contains(protocol))
         {
             queueQs.Remove(protocol);
         }
     }
     lock (QuasselList)
     {
         if (QuasselList.ContainsKey(protocol))
         {
             KeyValuePair<TreeIter, bool> result = getIter(protocol);
             if (result.Value)
             {
                 TreeIter tree = result.Key;
                 Values.Remove(ref tree);
             }
             else
             {
                 Core.DebugLog("Can't remove from sidebar because reference isn't present: " + protocol.Server);
             }
             QuasselList.Remove(protocol);
             return true;
         }
     }
     return false;
 }
Пример #2
0
 private void insertQuassel(ProtocolQuassel service)
 {
     TreeIter text = Values.AppendValues(service.Server, service, ItemType.QuasselCore, service.SystemWindow, "Root window of quassel", Configuration.CurrentSkin.Icon_ExclamationMark);
     lock (QuasselList)
     {
         QuasselList.Add(service, text);
     }
 }
Пример #3
0
 /// <summary>
 /// Insert quassel
 /// </summary>
 /// <param name="service"></param>
 public void InsertQuassel(ProtocolQuassel service)
 {
     lock (queueQs)
     {
         queueQs.Add(service);
     }
     Updated = true;
 }