here it is. the code looks for addressbook.vcf in the user's $HOME and reads it in. multiple numbers per contact are supported.
in /usr/bin/zhone search for class pyphone_contacts(edje_group): and find some lines below def prepare( self ): and modify like below (be aware of unintentional linebreaks!) def prepare( self ): if not self.ready and not self.busy: file = open(os.environ.get('HOME')+"/addressbook.vcf", "r") entries = [] entry_nr = 1 name = None number = None for line in file: #if line.startswith("END:VCARD"): if line.startswith("TEL;"): number = unicode(line.partition(":")[2].strip()) if name and number: entry = entry_nr, name, number entries.append(entry) entry_nr = entry_nr + 1 if line.startswith("END:VCARD"): name = None number = None if line.startswith("N:"): name = unicode(line.partition(":")[2].replace(';',' ').strip(), "utf8", "utf8") #if line.startswith("TEL;"): # number = unicode(line.partition(":")[2].strip()) file.close() self.cbPhonebookReply(entries) """ if dbus_object.gsm_device_obj: logger.info( "retrieving phonebook..." ) dbus_object.gsm_sim_iface.RetrievePhonebook( "contacts", reply_handler=self.cbPhonebookReply, error_handler=self.cbPhonebookError ) self.busy = True else: # Fake phonebook... self.cbPhonebookReply( [ (1, u'Kirk', '+023224433'), (2, u'Spock', '+034433463'), (3, u'McCoy', '+013244344'), (4, u'Scott', '+013244344'), (5, u'Uhura', '+013244344'), (6, u'Sulu', '+013244344'), (7, u'Chekov', '+456663443'), ] ) """ _______________________________________________ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support