Changeset 305 for trunk

Show
Ignore:
Timestamp:
05/10/09 03:53:57 (3 years ago)
Author:
ocjhb
Message:

ui improvmenets. Icons, sounds, more messages, disabled bt port selection dialog

Location:
trunk/sandbox/jhb
Files:
3 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/sandbox/jhb/mobile/ocwallet.py

    r304 r305  
    55from oc2 import storage,wallet, transports 
    66import sys 
     7import audio 
     8 
     9icon = appuifw.Icon(u'e:\\python\\coin_icon.mif',16384,16385) 
     10coinsound = audio.Sound.open('e:\\python\\coinsound.wav') 
     11 
    712 
    813class WalletClient: 
     
    3540            title = u'%s %ss' % (amount,cdd.currencyId) 
    3641            description = unicode(cdd.issuerServiceLocation) 
    37             self.wallet_list.append((title,description)) 
     42            self.wallet_list.append((title,description,icon)) 
    3843        if not self.wallet_list: 
    3944            self.wallet_list.append(u'no currencies yet') 
     
    123128        details.append((u'Currency Id',unicode(coin.currencyId))) 
    124129        details.append((u'Denomination',unicode(coin.denomination))) 
     130        details.append((u'Serial',unicode(coin.serial))) 
     131        details.append((u'Signature',unicode(coin.signature))) 
    125132        self.coin_menu = appuifw.Listbox(details,self.inspectCurrency) 
    126133        self.coin_menu.bind(EKeyLeftArrow,self.inspectCurrency) 
     
    163170        transport = self.getHTTPTransport(url) 
    164171        self.wallet.mintCoins(transport,amount,target) 
     172        coinsound.play()  
    165173        self.makeWalletMenu() 
    166174        self.displayWalletMenu() 
     
    189197        transport = self.getHTTPTransport(cdd.issuerServiceLocation) 
    190198        self.wallet.freshenUp(transport,cdd) 
     199        coinsound.play()  
    191200        self.makeWalletMenu() 
    192201        self.displayWalletMenu() 
     
    208217        else: 
    209218            self.receiveCoinsHTTP(transport) 
    210          
     219 
     220        coinsound.play()  
    211221        self.makeWalletMenu() 
    212222        self.displayWalletMenu() 
     
    260270        addr,services=btsocket.bt_discover() 
    261271        if len(services)>0: 
    262             choices=services.keys() 
    263             choices.sort() 
    264             choice=appuifw.popup_menu([unicode(services[x])+": "+x for x in choices],u'Choose port:') 
    265             port=services[choices[choice]] 
     272            #choices=services.keys() 
     273            #choices.sort() 
     274            #choice=appuifw.popup_menu([unicode(services[x])+": "+x for x in choices],u'Choose port:') 
     275            #port=services[choices[choice]] 
     276            port = services[u'opencoin'] 
    266277        else: 
    267278            port=services[services.keys()[0]] 
     
    281292            btsocket.bt_advertise_service( u"opencoin", server_socket, True, btsocket.RFCOMM) 
    282293            btsocket.set_security(server_socket, btsocket.AUTH) 
    283             appuifw.note(u'waiting for bt connection') 
     294            self.feedback(u'waiting for bt connection') 
    284295            (sock,peer_addr) = server_socket.accept() 
    285296 
     
    297308            sock, client_info = server_sock.accept() 
    298309 
    299          
    300310        bt = transports.BTTransport(sock) 
    301311        self.wallet.getApproval = self.getApproval  
  • trunk/sandbox/jhb/oc2/wallet.py

    r304 r305  
    312312        tid = self.makeSerial() 
    313313         
     314        self.feedback(u'Announcing transfer') 
    314315        self.announceSum(transport,tid,amount,target) 
    315  
     316        self.feedback(u'Transferring coins. Wating for other side...') 
    316317        response = self.requestSpend(transport,tid,picked) 
    317318        if response == True: