confdata

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: 17 Imported by: 0

Documentation

Overview

Package confdata provides a data source for the config, based on the gldi backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppletConf

type AppletConf struct {
	gldi.VisitCard
	// contains filtered or unexported fields
}

AppletConf wraps a dock module and visitcard as Appleter for config data source.

func (*AppletConf) Activate

func (v *AppletConf) Activate() string

Activate activates the applet and returns the path to the config file of the new instance.

func (*AppletConf) CanAdd

func (v *AppletConf) CanAdd() bool

CanAdd returns whether the applet can be activated (again).

func (*AppletConf) CanUninstall

func (v *AppletConf) CanUninstall() bool

CanUninstall returns whether the applet can be uninstalled or not.

func (*AppletConf) Deactivate

func (v *AppletConf) Deactivate()

Deactivate does nothing. Only here for compatibility with datatype.Appleter

func (*AppletConf) Dir

func (v *AppletConf) Dir() string

Dir gives the location of the package on disk.

func (*AppletConf) FormatCategory

func (v *AppletConf) FormatCategory() string

FormatCategory formats the applet category text.

func (*AppletConf) FormatSize

func (v *AppletConf) FormatSize() string

FormatSize does nothing. Only here for compatibility with datatype.Appleter

func (*AppletConf) FormatState

func (v *AppletConf) FormatState() string

FormatState does nothing. Only here for compatibility with datatype.Appleter

func (*AppletConf) IconState

func (v *AppletConf) IconState() string

IconState does nothing. Only here for compatibility with datatype.Appleter

func (*AppletConf) Install

func (v *AppletConf) Install(options string) error

Install does nothing. Only here for compatibility with datatype.Appleter

func (*AppletConf) IsActive

func (v *AppletConf) IsActive() bool

IsActive returns whether there is at least one active instance of the applet or not.

func (*AppletConf) IsInstalled

func (v *AppletConf) IsInstalled() bool

IsInstalled returns whether the applet is installed or not.

func (*AppletConf) Uninstall

func (v *AppletConf) Uninstall() error

Uninstall does nothing. Only here for compatibility with datatype.Appleter

type AppletDownload

type AppletDownload struct {
	packages.AppletPackage
	// contains filtered or unexported fields
}

AppletDownload wraps a dock module and an external applet package as Appleter for config data source.

func (*AppletDownload) Activate

func (v *AppletDownload) Activate() string

Activate activates the applet. TODO: May have to returns the path to the config file of the new instance.

func (*AppletDownload) CanAdd

func (v *AppletDownload) CanAdd() bool

CanAdd returns whether the applet can be activated.

func (*AppletDownload) CanUninstall

func (v *AppletDownload) CanUninstall() bool

CanUninstall returns whether the applet can be uninstalled or not.

func (*AppletDownload) Deactivate

func (v *AppletDownload) Deactivate()

Deactivate deactivates the applet.

func (*AppletDownload) FormatCategory

func (v *AppletDownload) FormatCategory() string

FormatCategory formats the applet category text.

func (*AppletDownload) GetAuthor

func (v *AppletDownload) GetAuthor() string

GetAuthor returns the applet author.

func (*AppletDownload) GetIconFilePath

func (v *AppletDownload) GetIconFilePath() string

GetIconFilePath returns the location of the applet icon. TODO: improve.

func (*AppletDownload) GetName

func (v *AppletDownload) GetName() string

GetName returns the applet name to use as config key.

func (*AppletDownload) GetTitle

func (v *AppletDownload) GetTitle() string

GetTitle returns the applet readable name.

func (*AppletDownload) IconState

func (v *AppletDownload) IconState() string

IconState returns the icon location for the state for the applet.

func (*AppletDownload) Install

func (v *AppletDownload) Install(options string) error

Install downloads and extract an external archive to package dir.

func (*AppletDownload) IsActive

func (v *AppletDownload) IsActive() bool

IsActive returns whether there is at least one active instance of the applet or not.

func (*AppletDownload) Uninstall

func (v *AppletDownload) Uninstall() error

Uninstall removes the external applet package dir.

type Data

type Data struct {
	datatype.SourceCommon
	cdglobal.Crypto
}

Data provides a config Source interface based on the dock gldi backend.

func (Data) AppIcon

func (Data) AppIcon() string

AppIcon returns the application icon path.

func (Data) CreateMainDock

func (Data) CreateMainDock() string

CreateMainDock creates a new main dock to store a moved icon.

func (Data) CurrentThemeLoad

func (Data) CurrentThemeLoad(themeName string, useBehaviour, useLaunchers bool) error

CurrentThemeLoad imports and loads a dock theme.

func (Data) CurrentThemeSave

func (Data) CurrentThemeSave(themeName string, saveBehaviour, saveLaunchers, needPackage bool, dirPackage string) error

CurrentThemeSave saves the current dock theme, and can also make an archive.

