aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/gui.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-16 00:14:02 +0800
committerobscuren <geffobscura@gmail.com>2014-12-16 00:14:02 +0800
commit01a6db93241a01e98a0467b628423c9b5b1361cb (patch)
treedefc185c17bd88e32c021748ba7a19748496dac7 /cmd/mist/gui.go
parent993280ec03a8bd8e108da7e222c98efa8482084b (diff)
downloaddexon-01a6db93241a01e98a0467b628423c9b5b1361cb.tar.gz
dexon-01a6db93241a01e98a0467b628423c9b5b1361cb.tar.zst
dexon-01a6db93241a01e98a0467b628423c9b5b1361cb.zip
Added whisper debug interface + whisper fixes
Diffstat (limited to 'cmd/mist/gui.go')
-rw-r--r--cmd/mist/gui.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 40499ad7f..ba031e6c3 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -38,6 +38,7 @@ import (
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/p2p"
+ "github.com/ethereum/go-ethereum/ui/qt/qwhisper"
"github.com/ethereum/go-ethereum/xeth"
"gopkg.in/qml.v1"
)
@@ -87,7 +88,8 @@ type Gui struct {
eth *eth.Ethereum
// The public Ethereum library
- uiLib *UiLib
+ uiLib *UiLib
+ whisper *qwhisper.Whisper
txDb *ethdb.LDBDatabase
@@ -138,10 +140,12 @@ func (gui *Gui) Start(assetPath string) {
gui.engine = qml.NewEngine()
context := gui.engine.Context()
gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath)
+ gui.whisper = qwhisper.New(gui.eth.Whisper())
// Expose the eth library and the ui library to QML
context.SetVar("gui", gui)
context.SetVar("eth", gui.uiLib)
+ context.SetVar("shh", gui.whisper)
// Load the main QML interface
data, _ := ethutil.Config.Db.Get([]byte("KeyRing"))
@@ -391,6 +395,8 @@ func (gui *Gui) update() {
gui.setPeerInfo()
}()
+ gui.whisper.SetView(gui.win.Root().ObjectByName("whisperView"))
+
for _, plugin := range gui.plugins {
guilogger.Infoln("Loading plugin ", plugin.Name)