Exemplo n.º 1
0
 def add_contacts(self):
     database = DataBase()
     for contacts in self.__contact_box.get_children():
         contacts.hide_all()
         self.__contact_box.remove(contacts)
         contacts.destroy()
     for contacts in database.select_rows('contacts'):
         from contacts import Contact
         contact = Contact(contacts)
         contact.connect('toggle', self._append_number_to_receivers)
         self.__contact_box.pack_start(contact, False, False)
     self.__contact_box.show_all()
Exemplo n.º 2
0
 def getCurrentMeContact(self, view):
     """
       Lookup the current "me" Contact.
     """
     from contacts import Contact
     return Contact.getCurrentMeContact(view)
Exemplo n.º 3
0
 def unblock(self, *a,**k):
     return Contact.unblock(self, *a, **k)
Exemplo n.º 4
0
 def block(self, *a,**k):
     return Contact.block(self, *a, **k)
Exemplo n.º 5
0
 def __init__(self, buddy, group):
     Contact.__init__(self, buddy, (group, buddy.name))
     self.group = group
Exemplo n.º 6
0
contact1info["home"] = "4567"
contact1info["work"] = "4567"
contact1info["cell"] = "4567"
contact1info["group"] = groups

groups = ["This"]
contact2info = {}
contact2info["first"] = "Andrew"
contact2info["last"] = "Gardner"
contact2info["home"] = "4567"
contact2info["work"] = "4567"
contact2info["cell"] = "4567"
contact2info["group"] = groups

contact1 = Contact(contact1info)
contact2 = Contact(contact2info)

print(contact1)

print(contact2.print_details())


groupA = Group("theName")
groupA.add(contact1)
groupA.add(contact2)

print(groupA)
print("".join([str(l) for l in groupA.search("first", "ndrew")]))
print("".join([str(l) for l in groupA.search("last", "Gardner")]))
print("".join([str(l) for l in groupA.search("home", "4567")]))
print("".join([str(l) for l in groupA.search("work", "4567")]))
Exemplo n.º 7
0
 def rename_gui(self):
     s = Contact.rename_gui(self)
     if s is not None:
         self.remote_alias = s
Exemplo n.º 8
0
 def __init__(self, *a, **k):
     Contact.__init__(self, *a, **k)
     self.ssis = self.protocol.ssimanager.ssis
     self.remote_alias  # side effects on buddy