godock: github.com/sqp/godock/widgets/cfbuild/vdata Index | Files

package vdata

import "github.com/sqp/godock/widgets/cfbuild/vdata"

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

This data source can only be used for tests.

Index

Package Files

testinit.go testvalues.go vdata.go

Variables

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.

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.

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

Maindocks defines the list of maindocks for the virtual dock.

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.

func PathTestConf Uses

func PathTestConf() string

PathTestConf returns the default config test path.

func TestInit Uses

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

TestInit inits the test builder.

func TestPathDefault Uses

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 Uses

func TestValues(key *cftype.Key)

TestValues updates the key data with test values.

type Sourcer Uses

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 Uses

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

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

Package vdata imports 12 packages (graph) and is imported by 3 packages. Updated 2017-11-26. Refresh now. Tools for package owners.