diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-12 18:16:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-12 18:16:21 +0800 |
commit | 59d9746849e9ba794a190b04d3d9f444321b82b8 (patch) | |
tree | be6c4370000085fdec4cd378cf07d35c18d6c00f /ethereal/gui.go | |
parent | 2e2f23a0aef637b8b43362bb8a2dba16d5c02c25 (diff) | |
download | go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar.gz go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar.bz2 go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar.lz go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar.xz go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.tar.zst go-tangerine-59d9746849e9ba794a190b04d3d9f444321b82b8.zip |
Changed naming on exposed QML variables
Diffstat (limited to 'ethereal/gui.go')
-rw-r--r-- | ethereal/gui.go | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/ethereal/gui.go b/ethereal/gui.go index d8ab50ac6..e0a415201 100644 --- a/ethereal/gui.go +++ b/ethereal/gui.go @@ -18,7 +18,6 @@ import ( "github.com/ethereum/eth-go/ethreact" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethwire" - "github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/utils" "github.com/go-qml/qml" ) @@ -49,8 +48,6 @@ type Gui struct { config *ethutil.ConfigManager miner *ethminer.Miner - - jsEngine *javascript.JSRE } // Create GUI, but doesn't start it @@ -62,7 +59,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden pub := ethpub.NewPEthereum(ethereum) - return &Gui{eth: ethereum, txDb: db, pub: pub, logLevel: ethlog.LogLevel(logLevel), Session: session, open: false, clientIdentity: clientIdentity, config: config, jsEngine: javascript.NewJSRE(ethereum)} + return &Gui{eth: ethereum, txDb: db, pub: pub, logLevel: ethlog.LogLevel(logLevel), Session: session, open: false, clientIdentity: clientIdentity, config: config} } func (gui *Gui) Start(assetPath string) { @@ -81,12 +78,12 @@ func (gui *Gui) Start(assetPath string) { // Create a new QML engine gui.engine = qml.NewEngine() context := gui.engine.Context() + gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath) // Expose the eth library and the ui library to QML - context.SetVar("eth", gui) + context.SetVar("gui", gui) context.SetVar("pub", gui.pub) - gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath) - context.SetVar("ui", gui.uiLib) + context.SetVar("eth", gui.uiLib) // Load the main QML interface data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) @@ -126,7 +123,7 @@ func (gui *Gui) Stop() { gui.win.Hide() } - gui.jsEngine.Stop() + gui.uiLib.jsEngine.Stop() logger.Infoln("Stopped") } @@ -477,18 +474,6 @@ func (gui *Gui) Create(recipient, value, gas, gasPrice, data string) (*ethpub.PR return gui.pub.Transact(gui.privateKey(), recipient, value, gas, gasPrice, data) } -func (self *Gui) ImportTx(rlpTx string) { - tx := ethchain.NewTransactionFromBytes(ethutil.Hex2Bytes(rlpTx)) - self.eth.TxPool().QueueTransaction(tx) -} - -func (self *Gui) SearchChange(blockHash, address, storageAddress string) { -} - -func (self *Gui) EvalJavascriptFile(path string) { - self.jsEngine.LoadExtFile(path[7:]) -} - func (gui *Gui) SetCustomIdentifier(customIdentifier string) { gui.clientIdentity.SetCustomIdentifier(customIdentifier) gui.config.Save("id", customIdentifier) |