Пример #1
0
func TestConfig(t *testing.T) {
	gtk.Init(nil)

	build := vdata.TestInit(vdata.New(log.NewLog(log.Logs), nil, nil), vdata.PathTestConf())
	if build == nil {
		return
	}
	build.BuildAll(pageswitch.New())

	assert.Equal(t, countChanged(t, build), 0, "Build unchanged")

	build.KeyWalk(vdata.TestValues)
	assert.Equal(t, countChanged(t, build), 32, "Build full change")
}
Пример #2
0
func main() {
	gtk.Init(nil)
	win, e := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
	if e != nil {
		println(e.Error())
		return
	}

	path, isTest := vdata.TestPathDefault()
	var saveCall func(cftype.Builder)
	if isTest {
		saveCall = cfprint.Updated
	} else {
		saveCall = func(build cftype.Builder) { cfprint.Default(build, true) }
	}
	source := vdata.New(log.NewLog(log.Logs), win, saveCall)
	build := vdata.TestInit(source, path)
	source.SetGrouper(build)

	glib.IdleAdd(packWindow(win, source, build))
	gtk.Main()
}
Пример #3
0
func main() {
	path, isTest := vdata.TestPathDefault()

	// path := cdglobal.ConfigDirDock("") + "/current_theme/cairo-dock.conf"

	// path := cdglobal.AppBuildPathFull(pathGoGmail...)

	gtk.Init(nil)

	source := vdata.New(log.NewLog(log.Logs), nil, nil)
	build := vdata.TestInit(source, path)
	if build == nil {
		return
	}
	build.BuildAll(pageswitch.New())
	if isTest {
		cfprint.Updated(build)
		build.KeyWalk(vdata.TestValues)
		cfprint.Updated(build)
	} else {
		cfprint.Default(build, true)
	}
}