- Timestamp:
- 05/10/09 03:53:57 (3 years ago)
- Location:
- trunk/sandbox/jhb
- Files:
-
- 3 added
- 2 modified
-
mobile/coin_icon.mbg (added)
-
mobile/coin_icon.mif (added)
-
mobile/coinsound.wav (added)
-
mobile/ocwallet.py (modified) (9 diffs)
-
oc2/wallet.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sandbox/jhb/mobile/ocwallet.py
r304 r305 5 5 from oc2 import storage,wallet, transports 6 6 import sys 7 import audio 8 9 icon = appuifw.Icon(u'e:\\python\\coin_icon.mif',16384,16385) 10 coinsound = audio.Sound.open('e:\\python\\coinsound.wav') 11 7 12 8 13 class WalletClient: … … 35 40 title = u'%s %ss' % (amount,cdd.currencyId) 36 41 description = unicode(cdd.issuerServiceLocation) 37 self.wallet_list.append((title,description ))42 self.wallet_list.append((title,description,icon)) 38 43 if not self.wallet_list: 39 44 self.wallet_list.append(u'no currencies yet') … … 123 128 details.append((u'Currency Id',unicode(coin.currencyId))) 124 129 details.append((u'Denomination',unicode(coin.denomination))) 130 details.append((u'Serial',unicode(coin.serial))) 131 details.append((u'Signature',unicode(coin.signature))) 125 132 self.coin_menu = appuifw.Listbox(details,self.inspectCurrency) 126 133 self.coin_menu.bind(EKeyLeftArrow,self.inspectCurrency) … … 163 170 transport = self.getHTTPTransport(url) 164 171 self.wallet.mintCoins(transport,amount,target) 172 coinsound.play() 165 173 self.makeWalletMenu() 166 174 self.displayWalletMenu() … … 189 197 transport = self.getHTTPTransport(cdd.issuerServiceLocation) 190 198 self.wallet.freshenUp(transport,cdd) 199 coinsound.play() 191 200 self.makeWalletMenu() 192 201 self.displayWalletMenu() … … 208 217 else: 209 218 self.receiveCoinsHTTP(transport) 210 219 220 coinsound.play() 211 221 self.makeWalletMenu() 212 222 self.displayWalletMenu() … … 260 270 addr,services=btsocket.bt_discover() 261 271 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'] 266 277 else: 267 278 port=services[services.keys()[0]] … … 281 292 btsocket.bt_advertise_service( u"opencoin", server_socket, True, btsocket.RFCOMM) 282 293 btsocket.set_security(server_socket, btsocket.AUTH) 283 appuifw.note(u'waiting for bt connection')294 self.feedback(u'waiting for bt connection') 284 295 (sock,peer_addr) = server_socket.accept() 285 296 … … 297 308 sock, client_info = server_sock.accept() 298 309 299 300 310 bt = transports.BTTransport(sock) 301 311 self.wallet.getApproval = self.getApproval -
trunk/sandbox/jhb/oc2/wallet.py
r304 r305 312 312 tid = self.makeSerial() 313 313 314 self.feedback(u'Announcing transfer') 314 315 self.announceSum(transport,tid,amount,target) 315 316 self.feedback(u'Transferring coins. Wating for other side...') 316 317 response = self.requestSpend(transport,tid,picked) 317 318 if response == True:
