guihandle.go raw

   1  // +build !headless
   2  
   3  package launchers
   4  
   5  import (
   6  	"fmt"
   7  
   8  	"github.com/p9c/p9/cmd/gui"
   9  	"github.com/p9c/p9/pod/state"
  10  )
  11  
  12  // GUIHandle starts up the GUI wallet
  13  func GUIHandle(ifc interface{}) (e error) {
  14  	var cx *state.State
  15  	var ok bool
  16  	if cx, ok = ifc.(*state.State); !ok {
  17  		return fmt.Errorf("cannot run without a state")
  18  	}
  19  	// // log.AppColorizer = color.Bit24(128, 255, 255, false).Sprint
  20  	// // log.App = "   gui"
  21  	D.Ln("starting up parallelcoin pod gui...")/**/
  22  	// // fork.ForkCalc()
  23  	// // podconfig.Configure(cx, true)
  24  	// // D.Ln(os.Args)
  25  	// // interrupt.AddHandler(func() {
  26  	// // 	D.Ln("wallet gui is shut down")
  27  	// // })
  28  	if e = gui.Main(cx); E.Chk(e) {
  29  	}
  30  	D.Ln("pod gui finished")
  31  	return
  32  }
  33