dbus has bugs on Getting

This commit is contained in:
cuu
2018-11-27 00:58:16 +08:00
parent ffd0b09194
commit 098105f890
12 changed files with 114 additions and 65 deletions

View File

@@ -48,12 +48,11 @@ func (self *DbusInterface) Get( thecall *dbus.Call, retvalues ...interface{}) er
}
err:= thecall.Store(retvalues...)
return err
/*
if err != nil {
panic(fmt.Sprintf("Failed: %s",err))
panic(fmt.Sprintf("Failed: %s,%s",err,thecall.Method))
}
*/
return err
}
type DBusInterface interface {
@@ -170,3 +169,10 @@ func (self *DBus) ListenSignal() {
}
}
var DBusHandler *DBus //global
func init() {
DBusHandler = NewDBus()
DBusHandler.Init()
fmt.Println("dbus inited")
}

View File

@@ -1,6 +1,7 @@
package UI
import (
//"fmt"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
@@ -88,6 +89,7 @@ func (self *Label) SetText(text string) {
func (self *Label) Draw() {
font.SetBold(self.FontObj,false) // avoing same font tangling set_bold to others
my_text := font.Render(self.FontObj,self.Text, true, self.Color, nil)
rect_ := rect.Rect(self.PosX,self.PosY,self.Width,self.Height)

View File

@@ -197,8 +197,9 @@ func (self *MainScreen) Init() {
self.SkinManager = NewSkinManager()
self.SkinManager.Init()
self.DBusManager = DBUS.NewDBus()
self.DBusManager.Init()
//self.DBusManager = DBUS.NewDBus()
self.DBusManager = DBUS.DBusHandler
//self.DBusManager.Init()
}
func (self *MainScreen) FartherPages() { // right after ReadTheDirIntoPages