diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-20 22:58:13 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-20 22:58:13 +0800 |
commit | 0cf617ef0c796cf97252fb64a92afc7cb1d892f2 (patch) | |
tree | e4dced74c9786dab0d85d738286d8e80aaf7cb93 /ethereal/ui/ext_app.go | |
parent | 0ef7f6372939189dcfeaea8197798a63a6d6688a (diff) | |
download | dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar.gz dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar.bz2 dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar.lz dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar.xz dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.tar.zst dexon-0cf617ef0c796cf97252fb64a92afc7cb1d892f2.zip |
Implemented GUI watchers for rapid reload. Implements #46
Diffstat (limited to 'ethereal/ui/ext_app.go')
-rw-r--r-- | ethereal/ui/ext_app.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ethereal/ui/ext_app.go b/ethereal/ui/ext_app.go index de5f15db6..d1a256cdb 100644 --- a/ethereal/ui/ext_app.go +++ b/ethereal/ui/ext_app.go @@ -18,14 +18,16 @@ type AppContainer interface { NewBlock(*ethchain.Block) ObjectChanged(*ethchain.StateObject) StorageChanged(*ethchain.StorageState) + NewWatcher(chan bool) } type ExtApplication struct { *ethpub.PEthereum - blockChan chan ethutil.React - changeChan chan ethutil.React - quitChan chan bool + blockChan chan ethutil.React + changeChan chan ethutil.React + quitChan chan bool + watcherQuitChan chan bool container AppContainer lib *UiLib @@ -38,6 +40,7 @@ func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication { make(chan ethutil.React, 1), make(chan ethutil.React, 1), make(chan bool), + make(chan bool), container, lib, nil, @@ -66,6 +69,8 @@ func (app *ExtApplication) run() { reactor := app.lib.eth.Reactor() reactor.Subscribe("newBlock", app.blockChan) + app.container.NewWatcher(app.watcherQuitChan) + win := app.container.Window() win.Show() win.Wait() @@ -83,6 +88,7 @@ func (app *ExtApplication) stop() { // Kill the main loop app.quitChan <- true + app.watcherQuitChan <- true close(app.blockChan) close(app.quitChan) |