func (Data) DesktopClasser

func (Data) DesktopClasser(class string) datatype.DesktopClasser

DesktopClasser allows to get desktop class informations for a given name.

func (Data) DirShareData

func (Data) DirShareData(path ...string) string

DirShareData returns the path to the shared data dir.

func (Data) DirUserAppData

func (Data) DirUserAppData(path ...string) (string, error)

DirUserAppData returns the path to the applications data dir (user saved data).

func (Data) DisplayMode

func (Data) DisplayMode() cdglobal.DisplayMode

DisplayMode returns the display backend used.

func (Data) GrabWindowClass

func (Data) GrabWindowClass() (string, error)

GrabWindowClass waits a user window selection and returns its class.

func (Data) Handbook

func (Data) Handbook(name string) datatype.Handbooker

Handbook wraps a dock module visit card as Handbooker for config data source.

func (Data) ListAnimations

func (Data) ListAnimations() (list []datatype.Field)

ListAnimations returns the list of animations.

func (Data) ListDeskletDecorations

func (Data) ListDeskletDecorations() (list []datatype.Field)

ListDeskletDecorations returns the list of desklet decorations.

func (Data) ListDialogDecorator

func (Data) ListDialogDecorator() (list []datatype.Field)

ListDialogDecorator returns the list of dialog decorators.

func (Data) ListDockThemeLoad

func (d Data) ListDockThemeLoad() (map[string]datatype.Appleter, error)

ListDockThemeLoad builds the list of dock themes for load widget (local and distant).

func (Data) ListDockThemeSave

func (d Data) ListDockThemeSave() []datatype.Field

ListDockThemeSave builds the list of dock themes for save widget (local).

func (Data) ListDocks

func (Data) ListDocks(parent, subdock string) []datatype.Field

ListDocks builds the list of docks with readable name. Both options are docks to remove from the list. Subdock childrens are removed too.

func (Data) ListDownloadApplets

func (d Data) ListDownloadApplets() (map[string]datatype.Appleter, error)

ListDownloadApplets builds the list of downloadable user applets (installed or not).

func (Data) ListIcons

func (Data) ListIcons() *datatype.ListIcon

ListIcons builds the list of all icons.

func (Data) ListIconsMainDock

func (Data) ListIconsMainDock() (list []datatype.Field)

ListIconsMainDock builds the list of icons in the maindock.

func (Data) ListKnownApplets

func (Data) ListKnownApplets() map[string]datatype.Appleter

ListKnownApplets builds the list of all user applets.

func (Data) ListScreens

func (Data) ListScreens() (list []datatype.Field)

ListScreens returns the list of screens.

func (Data) ListShortkeys

func (Data) ListShortkeys() (list []cdglobal.Shortkeyer)

ListShortkeys returns the list of dock shortkeys.

func (Data) ListViews

func (Data) ListViews() map[string]datatype.Handbooker

ListViews returns the list of views.

func (Data) MainConfigDefault

func (Data) MainConfigDefault() string

MainConfigDefault returns the full path to the dock config file.

func (Data) MainConfigFile

func (Data) MainConfigFile() string

MainConfigFile returns the full path to the dock config file.

func (Data) ManagerReload

func (Data) ManagerReload(name string, b bool, keyf *keyfile.KeyFile)

ManagerReload reloads the manager matching the given name.

type HandbookDescTranslate

type HandbookDescTranslate struct{ datatype.Handbooker }

HandbookDescTranslate improves Handbooker with a translated description.

func (*HandbookDescTranslate) GetDescription

func (dv *HandbookDescTranslate) GetDescription() string

GetDescription returns the book description.

type IconConf

type IconConf struct {
	gldi.Icon
}

IconConf wraps a dock icon as Iconer for config data source.

func (*IconConf) ConfigGroup

func (icon *IconConf) ConfigGroup() string

ConfigGroup is unused on this backend.

func (*IconConf) GetClass

func (icon *IconConf) GetClass() datatype.DesktopClasser

GetClass returns the class defined for the icon, able to get all related desktop class informations.

func (*IconConf) GetGettextDomain

func (icon *IconConf) GetGettextDomain() string

GetGettextDomain returns the translation domain for the applet.

func (*IconConf) MoveAfterNext

func (icon *IconConf) MoveAfterNext()

MoveAfterNext swaps the icon position with the next one.

func (*IconConf) MoveBeforePrevious

func (icon *IconConf) MoveBeforePrevious()

MoveBeforePrevious swaps the icon position with the previous one.

func (*IconConf) OriginalConfigPath

func (icon *IconConf) OriginalConfigPath() string

OriginalConfigPath gives the full path to the icon original config file. This is the default unchanged config file.

func (*IconConf) Reload

func (icon *IconConf) Reload()

Reload reloads the icon to apply the new configuration.

Jump to

Keyboard shortcuts

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