vdata

package
v0.0.0-...-0caaa62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Overview

Package vdata provides a virtual data source for the config file builder.

This data source can only be used for tests.

Index

Constants

This section is empty.

Variables

View Source
var Handbooks = []datatype.Handbooker{
	&datatype.HandbookSimple{
		Key:         "AppletName",
		Title:       "Handbook (A)",
		Description: "this is \nsome\ndescription text to explain the goal of the applet",
		Preview:     "/usr/share/cairo-dock/images/cairo-dock-logo.png",
		Author:      "Author Name",
	}, &datatype.HandbookSimple{
		Key:         "AnotherApplet",
		Title:       "Another Applet",
		Description: "with some other explanation",
		Preview:     "/usr/share/cairo-dock/images/preview-default.png",
		Author:      "Someone Else",
	}}

Handbooks defines the list of applet handbooks for the virtual dock.

View Source
var IconsMainDock = []datatype.Field{{
	Key:  "/path/to/Audio.conf",
	Name: "Audio",
	Icon: "media-optical",
}, {
	Key:  "/path/to/Cpu.conf",
	Name: "Gnome Terminal",
	Icon: "system-run",
}, {
	Key:  "/path/to/NetActivity.conf",
	Name: "NetActivity",
	Icon: "network-workgroup",
}, {
	Key:  "/path/to/TVPlay.conf",
	Name: "TVPlay",
	Icon: "media-playback-pause",
}}

IconsMainDock defines the list of Icons of the virtual dock.

View Source
var Maindocks = []datatype.Field{
	{Key: datatype.KeyMainDock, Name: "Main dock"},
}

Maindocks defines the list of maindocks for the virtual dock.

View Source
var Views = map[string]datatype.Handbooker{
	"ViewOne": &datatype.HandbookSimple{
		Key:         "ViewOne",
		Title:       "List view (A)",
		Description: "this is \nsome\ndescription text to explain how the view works",
		Preview:     "/usr/share/cairo-dock/images/cairo-dock-logo.png",
		Author:      "Author Name",
	},
	"ViewTwo": &datatype.HandbookSimple{
		Key:         "ViewTwo",
		Title:       "Another View",
		Description: "with some other explanation",
		Preview:     "/usr/share/cairo-dock/images/preview-default.png",
		Author:      "Someone Else",
	}}

Views defines the list of dock views for the virtual dock.

Functions

func PathTestConf

func PathTestConf() string

PathTestConf returns the default config test path.

func TestInit

func TestInit(source Sourcer, log cdtype.Logger, file string) cftype.Grouper

TestInit inits the test builder.

func TestPathDefault

func TestPathDefault(log cdtype.Logger) (string, bool)

TestPathDefault returns the first command line arg or the default test path. returns true if the default test file is used.

func TestValues

func TestValues(key *cftype.Key)

TestValues updates the key data with test values.

Types

type Sourcer

type Sourcer interface {
	cftype.Source
	ClickedSave()
	ClickedQuit()
	SetBox(*gtk.Box)
	SetGrouper(cftype.Grouper)
	Select(string, ...string) bool
}

Sourcer extends the config source with the virtual source own methods.

func New

func New(log cdtype.Logger, win cftype.WinLike, saveCall func(cftype.Builder)) Sourcer

New creates a virtual data source for the config file builder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL