diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-28 21:02:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-28 21:02:36 +0800 |
commit | 9a11a948943d285b22a3a5e508fadc0c346990f4 (patch) | |
tree | 29f9206297a5c098efa5383def749ac865978e96 /cmd/mist/ui_lib.go | |
parent | cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0 (diff) | |
download | dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar.gz dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar.bz2 dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar.lz dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar.xz dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.tar.zst dexon-9a11a948943d285b22a3a5e508fadc0c346990f4.zip |
Updated assets & moved messages
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r-- | cmd/mist/ui_lib.go | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index e0321f6dd..2cb6895b3 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -23,11 +23,11 @@ package main import ( "bytes" "fmt" + "io/ioutil" "path" "strconv" "strings" - "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" @@ -35,8 +35,6 @@ import ( "github.com/ethereum/go-ethereum/event/filter" "github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/miner" - "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/ui/qt" "github.com/ethereum/go-ethereum/xeth" "gopkg.in/qml.v1" ) @@ -313,34 +311,50 @@ func (self *UiLib) ToAscii(data string) string { /// Ethereum filter methods func (self *UiLib) NewFilter(object map[string]interface{}, view *qml.Common) (id int) { + /* TODO remove me filter := qt.NewFilterFromMap(object, self.eth) filter.MessageCallback = func(messages state.Messages) { view.Call("messages", xeth.ToJSMessages(messages), id) } id = self.filterManager.InstallFilter(filter) return id + */ + return 0 } func (self *UiLib) NewFilterString(typ string, view *qml.Common) (id int) { + /* TODO remove me filter := core.NewFilter(self.eth) filter.BlockCallback = func(block *types.Block) { view.Call("messages", "{}", id) } id = self.filterManager.InstallFilter(filter) return id + */ + return 0 } func (self *UiLib) Messages(id int) *ethutil.List { + /* TODO remove me filter := self.filterManager.GetFilter(id) if filter != nil { messages := xeth.ToJSMessages(filter.Find()) return messages } + */ return ethutil.EmptyList() } +func (self *UiLib) ReadFile(p string) string { + content, err := ioutil.ReadFile(self.AssetPath(path.Join("ext", p))) + if err != nil { + guilogger.Infoln("error reading file", p, ":", err) + } + return string(content) +} + func (self *UiLib) UninstallFilter(id int) { self.filterManager.UninstallFilter(id) } |