def change_mode(state, window, mode, rpc_queue=None): try: g.modes.index(mode) except ValueError: return False state['mode'] = mode if mode == 'home': monitor.draw_window(state, window, rpc_queue) elif mode == 'tx': tx.draw_window(state, window, rpc_queue) elif mode == 'peers': peers.draw_window(state, window, rpc_queue) elif mode == 'wallet': wallet.draw_window(state, window, rpc_queue) elif mode == 'mempool': mempool.draw_window(state, window, rpc_queue) elif mode == 'block': block.draw_window(state, window, rpc_queue) elif mode == 'console': console.draw_window(state, window, rpc_queue) elif mode == 'net': net.draw_window(state, window, rpc_queue) elif mode == 'forks': forks.draw_window(state, window, rpc_queue)
def change_mode(block_viewer, state, window, mode, poller): try: g.modes.index(mode) except ValueError: return False state['mode'] = mode block_viewer._mode = mode if mode == 'monitor': monitor.draw_window(state, window) elif mode == 'tx': tx.draw_window(state, window) elif mode == 'peers': peers.draw_window(state, window) elif mode == 'wallet': wallet.draw_window(state, window) elif mode == 'block': block_viewer.draw() elif mode == 'console': console.draw_window(state, window) elif mode == 'net': net.draw_window(state, window) elif mode == 'forks': forks.draw_window(state, window) footer.draw_window(state) poller.set_mode(mode)
def change_mode(state, window, mode): try: g.modes.index(mode) except ValueError: return False state['mode'] = mode if mode == 'overview': monitor.draw_window(state, window) elif mode == 'tx': tx.draw_window(state, window) elif mode == 'peers': peers.draw_window(state, window) elif mode == 'wallet': wallet.draw_window(state, window) elif mode == 'block': block.draw_window(state, window) elif mode == 'console': console.draw_window(state, window) elif mode == 'net': net.draw_window(state, window) elif mode == 'forks': forks.draw_window(state, window) elif mode == 'mnodes': mnode.draw_window(state, window)
def resize(s, state, window, rpc_queue): if state['mode'] == 'tx': tx.draw_window(state, window, rpc_queue) elif state['mode'] == 'block': block.draw_window(state, window, rpc_queue) elif state['mode'] == 'peers': peers.draw_window(state, window, rpc_queue) elif state['mode'] == 'wallet': wallet.draw_window(state, window, rpc_queue) elif state['mode'] == 'monitor': monitor.draw_window(state, window, rpc_queue) elif state['mode'] == 'console': console.draw_window(state, window, rpc_queue) elif state['mode'] == 'net': net.draw_window(state, window, rpc_queue) elif state['mode'] == 'forks': forks.draw_window(state, window, rpc_queue)
def resize(s, state, window): if state['mode'] == 'tx': tx.draw_window(state, window) elif state['mode'] == 'block': block.draw_window(state, window) elif state['mode'] == 'peers': peers.draw_window(state, window) elif state['mode'] == 'wallet': wallet.draw_window(state, window) elif state['mode'] == 'overview': monitor.draw_window(state, window) elif state['mode'] == 'console': console.draw_window(state, window) elif state['mode'] == 'net': net.draw_window(state, window) elif state['mode'] == 'forks': forks.draw_window(state, window) elif state['mode'] == 'mnodes': mnode.draw_window(state, window)
def resize(s, state, window, rpc_queue): if state['mode'] == 'tx': tx.draw_window(state, window, rpc_queue) elif state['mode'] == 'block': block.draw_window(state, window, rpc_queue) elif state['mode'] == 'mempool': mempool.draw_window(state, window, rpc_queue) elif state['mode'] == 'peers': peers.draw_window(state, window, rpc_queue) elif state['mode'] == 'wallet': wallet.draw_window(state, window, rpc_queue) elif state['mode'] == 'home': monitor.draw_window(state, window, rpc_queue) elif state['mode'] == 'console': console.draw_window(state, window, rpc_queue) elif state['mode'] == 'net': net.draw_window(state, window, rpc_queue) elif state['mode'] == 'forks': forks.draw_window(state, window, rpc_queue)
def getchaintips(s, state, window): state['chaintips'] = s['getchaintips'] state['chaintips_offset'] = 0 if state['mode'] == 'forks': forks.draw_window(state, window)
def getchaintips(s, state, window): state['chaintips'] = s['getchaintips'] state['chaintips_offset'] = 0 if state['mode'] == 'forks': forks.draw_window(state, window) footer.draw_window(state)
def getchaintips(s, state, window, rpc_queue): state['chaintips'] = s['getchaintips'] state['chaintips_offset'] = 0 if state['mode'] == 'forks': forks.draw_window(state, window, rpc_queue)