示例#1
0
        public override bool SupportsItem(Item item)
        {
            Pidgin.IPurpleObject prpl    = Pidgin.GetPurpleObject();
            PidginAccountItem    account = item as PidginAccountItem;

            return(prpl.PurpleAccountIsConnected(account.Id));
        }
示例#2
0
        public override IEnumerable <Item> Perform(IEnumerable <Item> items, IEnumerable <Item> modItems)
        {
            Pidgin.IPurpleObject prpl;
            PidginAccountItem    account = items.First() as PidginAccountItem;

            try {
                prpl = Pidgin.GetPurpleObject();
                try {
                    prpl.PurpleAccountSetEnabled(account.Id, gtkGaim, (int)0);
                }
                catch {
                    prpl.PurpleAccountSetEnabled(account.Id, gtkGaim, (uint)0);
                }
            } catch (Exception e) {
                Log <PidginDisableAccount> .Error("Could not disable Pidgin account: {0}", e.Message);

                Log <PidginDisableAccount> .Debug(e.StackTrace);
            }
            yield break;
        }