gtkui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgAppEnvironmentTitle = "AppEnvironmentTitle"
	MsgGLIBInfo            = "GLIBInfo"
	MsgGTKInfo             = "GTKInfo"
	MsgRsyncInfo           = "RsyncInfo"
	MsgGolangInfo          = "GolangInfo"
	MsgDialogYesButton     = "DialogYesButton"
	MsgDialogNoButton      = "DialogNoButton"
	MsgActionDoesNotFound  = "ActionDoesNotFound"

	MsgMainAppSubsystemInitialized = "MainAppSubsystemInitialized"

	MsgAboutDlgAppFeaturesAndBenefitsTitle   = "AboutDlgAppFeaturesAndBenefitsTitle"
	MsgAboutDlgAppFeaturesAndBenefitsSection = "AboutDlgAppFeaturesAndBenefitsSection"
	MsgAboutDlgAppDescriptionSection         = "AboutDlgAppDescriptionSection"
	MsgAboutDlgReleasedUnderLicense          = "AboutDlgReleasedUnderLicense"
	MsgAboutDlgFollowMyGithubProjectTitle    = "AboutDlgFollowMyGithubProjectTitle"
	MsgAboutDlgAppCopyright                  = "AboutDlgAppCopyright"
	MsgAboutDlgAppAuthorsBlock               = "AboutDlgAppAuthorsBlock"
	MsgAboutDlgAppLearnMore                  = "AboutDlgAppLearnMore"
	MsgAboutDlgDoNotShowCaption              = "AboutDlgDoNotShowCaption"

	MsgPrefDlgGeneralUserInterfaceOptionsSecion       = "PrefDlgGeneralUserInterfaceOptionsSecion"
	MsgPrefDlgGeneralBackupSettingsSection            = "PrefDlgGeneralBackupSettingsSection"
	MsgPrefDlgAdvancedRsyncDedupSettingsSection       = "PrefDlgAdvancedRsyncDedupSettingsSection"
	MsgPrefDlgAdvansedRsyncSettingsSection            = "PrefDlgAdvansedRsyncSettingsSection"
	MsgPrefDlgAdvancedBackupSettingsSection           = "PrefDlgAdvancedBackupSettingsSection"
	MsgPrefDlgAdvancedRsyncFileTransferOptionsSection = "PrefDlgAdvancedRsyncFileTransferOptionsSection"
	MsgPrefDlgRestartPanelCaptionWithLink             = "PrefDlgRestartPanelCaptionWithLink"

	MsgPrefDlgDoNotShowAtAppStartupCaption = "PrefDlgDoNotShowAtAppStartupCaption"
	MsgPrefDlgDoNotShowAtAppStartupHint    = "PrefDlgDoNotShowAtAppStartupHint"

	MsgPrefDlgSessionLogControlFontSizeCaption = "PrefDlgSessionLogControlFontSizeCaption"
	MsgPrefDlgSessionLogControlFontSizeHint    = "PrefDlgSessionLogControlFontSizeHint"

	MsgPrefDlgSourcesCaption                  = "PrefDlgSourcesCaption"
	MsgPrefDlgSourceRsyncPathCaption          = "PrefDlgSourceRsyncPathCaption"
	MsgPrefDlgSourceRsyncPathRetryHint        = "PrefDlgSourceRsyncPathRetryHint"
	MsgPrefDlgSourceRsyncPathDescriptionHint  = "PrefDlgSourceRsyncPathDescriptionHint"
	MsgPrefDlgSourceRsyncPathNotValidatedHint = "PrefDlgSourceRsyncPathNotValidatedHint"
	MsgPrefDlgSourceRsyncPathEmptyError       = "PrefDlgSourceRsyncPathEmptyError"
	MsgPrefDlgSourceRsyncValidatingHint       = "PrefDlgSourceRsyncValidatingHint"

	MsgPrefDlgDestinationSubpathCaption          = "PrefDlgDestinationSubpathCaption"
	MsgPrefDlgDestinationSubpathHint             = "PrefDlgDestinationSubpathHint"
	MsgPrefDlgDestinationSubpathNotValidatedHint = "PrefDlgDestinationSubpathNotValidatedHint"
	MsgPrefDlgDestinationSubpathExpressionError  = "PrefDlgDestinationSubpathExpressionError"
	MsgPrefDlgDestinationSubpathNotUniqueError   = "PrefDlgDestinationSubpathNotUniqueError"

	MsgPrefDlgExtraOptionsBoxCaption      = "PrefDlgExtraOptionsBoxCaption"
	MsgPrefDlgExtraOptionsBoxHint         = "PrefDlgExtraOptionsBoxHint"
	MsgPrefDlgAuthPasswordCaption         = "PrefDlgAuthPasswordCaption"
	MsgPrefDlgAuthPasswordHint            = "PrefDlgAuthPasswordHint"
	MsgPrefDlgChangeFilePermissionCaption = "PrefDlgChangeFilePermissionCaption"
	MsgPrefDlgChangeFilePermissionHint    = "PrefDlgChangeFilePermissionHint"

	MsgPrefDlgOverrideRsyncTransferOptionsBoxCaption = "PrefDlgOverrideRsyncTransferOptionsBoxCaption"
	MsgPrefDlgOverrideRsyncTransferOptionsBoxHint    = "PrefDlgOverrideRsyncTransferOptionsBoxHint"

	MsgPrefDlgEnableBackupBlockCaption = "PrefDlgEnableBackupBlockCaption"
	MsgPrefDlgEnableBackupBlockHint    = "PrefDlgEnableBackupBlockHint"

	MsgPrefDlgDeleteBackupBlockCaption     = "PrefDlgDeleteBackupBlockCaption"
	MsgPrefDlgDeleteBackupBlockHint        = "PrefDlgDeleteBackupBlockHint"
	MsgPrefDlgDeleteBackupBlockDialogTitle = "PrefDlgDeleteBackupBlockDialogTitle"
	MsgPrefDlgDeleteBackupBlockDialogText  = "PrefDlgDeleteBackupBlockDialogText"

	MsgPrefDlgProfileNameCaption       = "PrefDlgProfileNameCaption"
	MsgPrefDlgProfileNameHint          = "PrefDlgProfileNameHint"
	MsgPrefDlgProfileNameExistsWarning = "PrefDlgProfileNameExistsWarning"
	MsgPrefDlgProfileNameEmptyWarning  = "PrefDlgProfileNameEmptyWarning"

	MsgPrefDlgDefaultDestPathCaption = "PrefDlgDefaultDestPathCaption"
	MsgPrefDlgDefaultDestPathHint    = "PrefDlgDefaultDestPathHint"

	MsgPrefDlgSkipFolderBackupFileSignatureCaption = "PrefDlgSkipFolderBackupFileSignatureCaption"
	MsgPrefDlgSkipFolderBackupFileSignatureHint    = "PrefDlgSkipFolderBackupFileSignatureHint"

	MsgPrefDlgPerformDesktopNotificationCaption = "PrefDlgPerformDesktopNotificationCaption"
	MsgPrefDlgPerformDesktopNotificationHint    = "PrefDlgPerformDesktopNotificationHint"

	MsgPrefDlgRunNotificationScriptCaption = "PrefDlgRunNotificationScriptCaption"
	MsgPrefDlgRunNotificationScriptHint    = "PrefDlgRunNotificationScriptHint"

	MsgPrefDlgAutoManageBackupBlockSizeCaption = "PrefDlgAutoManageBackupBlockSizeCaption"
	MsgPrefDlgAutoManageBackupBlockSizeHint    = "PrefDlgAutoManageBackupBlockSizeHint"

	MsgPrefDlgBackupBlockSizeCaption = "PrefDlgBackupBlockSizeCaption"
	MsgPrefDlgBackupBlockSizeHint    = "PrefDlgBackupBlockSizeHint"

	MsgPrefDlgRsyncRetryCountCaption = "PrefDlgRsyncRetryCountCaption"
	MsgPrefDlgRsyncRetryCountHint    = "PrefDlgRsyncRetryCountHint"

	MsgPrefDlgRsyncLowLevelLogCaption = "PrefDlgRsyncLowLevelLogCaption"
	MsgPrefDlgRsyncLowLevelLogHint    = "PrefDlgRsyncLowLevelLogHint"

	MsgPrefDlgRsyncIntensiveLowLevelLogCaption = "PrefDlgRsyncIntensiveLowLevelLogCaption"
	MsgPrefDlgRsyncIntensiveLowLevelLogHint    = "PrefDlgRsyncIntensiveLowLevelLogHint"

	MsgPrefDlgUsePreviousBackupForDedupCaption = "PrefDlgUsePreviousBackupForDedupCaption"
	MsgPrefDlgUsePreviousBackupForDedupHint    = "PrefDlgUsePreviousBackupForDedupHint"

	MsgPrefDlgNumberOfPreviousBackupToUseCaption = "PrefDlgNumberOfPreviousBackupToUseCaption"
	MsgPrefDlgNumberOfPreviousBackupToUseHint    = "PrefDlgNumberOfPreviousBackupToUseHint"

	MsgPrefDlgRsyncCompressFileTransferCaption = "PrefDlgRsyncCompressFileTransferCaption"
	MsgPrefDlgRsyncCompressFileTransferHint    = "PrefDlgRsyncCompressFileTransferHint"

	MsgPrefDlgRsyncTransferSourcePermissionsCaption = "PrefDlgRsyncTransferSourcePermissionsCaption"
	MsgPrefDlgRsyncTransferSourcePermissionsHint    = "PrefDlgRsyncTransferSourcePermissionsHint"

	MsgPrefDlgRsyncTransferSourceOwnerCaption = "PrefDlgRsyncTransferSourceOwnerCaption"
	MsgPrefDlgRsyncTransferSourceOwnerHint    = "PrefDlgRsyncTransferSourceOwnerHint"

	MsgPrefDlgRsyncTransferSourceGroupCaption = "PrefDlgRsyncTransferSourceGroupCaption"
	MsgPrefDlgRsyncTransferSourceGroupHint    = "PrefDlgRsyncTransferSourceGroupHint"

	MsgPrefDlgRsyncRecreateSymlinksCaption = "PrefDlgRsyncRecreateSymlinksCaption"
	MsgPrefDlgRsyncRecreateSymlinksHint    = "PrefDlgRsyncRecreateSymlinksHint"

	MsgPrefDlgRsyncTransferDeviceFilesCaption = "PrefDlgRsyncTransferDeviceFilesCaption"
	MsgPrefDlgRsyncTransferDeviceFilesHint    = "PrefDlgRsyncTransferDeviceFilesHint"

	MsgPrefDlgRsyncTransferSpecialFilesCaption = "PrefDlgRsyncTransferSpecialFilesCaption"
	MsgPrefDlgRsyncTransferSpecialFilesHint    = "PrefDlgRsyncTransferSpecialFilesHint"

	MsgPrefDlgLanguageCaption                    = "PrefDlgLanguageCaption"
	MsgPrefDlgLanguageHint                       = "PrefDlgLanguageHint"
	MsgPrefDlgDefaultLanguageEntry               = "PrefDlgDefaultLanguageEntry"
	MsgPrefDlgAddBackupBlockHint                 = "PrefDlgAddBackupBlockHint"
	MsgPrefDlgProfileConfigIssuesDetectedWarning = "PrefDlgProfileConfigIssuesDetectedWarning"
	MsgPrefDlgPreferencesDialogCaption           = "PrefDlgPreferencesDialogCaption"

	MsgPrefDlgGeneralProfileTabName = "PrefDlgGeneralProfileTabName"
	MsgPrefDlgProfileTabName        = "PrefDlgProfileTabName"
	MsgPrefDlgGeneralTabName        = "PrefDlgGeneralTabName"
	MsgPrefDlgAdvancedTabName       = "PrefDlgAdvancedTabName"

	MsgPrefDlgAddProfileHint           = "PrefDlgAddProfileHint"
	MsgPrefDlgDeleteProfileHint        = "PrefDlgDeleteProfileHint"
	MsgPrefDlgDeleteProfileDialogTitle = "PrefDlgDeleteProfileDialogTitle"
	MsgPrefDlgDeleteProfileDialogText  = "PrefDlgDeleteProfileDialogText"

	MsgSchemaConfigDlgTitle                   = "SchemaConfigDlgTitle"
	MsgSchemaConfigDlgNoSchemaFoundError      = "SchemaConfigDlgNoSchemaFoundError"
	MsgSchemaConfigDlgSchemaDoesNotFoundError = "SchemaConfigDlgSchemaDoesNotFoundError"
	MsgSchemaConfigDlgSchemaErrorAdvise       = "SchemaConfigDlgSchemaErrorAdvise"

	MsgAppWindowAboutMenuCaption       = "AppWindowAboutMenuCaption"
	MsgAppWindowHelpMenuCaption        = "AppWindowHelpMenuCaption"
	MsgAppWindowPreferencesMenuCaption = "AppWindowPreferencesMenuCaption"
	MsgAppWindowPreferencesHint        = "AppWindowPreferencesHint"
	MsgAppWindowQuitMenuCaption        = "AppWindowQuitMenuCaption"
	MsgAppWindowRunBackupHint          = "AppWindowRunBackupHint"
	MsgAppWindowStopBackupHint         = "AppWindowStopBackupHint"

	MsgAppWindowProfileCaption                      = "AppWindowProfileCaption"
	MsgAppWindowProfileHint                         = "AppWindowProfileHint"
	MsgAppWindowProfileBackupPlanInfoSourceCount    = "AppWindowProfileBackupPlanInfoSourceCount"
	MsgAppWindowProfileBackupPlanInfoTotalSize      = "AppWindowProfileBackupPlanInfoTotalSize"
	MsgAppWindowProfileBackupPlanInfoSkipSize       = "AppWindowProfileBackupPlanInfoSkipSize"
	MsgAppWindowProfileBackupPlanInfoDirectoryCount = "AppWindowProfileBackupPlanInfoDirectoryCount"
	MsgAppWindowInquiringProfileStatus              = "AppWindowInquiringProfileStatus"
	MsgAppWindowNoneProfileEntry                    = "AppWindowNoneProfileEntry"

	MsgAppWindowRsyncPathIsEmptyError      = "AppWindowRsyncPathIsEmptyError"
	MsgAppWindowDestPathCaption            = "AppWindowDestPathCaption"
	MsgAppWindowDestPathHint               = "AppWindowDestPathHint"
	MsgAppWindowDestPathIsValidStatusPart1 = "AppWindowDestPathIsValidStatusPart1"
	MsgAppWindowDestPathIsValidStatusPart2 = "AppWindowDestPathIsValidStatusPart2"
	MsgAppWindowDestPathIsEmptyError1      = "AppWindowDestPathIsEmptyError1"
	MsgAppWindowDestPathIsEmptyError2      = "AppWindowDestPathIsEmptyError2"
	MsgAppWindowDestPathIsNotExistError    = "AppWindowDestPathIsNotExistError"
	MsgAppWindowDestPathIsNotExistAdvise   = "AppWindowDestPathIsNotExistAdvise"

	MsgAppWindowBackupProgressStartMessage               = "AppWindowBackupProgressStartMessage"
	MsgAppWindowBackupProgressInquiringSourceID          = "AppWindowBackupProgressInquiringSourceID"
	MsgAppWindowBackupProgressInquiringSourceDescription = "AppWindowBackupProgressInquiringSourceDescription"
	MsgAppWindowBackupProgressTimePassedSuffix           = "AppWindowBackupProgressTimePassedSuffix"
	MsgAppWindowBackupProgressETASuffix                  = "AppWindowBackupProgressETASuffix"
	MsgAppWindowBackupProgressSizeCompletedSuffix        = "AppWindowBackupProgressSizeCompletedSuffix"
	MsgAppWindowBackupProgressSizeLeftToProcessSuffix    = "AppWindowBackupProgressSizeLeftToProcessSuffix"
	MsgAppWindowBackupProgressCompleted                  = "AppWindowBackupProgressCompleted"
	MsgAppWindowBackupProgressCompletedWithErrors        = "AppWindowBackupProgressCompletedWithErrors"
	MsgAppWindowBackupProgressTerminated                 = "AppWindowBackupProgressTerminated"
	MsgAppWindowBackupProgressFailed                     = "AppWindowBackupProgressFailed"
	MsgAppWindowOverallProgressCaption                   = "AppWindowOverallProgressCaption"
	MsgAppWindowProgressStatusCaption                    = "AppWindowProgressStatusCaption"
	MsgAppWindowSessionLogCaption                        = "AppWindowSessionLogCaption"
	MsgAppWindowCannotStartBackupProcessTitle            = "AppWindowCannotStartBackupProcessTitle"

	MsgAppWindowTerminateBackupDlgTitle = "AppWindowTerminateBackupDlgTitle"
	MsgAppWindowTerminateBackupDlgText  = "AppWindowTerminateBackupDlgText"

	MsgAppWindowOutOfSpaceDlgTitle           = "AppWindowOutOfSpaceDlgTitle"
	MsgAppWindowOutOfSpaceDlgText1           = "AppWindowOutOfSpaceDlgText1"
	MsgAppWindowOutOfSpaceDlgText2           = "AppWindowOutOfSpaceDlgText2"
	MsgAppWindowOutOfSpaceDlgIgnoreButton    = "AppWindowOutOfSpaceDlgIgnoreButton"
	MsgAppWindowOutOfSpaceDlgRetryButton     = "AppWindowOutOfSpaceDlgRetryButton"
	MsgAppWindowOutOfSpaceDlgTerminateButton = "AppWindowOutOfSpaceDlgTerminateButton"

	MsgAppWindowRsyncUtilityDlgTitle         = "AppWindowRsyncUtilityDlgTitle"
	MsgAppWindowRsyncUtilityDlgNotFoundError = "AppWindowRsyncUtilityDlgNotFoundError"

	MsgAppWindowShowNotificationError             = "AppWindowShowNotificationError"
	MsgAppWindowRunNotificationScriptError        = "AppWindowRunNotificationScriptError"
	MsgAppWindowNotificationScriptExecutableError = "AppWindowNotificationScriptExecutableError"
	MsgAppWindowGetExecutableScriptInfoError      = "AppWindowGetExecutableScriptInfoError"

	MsgLogBackupStageOutOfSpaceWarning = "LogBackupStageOutOfSpaceWarning"

	MsgGeneralHintStatusCaption      = "GeneralHintStatusCaption"
	MsgGeneralHintDescriptionCaption = "GeneralHintDescriptionCaption"

	MsgDesktopNotificationBackupSuccessfullyCompleted = "DesktopNotificationBackupSuccessfullyCompleted"
	MsgDesktopNotificationBackupCompletedWithErrors   = "DesktopNotificationBackupCompletedWithErrors"
	MsgDesktopNotificationBackupTerminated            = "DesktopNotificationBackupTerminated"
	MsgDesktopNotificationBackupFailed                = "DesktopNotificationBackupFailed"
	MsgDesktopNotificationTotalSize                   = "DesktopNotificationTotalSize"
	MsgDesktopNotificationSkippedSize                 = "DesktopNotificationSkippedSize"
	MsgDesktopNotificationFailedToBackupSize          = "DesktopNotificationFailedToBackupSize"
	MsgDesktopNotificationTimeTaken                   = "DesktopNotificationTimeTaken"
)
View Source
const (
	STOCK_WARNING_ICON = "dialog-warning-symbolic"
	//STOCK_WARNING_ICON = "dialog-warning"
	STOCK_OK_ICON            = "emblem-ok-symbolic"
	STOCK_QUESTION_ICON      = "dialog-question-symbolic"
	STOCK_SYNCHRONIZING_ICON = "emblem-synchronizing-symbolic"
	// ASSET_SYNCHRONIZING_CYAN_ICON   = "emblem-synchronizing-cyan.gif"
	// ASSET_SYNCHRONIZING_YELLOW_ICON = "emblem-synchronizing-yellow.gif"
	// ASSET_SYNCHRONIZING_ICON        = ASSET_SYNCHRONIZING_CYAN_ICON
	// ASSET_SYNCHRONIZING_ANIMATED_64x64_ICON = "loading_animated_64x64.gif"
	// ASSET_SYNCHRONIZING_FRAME8_64x64_ICON   = "loading_frame%d_64x64.gif"
	STOCK_IMPORTANT_ICON = "emblem-important-symbolic"
	// ASSET_IMPORTANT_ICON     = "emblem-important-red.gif"
	STOCK_NETWORK_ERROR_ICON = "network-error-symbolic"
	STOCK_DELETE_ICON        = "edit-delete-symbolic"
)
View Source
const (
	DesignIndentCol     = 0
	DesignFirstCol      = 4
	DesignSecondCol     = 5
	DesignTotalColCount = 6
)
View Source
const (
	APP_SCHEMA_ID              = "org.d2r2.gorsync"
	SETTINGS_SCHEMA_ID         = APP_SCHEMA_ID + "." + "Settings"
	SETTINGS_SCHEMA_PATH       = "/org/d2r2/gorsync/"
	PROFILE_SCHEMA_SUFFIX_ID   = "Profile"
	PROFILE_SCHEMA_SUFFIX_PATH = "profiles/%s"
	SOURCE_SCHEMA_SUFFIX_ID    = "Source"
	SOURCE_SCHEMA_SUFFIX_PATH  = "sources/%s"
)
View Source
const (
	CFG_IGNORE_FILE_SIGNATURE                          = "ignore-file-signature"
	CFG_RSYNC_RETRY_COUNT                              = "rsync-retry-count"
	CFG_MANAGE_AUTO_BACKUP_BLOCK_SIZE                  = "manage-automatically-backup-block-size"
	CFG_MAX_BACKUP_BLOCK_SIZE_MB                       = "max-backup-block-size-mb"
	CFG_ENABLE_USE_OF_PREVIOUS_BACKUP                  = "enable-use-of-previous-backup"
	CFG_NUMBER_OF_PREVIOUS_BACKUP_TO_USE               = "number-of-previous-backup-to-use"
	CFG_ENABLE_LOW_LEVEL_LOG_OF_RSYNC                  = "enable-low-level-log-for-rsync"
	CFG_ENABLE_INTENSIVE_LOW_LEVEL_LOG_OF_RSYNC        = "enable-intensive-low-level-log-for-rsync"
	CFG_RSYNC_TRANSFER_SOURCE_GROUP_INCONSISTENT       = "rsync-transfer-source-group-inconsistent"
	CFG_RSYNC_TRANSFER_SOURCE_GROUP                    = "rsync-transfer-source-group"
	CFG_RSYNC_TRANSFER_SOURCE_OWNER_INCONSISTENT       = "rsync-transfer-source-owner-inconsistent"
	CFG_RSYNC_TRANSFER_SOURCE_OWNER                    = "rsync-transfer-source-owner"
	CFG_RSYNC_TRANSFER_SOURCE_PERMISSIONS_INCONSISTENT = "rsync-transfer-source-permissions-inconsistent"
	CFG_RSYNC_TRANSFER_SOURCE_PERMISSIONS              = "rsync-transfer-source-permissions"
	CFG_RSYNC_RECREATE_SYMLINKS_INCONSISTENT           = "rsync-recreate-symlinks-inconsistent"
	CFG_RSYNC_RECREATE_SYMLINKS                        = "rsync-recreate-symlinks"
	CFG_RSYNC_TRANSFER_DEVICE_FILES_INCONSISTENT       = "rsync-transfer-device-files-inconsistent"
	CFG_RSYNC_TRANSFER_DEVICE_FILES                    = "rsync-transfer-device-files"
	CFG_RSYNC_TRANSFER_SPECIAL_FILES_INCONSISTENT      = "rsync-transfer-special-files-inconsistent"
	CFG_RSYNC_TRANSFER_SPECIAL_FILES                   = "rsync-transfer-special-files"
	CFG_RSYNC_COMPRESS_FILE_TRANSFER                   = "rsync-compress-file-transfer"
	CFG_BACKUP_LIST                                    = "profile-list"
	CFG_SOURCE_LIST                                    = "source-list"
	CFG_DONT_SHOW_ABOUT_ON_STARTUP                     = "dont-show-about-dialog-on-startup"
	CFG_UI_LANGUAGE                                    = "ui-language"
	CFG_SESSION_LOG_WIDGET_FONT_SIZE                   = "session-log-widget-font-size"
	CFG_PROFILE_NAME                                   = "profile-name"
	CFG_PROFILE_DEST_ROOT_PATH                         = "destination-root-path"
	CFG_MODULE_RSYNC_SOURCE_PATH                       = "rsync-source-path"
	CFG_MODULE_DEST_SUBPATH                            = "dest-subpath"
	CFG_MODULE_CHANGE_FILE_PERMISSION                  = "change-file-permission"
	CFG_MODULE_AUTH_PASSWORD                           = "auth-password"
	CFG_MODULE_ENABLED                                 = "source-dest-block-enabled"
	CFG_PERFORM_DESKTOP_NOTIFICATION                   = "perform-backup-completion-desktop-notification"
	CFG_RUN_NOTIFICATION_SCRIPT                        = "run-backup-completion-notification-script"
)
View Source
const (
	APP_LICENSE = `` /* 7651-byte string literal not displayed */

)

Variables

View Source
var IdleAdd = func(f interface{}, args ...interface{}) (glib.SourceHandle, error) {

	return glib.IdleAdd(f, args...)
}
View Source
var MustIdleAdd = func(f interface{}, args ...interface{}) {

	_, err := glib.IdleAdd(f, args...)
	if err != nil {
		lg.Fatalf("error creating call glib.IdleAdd: %v", err)
	}
}

Functions

func AddStyleClass added in v0.3.3

func AddStyleClass(widget *gtk.Widget, cssClass string) error

AddStyleClass apply specific CSS style class to the widget.

func AddStyleClasses added in v0.3.3

func AddStyleClasses(widget *gtk.Widget, cssClasses []string) error

AddStyleClasses apply specific CSS style classes to the widget.

func AdvancedPreferencesNew

func AdvancedPreferencesNew(appSettings *SettingsStore, prefRow *PreferenceRow) (*gtk.Container, error)

AdvancedPreferencesNew create preference dialog with "Advanced" page, where controls bound to GLib Setting object for save/restore functionality.

func AnimationImageFromAssetsNew

func AnimationImageFromAssetsNew(assetIconName string) (*gtk.Image, error)

func AnimationImageFromAssetsNewWithResize added in v0.3.3

func AnimationImageFromAssetsNewWithResize(assetIconName string,
	resizeToWidth, resizeToHeight int) (*gtk.Image, error)

func AppendSectionAsHorzButtons

func AppendSectionAsHorzButtons(main, section *glib.Menu) error

AppendSectionAsHorzButtons used for gtk.Popover widget menu as a hint to display items as a horizontal buttons.

func AppendValues

func AppendValues(ls *gtk.ListStore, values ...interface{}) (*gtk.TreeIter, error)

AppendValues append multiple values to a row in a list store.

func ApplyStyleCSS added in v0.3.3

func ApplyStyleCSS(widget *gtk.Widget, css string) error

ApplyStyleCSS apply custom CSS to specific widget.

func CheckSchemaSettingsIsInstalled

func CheckSchemaSettingsIsInstalled(settingsID string, app *gtk.Application, extraMsg *string) (bool, error)

CheckSchemaSettingsIsInstalled verify, that GLib Setting's schema is installed, otherwise return false.

func CreateAboutDialog

func CreateAboutDialog(appSettings *SettingsStore) (*gtk.AboutDialog, error)

CreateAboutDialog creates about dialog object.

func CreateApp

func CreateApp() (*gtk.Application, error)

CreateApp creates GtkApplication instance to run.

func CreateNameValueCombo

func CreateNameValueCombo(keyValues []struct{ value, key string }) (*gtk.ComboBox, error)

CreateNameValueCombo create a GtkComboBox that holds a set of name/value pairs where the name is displayed.

func CreatePreferenceDialog

func CreatePreferenceDialog(settingsID, settingsPath string, mainWin *gtk.ApplicationWindow,
	profileChanged func()) (*gtk.ApplicationWindow, error)

CreatePreferenceDialog creates multi-page preference dialog with save/restore functionality to/from the GLib Setting object.

func ErrorMessage

func ErrorMessage(parent *gtk.Window, titleMarkup string, text []*DialogParagraph) error

ErrorMessage build and run error message dialog.

func GeneralPreferencesNew

func GeneralPreferencesNew(win *gtk.ApplicationWindow, appSettings *SettingsStore,
	actions *glib.ActionMap, prefRow *PreferenceRow) (*gtk.Container, error)

GeneralPreferencesNew create preference dialog with "General" page, where controls being bound to GLib setting object to save/restore functionality.

func GetActionNameAndState

func GetActionNameAndState(act *glib.SimpleAction) (string, *glib.Variant, error)

GetActionNameAndState display status of action-with-state, which used in menu-with-state behavior. Convenient for debug purpose.

func GetActiveWindow

func GetActiveWindow(win *gtk.Window) (*gtk.Window, error)

GetActiveWindow find real active window in application running.

func GetBaseApplicationCSS added in v0.3.3

func GetBaseApplicationCSS() (string, error)

GetBaseApplicationCSS read from assets CSS file, which give UI styles used for customization of application interface.

func GetComboValue

func GetComboValue(cb *gtk.ComboBox, columnID int) (*glib.Value, error)

GetComboValue return GtkComboBox selected value from specific column.

func GetFolderNamesEmptyOrLeadingTrailingSpacesFoundRegexp added in v0.4.0

func GetFolderNamesEmptyOrLeadingTrailingSpacesFoundRegexp() (*regexp.Regexp, error)

func GetGdkVersion added in v0.3.3

func GetGdkVersion() (magor, minor, micro uint)

GetGdkVersion return actually installed GDK version.

func GetGlibVersion

func GetGlibVersion() (magor, minor, micro uint)

GetGlibVersion return actually installed GLIB version.

func GetGtkVersion

func GetGtkVersion() (magor, minor, micro uint)

GetGtkVersion return actually installed GTK+ version.

func GetLanguagePreference

func GetLanguagePreference() (string, error)

GetLanguagePreference reads application language preference customized by user.

func GetSubpathNotAllowedCharsNotFoundRegexp added in v0.4.0

func GetSubpathNotAllowedCharsNotFoundRegexp() (*regexp.Regexp, error)

GetSubpathNotAllowedCharsNotFoundRegexp implement path expression primitive validation on the level of lexical parcing. Understand path separator for different OS, taking path separator setting from runtime.

Use Microsoft Windows restriction character list taken from here: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names

Linux/Unix forbidden chars for folder names: / (forward slash)

Windows forbidden chars for folder names: < (less than) > (greater than) : (colon - sometimes works, but is actually NTFS Alternate Data Streams) " (double quote) / (forward slash) \ (backslash) | (vertical bar or pipe) ? (question mark) * (asterisk)

func ImageFromAssetsNew

func ImageFromAssetsNew(assetIconName string) (*gtk.Image, error)

func ImageFromAssetsNewWithResize added in v0.3.3

func ImageFromAssetsNewWithResize(assetIconName string, resizeToWidth, resizeToHeight int) (*gtk.Image, error)

func IsResponseCancel

func IsResponseCancel(response gtk.ResponseType) bool

IsResponseCancel gives true if dialog window responded with gtk.RESPONSE_CANCEL.

func IsResponseClose

func IsResponseClose(response gtk.ResponseType) bool

IsResponseClose gives true if dialog window responded with gtk.RESPONSE_CLOSE.

func IsResponseDeleteEvent

func IsResponseDeleteEvent(response gtk.ResponseType) bool

IsResponseDeleteEvent gives true if dialog window responded with gtk.RESPONSE_DELETE_EVENT.

func IsResponseNo

func IsResponseNo(response gtk.ResponseType) bool

IsResponseNo gives true if dialog window responded with gtk.RESPONSE_NO.

func IsResponseNone

func IsResponseNone(response gtk.ResponseType) bool

IsResponseNone gives true if dialog window responded with gtk.RESPONSE_NONE.

func IsResponseOk

func IsResponseOk(response gtk.ResponseType) bool

IsResponseOk gives true if dialog window responded with gtk.RESPONSE_OK.

func IsResponseReject

func IsResponseReject(response gtk.ResponseType) bool

IsResponseReject gives true if dialog window responded with gtk.RESPONSE_REJECT.

func IsResponseYes

func IsResponseYes(response gtk.ResponseType) bool

IsResponseYes gives true if dialog window responded with gtk.RESPONSE_YES.

func PixbufAnimationFromAssetsNew

func PixbufAnimationFromAssetsNew(assetIconName string) (*gdk.PixbufAnimation, error)

func PixbufAnimationFromAssetsNewWithResize added in v0.3.3

func PixbufAnimationFromAssetsNewWithResize(assetIconName string,
	resizeToWidth, resizeToHeight int) (*gdk.PixbufAnimation, error)

func PixbufFromAssetsNew

func PixbufFromAssetsNew(assetIconName string) (*gdk.Pixbuf, error)

func PixbufFromAssetsNewWithResize added in v0.3.3

func PixbufFromAssetsNewWithResize(assetIconName string,
	resizeToWidth, resizeToHeight int) (*gdk.Pixbuf, error)

func PrintDialogResponse

func PrintDialogResponse(response gtk.ResponseType)

PrintDialogResponse print and debug dialog response.

func ProfilePreferencesNew added in v0.3.3

func ProfilePreferencesNew(win *gtk.ApplicationWindow, appSettings *SettingsStore,
	validator *UIValidator, profileID string, prefRow *PreferenceRow,
	profileChanged func(), initProfileName *string) (*gtk.Container, string, error)

ProfilePreferencesNew create preference dialog with "Sources" page, where controls being bound to GLib Setting object to save/restore functionality.

func QuestionDialog

func QuestionDialog(parent *gtk.Window, title string,
	messages []*DialogParagraph, defaultYes bool) (bool, error)

QuestionDialog build and run question message dialog with Yes/No choice.

func RemoveStyleClass added in v0.3.3

func RemoveStyleClass(widget *gtk.Widget, cssClass string) error

RemoveStyleClass remove specific CSS style class from the widget.

func RemoveStyleClasses added in v0.3.3

func RemoveStyleClasses(widget *gtk.Widget, cssClasses []string) error

RemoveStyleClasses remove specific CSS style classes from the widget.

func RemoveStyleClassesAll added in v0.3.3

func RemoveStyleClassesAll(widget *gtk.Widget) error

RemoveStyleClassesAll remove all style classes from the widget.

func RestartTimer

func RestartTimer(timer *time.Timer, milliseconds time.Duration)

RestartTimer restart timer with call fire after specific millisecond period. Used as a trigger for validation events.

func RunDialog

func RunDialog(parent *gtk.Window, messageType gtk.MessageType, userHeaderbar bool,
	title string, paragraphs []*DialogParagraph, ignoreCloseBox bool, addButtons []DialogButton,
	addExtraControls func(area *gtk.Box) error) (gtk.ResponseType, error)

RunDialog construct and run Dialog widget with customized settings.

func SetAllMargins

func SetAllMargins(widget gtk.IWidget, margin int)

SetAllMargins set all margins of a widget to the same value.

func SetEntryIconWithAssetImage

func SetEntryIconWithAssetImage(entry *gtk.Entry, iconPos gtk.EntryIconPosition, assetIconName string) error

func SetMargins

func SetMargins(widget gtk.IWidget, left int, top int, right int, bottom int)

SetMargins set margins of a widget to the passed values, replacing 4 calls with only one.

func SetScrolledWindowPropogatedHeight

func SetScrolledWindowPropogatedHeight(sw *gtk.ScrolledWindow, propagate bool)

SetScrolledWindowPropogatedHeight compiled for GTK+ since 3.22 call corresponding GtkScrolledWindow method.

func SetupButtonWithAssetAnimationImage

func SetupButtonWithAssetAnimationImage(assetIconName string) (*gtk.Button, error)

func SetupButtonWithThemedImage

func SetupButtonWithThemedImage(themedIconName string) (*gtk.Button, error)

SetupButtonWithThemedImage construct Button widget with image taken by themedIconName from themed icons image lib.

func SetupDialog

func SetupDialog(parent *gtk.Window, messageType gtk.MessageType, userHeaderbar bool,
	title string, paragraphs []*DialogParagraph, addButtons []DialogButton,
	addExtraControls func(area *gtk.Box) error) (*gtk.Dialog, error)

SetupDialog construct Dialog widget with customized settings.

func SetupHeader

func SetupHeader(title, subtitle string, showCloseButton bool) (*gtk.HeaderBar, error)

SetupHeader construct Header widget with standard initialization.

func SetupLabelJustifyCenter added in v0.4.0

func SetupLabelJustifyCenter(caption string) (*gtk.Label, error)

SetupLabelJustifyCenter create GtkLabel with justification to the center by default.

func SetupLabelJustifyLeft added in v0.3.3

func SetupLabelJustifyLeft(caption string) (*gtk.Label, error)

SetupLabelJustifyLeft create GtkLabel with justification to the left by default.

func SetupLabelJustifyRight added in v0.3.3

func SetupLabelJustifyRight(caption string) (*gtk.Label, error)

SetupLabelJustifyRight create GtkLabel with justification to the right by default.

func SetupLabelMarkupJustifyCenter added in v0.4.0

func SetupLabelMarkupJustifyCenter(caption *Markup) (*gtk.Label, error)

SetupLabelMarkupJustifyCenter create GtkLabel with justification to the center by default.

func SetupLabelMarkupJustifyLeft added in v0.3.3

func SetupLabelMarkupJustifyLeft(caption *Markup) (*gtk.Label, error)

SetupLabelMarkupJustifyLeft create GtkLabel with justification to the left by default.

func SetupLabelMarkupJustifyRight added in v0.3.3

func SetupLabelMarkupJustifyRight(caption *Markup) (*gtk.Label, error)

SetupLabelMarkupJustifyRight create GtkLabel with justification to the right by default.

func SetupMenuButtonWithThemedImage

func SetupMenuButtonWithThemedImage(themedIconName string) (*gtk.MenuButton, error)

SetupMenuButtonWithThemedImage construct gtk.MenuButton widget with image taken by themedIconName from themed icons image lib.

func SetupMenuItemWithIcon

func SetupMenuItemWithIcon(label, detailedAction string, icon *glib.Icon) (*glib.MenuItem, error)

SetupMenuItemWithIcon construct MenuItem widget with icon image.

func SetupMenuItemWithThemedIcon

func SetupMenuItemWithThemedIcon(label, detailedAction, iconName string) (*glib.MenuItem, error)

SetupMenuItemWithThemedIcon construct MenuItem widget with image taken by iconName from themed icons image lib.

func SetupToolButton

func SetupToolButton(themedIconName, label string) (*gtk.ToolButton, error)

SetupToolButton construct ToolButton widget with standart initialization.

func ShowUri added in v0.3.2

func ShowUri(window *gtk.Window, uri string) error

func UpdateNameValueCombo

func UpdateNameValueCombo(cb *gtk.ComboBox, keyValues []struct{ value, key string }) error

UpdateNameValueCombo update GtkComboBox list of name/value pairs.

Types

type BackupCompletionType

type BackupCompletionType int

BackupCompletionType signify all possible states of backup session completion.

const (
	BackupFailed BackupCompletionType = iota
	BackupTerminated
	BackupSucessfullyCompleted
	BackupCompletedWithErrors
)

It could be 4 possible exit status: 1) backup failed (due to some issue recognized as critical); 2) backup terminated by user or by system request; 3) backup successfully completed without any issues; 4) backup completed, but some data are not backed up due to errors happened during backup process;

type BackupSessionStatus

type BackupSessionStatus struct {
	// contains filtered or unexported fields
}

BackupSessionStatus keeps contexts - live multi-thread processes, which life cycle should be controlled.

func NewBackupSessionStatus

func NewBackupSessionStatus(parent context.Context) *BackupSessionStatus

func (*BackupSessionStatus) Done

func (v *BackupSessionStatus) Done(ctx context.Context)

Done removes context from the pool of controlled threads.

func (*BackupSessionStatus) IsRunning

func (v *BackupSessionStatus) IsRunning() bool

IsRunning checks if any children threads are alive.

func (*BackupSessionStatus) Start

func (v *BackupSessionStatus) Start() *ContextPack

Start forks new context for parent thread.

func (*BackupSessionStatus) Stop

func (v *BackupSessionStatus) Stop()

Stop terminates all live thread's contexts.

type Binding

type Binding struct {
	Key      string
	Object   glib.IObject
	Property string
	Flags    glib.SettingsBindFlags
}

Binding cache link between Key string identifier and GLIB object property. Code partially taken from https://github.com/gnunn1/tilix project.

type BindingHelper

type BindingHelper struct {
	// contains filtered or unexported fields
}

BindingHelper is a bookkeeping class that keeps track of objects which are binded to a GSettings object so they can be unbinded later. it also supports the concept of deferred bindings where a binding can be added but is not actually attached to a Settings object until one is set.

func (*BindingHelper) Bind

func (v *BindingHelper) Bind(key string, object glib.IObject, property string, flags glib.SettingsBindFlags)

Bind add a binding to list and binds to Settings if it is set.

func (*BindingHelper) Clear

func (v *BindingHelper) Clear()

Clear unbind all bindings and clears list of bindings.

func (*BindingHelper) SetSettings

func (v *BindingHelper) SetSettings(value *SettingsStore)

SetSettings will replace underlying GLIB Settings object to unbind previously set bindings and re-bind to the new settings automatically.

func (*BindingHelper) Unbind

func (v *BindingHelper) Unbind()

Unbind all added binds from settings object.

type ContextPack

type ContextPack struct {
	Context context.Context
	Cancel  func()
}

ContextPack keeps cancellable context with its cancel function.

func ForkContext

func ForkContext(parent context.Context) *ContextPack

ForkContext create child context from the parent.

type ControlWithStatus added in v0.3.2

type ControlWithStatus struct {
	// contains filtered or unexported fields
}

ControlWithStatus wraps control to the box to attach extra status widget to the right. Status widget would be a error icon either spin control to show active process.

func NewControlWithStatus added in v0.3.2

func NewControlWithStatus(control *gtk.Widget) (*ControlWithStatus, error)

func (*ControlWithStatus) GetBox added in v0.3.2

func (v *ControlWithStatus) GetBox() *gtk.Box

func (*ControlWithStatus) ReplaceStatus added in v0.3.2

func (v *ControlWithStatus) ReplaceStatus(statusBox *gtk.Box)

type DialogButton

type DialogButton struct {
	Text      string
	Response  gtk.ResponseType
	Default   bool
	Customize func(button *gtk.Button) error
}

DialogButton simplify dialog window initialization. Keep all necessary information about how attached dialog button should look and act.

type DialogParagraph

type DialogParagraph struct {
	Text          string
	Markup        bool
	HorizAlign    gtk.Align
	Justify       gtk.Justification
	Ellipsize     pango.EllipsizeMode
	MaxWidthChars int
}

DialogParagraph is an object which keep text paragraph added to dialog window, complemented with all necessary format options.

func NewDialogParagraph

func NewDialogParagraph(text string) *DialogParagraph

NewDialogParagraph create new text paragraph instance, with default align, justification and so on.

func TextToDialogParagraphs

func TextToDialogParagraphs(lines []string) []*DialogParagraph

TextToDialogParagraphs multi-line text to DialogParagraph instance.

func TextToMarkupDialogParagraphs

func TextToMarkupDialogParagraphs(makrupLines []string) []*DialogParagraph

TextToMarkupDialogParagraphs multi-line markup text to DialogParagraph instance.

func (*DialogParagraph) SetEllipsize

func (v *DialogParagraph) SetEllipsize(ellipsize pango.EllipsizeMode) *DialogParagraph

SetEllipsize set text ellipsis mode.

func (*DialogParagraph) SetHorizAlign

func (v *DialogParagraph) SetHorizAlign(align gtk.Align) *DialogParagraph

SetHorizAlign set horizontal alignment of text paragraph.

func (*DialogParagraph) SetJustify

func (v *DialogParagraph) SetJustify(justify gtk.Justification) *DialogParagraph

SetJustify set text justification.

func (*DialogParagraph) SetMarkup added in v0.3.3

func (v *DialogParagraph) SetMarkup(markup bool) *DialogParagraph

SetMarkup update Markup flag.

func (*DialogParagraph) SetMaxWidthChars

func (v *DialogParagraph) SetMaxWidthChars(maxWidthChars int) *DialogParagraph

SetMaxWidthChars set maximum number of chars in one line.

type EmptySpaceRecover

type EmptySpaceRecover struct {
	// contains filtered or unexported fields
}

EmptySpaceRecover used to try to recover from RSYNC critical error, caused by out of space state. Main entry ErrorHook is trying heuristically identify out of space symptoms and then check free space size.

func (*EmptySpaceRecover) ErrorHook

func (v *EmptySpaceRecover) ErrorHook(err error, paths core.SrcDstPath, predictedSize *core.FolderSize,
	repeated int, retryLeft int) (newRetryLeft int, criticalError error)

ErrorHook is a main entry hook to recover from RSYNC out of space issue.

type GLibIdleCallStub added in v0.3.3

type GLibIdleCallStub struct {
	sync.Mutex
}

type GroupMap

type GroupMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

GroupMap gives thread-safe indexed dictionary, which allow manipulations in asynchronous mode. Store validator groups uniquely identified by group and index identifiers.

func GroupMapNew

func GroupMapNew() *GroupMap

func (*GroupMap) Add

func (v *GroupMap) Add(group, index string, ctxPack *ContextPack)

Add create new group identified by group+index identifiers. if not exists create, either return it.

func (*GroupMap) Get

func (v *GroupMap) Get(group, index string) (*ContextPack, bool)

Get return group context identified by group+index identifiers if exists.

func (*GroupMap) GetLock added in v0.3.3

func (v *GroupMap) GetLock(group string) *sync.Mutex

GetLock return lock object identified by group identifier.

func (*GroupMap) Remove

func (v *GroupMap) Remove(group, index string)

Remove delete group object identified by group+index identifiers.

type Markup

type Markup struct {
	// contains filtered or unexported fields
}

Markup keeps data to create and generate Pango Markup strings. Simplify construct of all corresponding format tags to translate calls to Pango Markup subsystem.

func NewMarkup

func NewMarkup(font MarkupFont, foreground MarkupColor, backround MarkupColor,
	left, right interface{}, spans ...*Markup) *Markup

NewMarkup create new markup object. Allows to create nested markup tags.

func (*Markup) String

func (v *Markup) String() string

String provide Stringer interface.

type MarkupColor

type MarkupColor int

MarkupColor is a flag to generate Pango Markup color attributes.

const (
	MARKUP_COLOR_ALICE_BLUE MarkupColor = iota
	MARKUP_COLOR_ANTIQUE_WHITE
	MARKUP_COLOR_AQUE
	MARKUP_COLOR_AQUAMARINE
	MARKUP_COLOR_AZURE
	MARKUP_COLOR_BEIGE
	MARKUP_COLOR_BISQUE
	MARKUP_COLOR_BLACK
	MARKUP_COLOR_BLANCHED_ALMOND
	MARKUP_COLOR_BLUE
	MARKUP_COLOR_BLUE_VIOLET
	MARKUP_COLOR_BROWN
	MARKUP_COLOR_BURLYWOOD
	MARKUP_COLOR_CADET_BLUE
	MARKUP_COLOR_CHARTREUSE
	MARKUP_COLOR_CHOCOLATE
	MARKUP_COLOR_CORAL
	MARKUP_COLOR_CORNFLOWER
	MARKUP_COLOR_CORNSILK
	MARKUP_COLOR_CRIMSON
	MARKUP_COLOR_CYAN
	MARKUP_COLOR_DARK_BLUE
	MARKUP_COLOR_DARK_CYAN
	MARKUP_COLOR_DARK_GOLDENROD
	MARKUP_COLOR_DARK_GRAY
	MARKUP_COLOR_DARK_GREEN
	MARKUP_COLOR_DARK_KHAKI
	MARKUP_COLOR_DARK_MAGENTA
	MARKUP_COLOR_DARK_OLIVE_GREEN
	MARKUP_COLOR_DARK_ORANGE
	MARKUP_COLOR_DARK_ORCHID
	MARKUP_COLOR_DARK_RED
	MARKUP_COLOR_DARK_SALMON
	MARKUP_COLOR_DARK_SEA_GREEN
	MARKUP_COLOR_DARK_SLATE_BLUE
	MARKUP_COLOR_DARK_SLATE_GRAY
	MARKUP_COLOR_DARK_TURQUOISE
	MARKUP_COLOR_DARK_VIOLET
	MARKUP_COLOR_DEEP_PINK
	MARKUP_COLOR_DEEP_SKY_BLUE
	MARKUP_COLOR_DIM_GRAY
	MARKUP_COLOR_DODGER_BLUE
	MARKUP_COLOR_FIREBRICK
	MARKUP_COLOR_FLORAL_WHITE
	MARKUP_COLOR_FOREST_GREEN
	MARKUP_COLOR_FUCHSIA
	MARKUP_COLOR_GAINSBORO
	MARKUP_COLOR_GHOST_WHITE
	MARKUP_COLOR_GOLD
	MARKUP_COLOR_GOLDENROD
	MARKUP_COLOR_GRAY
	MARKUP_COLOR_WEB_GRAY
	MARKUP_COLOR_GREEN
	MARKUP_COLOR_WEB_GREEN
	MARKUP_COLOR_GREEN_YELLOW
	MARKUP_COLOR_HONEYDEW
	MARKUP_COLOR_HOT_PINK
	MARKUP_COLOR_INDIAN_RED
	MARKUP_COLOR_INDIGO
	MARKUP_COLOR_IVORY
	MARKUP_COLOR_KHAKI
	MARKUP_COLOR_LAVENDER
	MARKUP_COLOR_LAVENDER_BLUSH
	MARKUP_COLOR_LAWN_GREEN
	MARKUP_COLOR_LEMON_CHIFFON
	MARKUP_COLOR_LIGHT_BLUE
	MARKUP_COLOR_LIGHT_CORAL
	MARKUP_COLOR_LIGHT_CYAN
	MARKUP_COLOR_LIGHT_GOLDENROD
	MARKUP_COLOR_LIGHT_GRAY
	MARKUP_COLOR_LIGHT_GREEN
	MARKUP_COLOR_LIGHT_PINK
	MARKUP_COLOR_LIGHT_SALMON
	MARKUP_COLOR_LIGHT_SEA_GREEN
	MARKUP_COLOR_LIGHT_SKY_BLUE
	MARKUP_COLOR_LIGHT_SLATE_GRAY
	MARKUP_COLOR_LIGHT_STEEL_BLUE
	MARKUP_COLOR_LIGHT_YELLOW
	MARKUP_COLOR_LIME
	MARKUP_COLOR_LIME_GREEN
	MARKUP_COLOR_LINEN
	MARKUP_COLOR_MAGENTA
	MARKUP_COLOR_MAROON
	MARKUP_COLOR_WEB_MAROON
	MARKUP_COLOR_MEDIUM_AQUAMARINE
	MARKUP_COLOR_MEDIUM_BLUE
	MARKUP_COLOR_MEDIUM_ORCHID
	MARKUP_COLOR_MEDIUM_PURPLE
	MARKUP_COLOR_MEDIUM_SEA_GREEN
	MARKUP_COLOR_MEDIUM_SLATE_BLUE
	MARKUP_COLOR_MEDIUM_SPRING_GREEN
	MARKUP_COLOR_MEDIUM_TURQUOISE
	MARKUP_COLOR_MEDIUM_VIOLET_RED
	MARKUP_COLOR_MIDNIGHT_BLUE
	MARKUP_COLOR_MINT_CREAM
	MARKUP_COLOR_MISTY_ROSE
	MARKUP_COLOR_MOCCASIN
	MARKUP_COLOR_NAVAJO_WHITE
	MARKUP_COLOR_NAVY_BLUE
	MARKUP_COLOR_OLD_LACE
	MARKUP_COLOR_OLIVE
	MARKUP_COLOR_OLIVE_DRAB
	MARKUP_COLOR_ORANGE
	MARKUP_COLOR_ORANGE_RED
	MARKUP_COLOR_ORCHID
	MARKUP_COLOR_PALE_GOLDENROD
	MARKUP_COLOR_PALE_GREEN
	MARKUP_COLOR_PALE_TURQUOISE
	MARKUP_COLOR_PALE_VIOLET_RED
	MARKUP_COLOR_PAPAYA_WHIP
	MARKUP_COLOR_PEACH_PUFF
	MARKUP_COLOR_PERU
	MARKUP_COLOR_PINK
	MARKUP_COLOR_PLUM
	MARKUP_COLOR_POWDER_BLUE
	MARKUP_COLOR_PURPLE
	MARKUP_COLOR_WEB_PURPLE
	MARKUP_COLOR_REBECCA_PURPLE
	MARKUP_COLOR_RED
	MARKUP_COLOR_ROSY_BROWN
	MARKUP_COLOR_ROYAL_BLUE
	MARKUP_COLOR_SADDLE_BROWN
	MARKUP_COLOR_SALMON
	MARKUP_COLOR_SANDY_BROWN
	MARKUP_COLOR_SEA_GREEN
	MARKUP_COLOR_SEASHELL
	MARKUP_COLOR_SIENNA
	MARKUP_COLOR_SILVER
	MARKUP_COLOR_SKY_BLUE
	MARKUP_COLOR_SLATE_BLUE
	MARKUP_COLOR_SLATE_GRAY
	MARKUP_COLOR_SNOW
	MARKUP_COLOR_SPRING_GREEN
	MARKUP_COLOR_STEEL_BLUE
	MARKUP_COLOR_TAN
	MARKUP_COLOR_TEAL
	MARKUP_COLOR_THISTLE
	MARKUP_COLOR_TOMATO
	MARKUP_COLOR_TURQUOISE
	MARKUP_COLOR_VIOLET
	MARKUP_COLOR_WHEAT
	MARKUP_COLOR_WHITE
	MARKUP_COLOR_WHITE_SMOKE
	MARKUP_COLOR_YELLOW
	MARKUP_COLOR_YELLOW_GREEN
)

Colors taken from: https://en.wikipedia.org/wiki/X11_color_names

func (MarkupColor) String

func (v MarkupColor) String() string

String provide Stringer interface.

type MarkupFont

type MarkupFont int64

MarkupFont is a bitmask to generate Pango Markup font attributes. Read: https://developer.gnome.org/pango/stable/PangoMarkupFormat.html

const (
	// Pango Font Size
	MARKUP_SIZE_XX_SMALL MarkupFont = 1 << iota
	MARKUP_SIZE_X_SMALL
	MARKUP_SIZE_SMALL
	MARKUP_SIZE_MEDIUM
	MARKUP_SIZE_LARGE
	MARKUP_SIZE_X_LARGE
	MARKUP_SIZE_XX_LARGE
	MARKUP_SIZE_SMALLER
	MARKUP_SIZE_LARGER
	// Pango Font Style
	MARKUP_STYLE_NORMAL
	MARKUP_STYLE_OBLIQUE
	MARKUP_STYLE_ITALIC
	// Pango Font Weight
	MARKUP_WEIGHT_ULTRALIGHT
	MARKUP_WEIGHT_LIGHT
	MARKUP_WEIGHT_NORMAL
	MARKUP_WEIGHT_BOLD
	MARKUP_WEIGHT_ULTRABOLD
	MARKUP_WEIGHT_HEAVY
	// Pango Font Variant
	MARKUP_VARIANT_NORMAL
	MARKUP_VARIANT_SMALLCAPS
	// Pango Font Stretch
	MARKUP_STRETCH_ULTRACONDENSED
	MARKUP_STRETCH_EXTRACONDENSED
	MARKUP_STRETCH_CONDENSED
	MARKUP_STRETCH_SEMICONDENSED
	MARKUP_STRETCH_NORMAL
	MARKUP_STRETCH_SEMIEXPANDED
	MARKUP_STRETCH_EXPANDED
	MARKUP_STRETCH_EXTRAEXPANDED
	MARKUP_STRETCH_ULTRAEXPANDED
)

Read: https://developer.gnome.org/pango/stable/PangoMarkupFormat.html

func (MarkupFont) String

func (v MarkupFont) String() string

String provide Stringer interface.

type MessageDialog added in v0.3.3

type MessageDialog struct {
	// contains filtered or unexported fields
}

func SetupMessageDialog

func SetupMessageDialog(parent *gtk.Window, markupTitle string, secondaryMarkupTitle string,
	paragraphs []*DialogParagraph, addButtons []DialogButton,
	addExtraControls func(area *gtk.Box) error) (*MessageDialog, error)

SetupMessageDialog construct MessageDialog widget with customized settings.

func (*MessageDialog) Run added in v0.3.3

func (v *MessageDialog) Run(ignoreCloseBox bool) gtk.ResponseType

Run run MessageDialog widget with customized settings.

type NotifierUI

type NotifierUI struct {
	// contains filtered or unexported fields
}

NotifierUI is an object, than bind backup process notifications with application GUI controls.

func NewNotifierUI

func NewNotifierUI(profileName string, gridUI *gtk.Grid) *NotifierUI

func (*NotifierUI) ClearProgressGrid

func (v *NotifierUI) ClearProgressGrid() error

ClearProgressGrid remove and delete GTK widgets containing information about previous backup session.

func (*NotifierUI) CreateProgressControls

func (v *NotifierUI) CreateProgressControls(sessionLogFontSize string) error

CreateProgressControls create GTK widgets which will indicate backup session progress.

func (*NotifierUI) Done

func (v *NotifierUI) Done() chan struct{}

func (*NotifierUI) NotifyBackupStage_FolderDoneBackup

func (v *NotifierUI) NotifyBackupStage_FolderDoneBackup(rootDest string,
	paths core.SrcDstPath, backupType core.FolderBackupType,
	leftToBackup core.FolderSize, sizeDone core.SizeProgress,
	timePassed time.Duration, eta *time.Duration,
	sessionErr error) error

NotifyBackupStage_FolderDoneBackup implements core.BackupNotifier interface method. Called by backup process when next piece of data backup ended.

func (*NotifierUI) NotifyBackupStage_FolderStartBackup

func (v *NotifierUI) NotifyBackupStage_FolderStartBackup(rootDest string,
	paths core.SrcDstPath, backupType core.FolderBackupType,
	leftToBackup core.FolderSize,
	timePassed time.Duration, eta *time.Duration) error

NotifyBackupStage_FolderStartBackup implements core.BackupNotifier interface method. Called by backup process when next piece of data backup started.

func (*NotifierUI) NotifyPlanStage_NodeStructureDoneInquiry

func (v *NotifierUI) NotifyPlanStage_NodeStructureDoneInquiry(sourceID int,
	sourceRsync string, dir *core.Dir) error

NotifyPlanStage_NodeStructureDoneInquiry implements core.BackupNotifier interface method.

func (*NotifierUI) NotifyPlanStage_NodeStructureStartInquiry

func (v *NotifierUI) NotifyPlanStage_NodeStructureStartInquiry(sourceID int,
	sourceRsync string) error

NotifyPlanStage_NodeStructureStartInquiry implements core.BackupNotifier interface method.

func (*NotifierUI) ReportCompletion

func (v *NotifierUI) ReportCompletion(progress float32, err error,
	backupProgress *backup.Progress, async bool)

reportCompletion updates backup process state and progress bar status.

func (*NotifierUI) ScrollView

func (v *NotifierUI) ScrollView() error

ScrollView scroll down multiline GTK widget, which keep backup session log data, to show the most recent line.

func (*NotifierUI) UpdateBackupProgress

func (v *NotifierUI) UpdateBackupProgress(progress *float32,
	progressStr string, fromAsync bool) error

UpdateBackupProgress updates visual progress of backup with status and percent progresses.

func (*NotifierUI) UpdateTextViewLog

func (v *NotifierUI) UpdateTextViewLog(line string) error

UpdateTextViewLog add log line to the end of Session Log GTK widget.

type OutOfSpaceResponse

type OutOfSpaceResponse int

OutOfSpaceResponse denote response from RSYNC out of space dialog query.

const (
	OutOfSpaceRetry OutOfSpaceResponse = iota
	OutOfSpaceIgnore
	OutOfSpaceTerminate
)

3 response type from RSYNC out of space dialog query: 1) retry RSYNC failed call; 2) ignore RSYNC filed call, but continue backup process; 3) immediately terminate backup process.

type PreferenceRow

type PreferenceRow struct {
	sync.RWMutex
	ID string

	Title          string
	Row            *gtk.ListBoxRow
	Container      *gtk.Box
	Label          *gtk.Label
	Icon           *gtk.Image
	Page           *gtk.Container
	Profile        bool
	RestartService *RestartService
	RsyncSources   map[uintptr]*RsyncSource
	Errors         map[uintptr]ProfileStatus
	// contains filtered or unexported fields
}

PreferenceRow keeps extra data globally for each page over multi-page preference dialog. In some cases implement some kind of DOM support to enable/disable controls, show statuses, etc.

func PreferenceRowNew

func PreferenceRowNew(id, title string, page *gtk.Container,
	profile, restartService bool) (*PreferenceRow, error)

PreferenceRowNew instantiate new PreferenceRow object.

func (*PreferenceRow) ActivateRestartService added in v0.4.0

func (v *PreferenceRow) ActivateRestartService(activate bool) error

ActivateRestartService show/hide restart command panel located at the top of the form.

func (*PreferenceRow) AddStatus added in v0.3.3

func (v *PreferenceRow) AddStatus(sourceID uintptr,
	status ProfileStatusState, description string) error

AddStatus add error status to the list box item.

func (*PreferenceRow) EnableDisableDeleteButtonsAndRecalculateIndexes added in v0.4.0

func (v *PreferenceRow) EnableDisableDeleteButtonsAndRecalculateIndexes()

EnableDisableDeleteButtonsAndRecalculateIndexes enable/dsiable delete button for RSYNC module (doesn't allow to delete last module). Additionally recalculate module's indexes

func (*PreferenceRow) GetLastRsyncModuleIndex added in v0.4.0

func (v *PreferenceRow) GetLastRsyncModuleIndex() int

GetLastRsyncModuleIndex extract maximum Index field value, that exists for RSYNC modules in this specific backup profile.

func (*PreferenceRow) GetName

func (v *PreferenceRow) GetName() string

GetName get name.

func (*PreferenceRow) RemoveStatus added in v0.3.3

func (v *PreferenceRow) RemoveStatus(sourceID uintptr) error

RemoveStatus removes error status from the list box item.

func (*PreferenceRow) SetName

func (v *PreferenceRow) SetName(name string)

SetName set profile name as a template "Profile(<name>)"

type PreferenceRowList

type PreferenceRowList struct {
	// contains filtered or unexported fields
}

PreferenceRowList keep a link between GtkListBoxRow and specific PreferenceRow object.

func PreferenceRowListNew

func PreferenceRowListNew() *PreferenceRowList

func (*PreferenceRowList) Append

func (v *PreferenceRowList) Append(row *PreferenceRow)

func (*PreferenceRowList) Delete

func (v *PreferenceRowList) Delete(rowID uintptr)

func (*PreferenceRowList) Get

func (v *PreferenceRowList) Get(rowID uintptr) *PreferenceRow

func (*PreferenceRowList) GetLastProfileListIndex

func (v *PreferenceRowList) GetLastProfileListIndex() int

func (*PreferenceRowList) GetProfileCount

func (v *PreferenceRowList) GetProfileCount() int

func (*PreferenceRowList) GetProfiles

func (v *PreferenceRowList) GetProfiles() []*PreferenceRow

type ProfileObjects added in v0.3.2

type ProfileObjects struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ProfileObjects keeps main form controls and settings in one place to pass to the functions as single parameter.

func (*ProfileObjects) CheckAndClearReselect added in v0.3.2

func (v *ProfileObjects) CheckAndClearReselect() bool

func (*ProfileObjects) PerformBackupPlanStage added in v0.3.2

func (v *ProfileObjects) PerformBackupPlanStage(ctx *ContextPack, supplimentary *RunningContexts,
	config *backup.Config, modules []backup.Module, cbProfile *gtk.ComboBox) error

func (*ProfileObjects) SetReselect added in v0.3.2

func (v *ProfileObjects) SetReselect()

type ProfileStatus added in v0.3.3

type ProfileStatus struct {
	Status      ProfileStatusState
	Description string
}

type ProfileStatusState added in v0.3.3

type ProfileStatusState int

ProfileStatusState is used to denote profile validating status.

const (
	ProfileStatusNone ProfileStatusState = 1 << iota
	ProfileStatusValidating
	ProfileStatusError
)

type ProgressBarManage

type ProgressBarManage struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ProgressBarManage simplify setting up GtkProgressBar to pulse either progress mode.

func NewProgressBarManage

func NewProgressBarManage(pb *gtk.ProgressBar) *ProgressBarManage

func (*ProgressBarManage) AddProgressBarStyleClass added in v0.3.3

func (v *ProgressBarManage) AddProgressBarStyleClass(cssClass string) error

func (*ProgressBarManage) RemoveProgressBarStyleClass added in v0.3.3

func (v *ProgressBarManage) RemoveProgressBarStyleClass(cssClass string) error

func (*ProgressBarManage) SetFraction

func (v *ProgressBarManage) SetFraction(value float64) error

func (*ProgressBarManage) StartPulse

func (v *ProgressBarManage) StartPulse()

func (*ProgressBarManage) StopPulse

func (v *ProgressBarManage) StopPulse()

type RestartService added in v0.4.0

type RestartService struct {
	Revealer *gtk.Revealer
}

type RsyncSource added in v0.4.0

type RsyncSource struct {
	// Keep delete RSYNC source module button
	// to enable/disable it, depending on module count.
	DeleteBtn *gtk.Button
	IndexLbl  *gtk.Label
	Index     int
}

type RunningContexts

type RunningContexts struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RunningContexts keeps all contexts of currently started services, preliminary added to the list, which we would like to control, tracking and managing their states. All methods of RunningContexts type are thread-safe.

func (*RunningContexts) AddContext

func (v *RunningContexts) AddContext(pack *ContextPack)

AddContext add new service to track.

func (*RunningContexts) CancelAll

func (v *RunningContexts) CancelAll()

CancelAll cancel all services in the list.

func (*RunningContexts) CancelContext

func (v *RunningContexts) CancelContext(ctx context.Context)

CancelContext cancel service from the list.

func (*RunningContexts) FindContext

func (v *RunningContexts) FindContext(ctx context.Context) *ContextPack

FindContext finds service by context object.

func (*RunningContexts) GetCount

func (v *RunningContexts) GetCount() int

GetCount returns number of services in the list to control.

func (*RunningContexts) RemoveContext

func (v *RunningContexts) RemoveContext(ctx context.Context)

RemoveContext remove service from the list.

type SettingsArray

type SettingsArray struct {
	// contains filtered or unexported fields
}

SettingsArray is a way how to create multiple (indexed) GLib setting's group based on single schema. For instance, multiple backup profiles with identical settings inside of each profile.

func (*SettingsArray) AddNode

func (v *SettingsArray) AddNode() (nodeID string, err error)

AddNode add specific indexed glib.Settings identified by returned nodeID.

func (*SettingsArray) DeleteNode

func (v *SettingsArray) DeleteNode(childStore *SettingsStore, nodeID string) error

DeleteNode delete specific indexed glib.Settings defined by nodeID.

func (*SettingsArray) GetArrayIDs

func (v *SettingsArray) GetArrayIDs() []string

GetArrayIDs return identifiers of glib.Settings with common schema, which can be accessed using id from the list.

type SettingsStore added in v0.3.3

type SettingsStore struct {
	// contains filtered or unexported fields
}

SettingsStore simplify work with glib.Settings.

func NewSettingsStore added in v0.3.3

func NewSettingsStore(schemaID string, path string, changed func()) (*SettingsStore, error)

NewSettingsStore create new SettingsStore object - wrapper on glib.Settings.

func (*SettingsStore) GetChildSettingsStore added in v0.3.3

func (v *SettingsStore) GetChildSettingsStore(suffixSchemaID string, suffixPath string,
	changed func()) (*SettingsStore, error)

GetChildSettingsStore generate child glib.Settings object to manipulate with nested scheme.

func (*SettingsStore) GetSchema added in v0.3.3

func (v *SettingsStore) GetSchema() (*glib.SettingsSchema, error)

GetSchema obtains glib.SettingsSchema from glib.Settings.

func (*SettingsStore) NewBindingHelper added in v0.3.3

func (v *SettingsStore) NewBindingHelper() *BindingHelper

NewBindingHelper creates new BindingHelper object.

func (*SettingsStore) NewSettingsArray added in v0.3.3

func (v *SettingsStore) NewSettingsArray(arrayID string) *SettingsArray

NewSettingsArray creates new SettingsArray, to keep/add/delete new indexed glib.Settings object based on single schema.

type UIValidator

type UIValidator struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

UIValidator simplify GTK UI validation process mixing synchronized and asynchronous calls, which all together does not freeze GTK UI, providing beautiful GTK UI response. UIValidator is a thread-safe (except cases when you need update GtkWidget components - you must be careful in such circumstances).

func UIValidatorNew

func UIValidatorNew(parent context.Context) *UIValidator

func (*UIValidator) AddEntry

func (v *UIValidator) AddEntry(group, index string, init ValidatorInit, run ValidatorRun,
	end ValidatorEnd, data ...interface{}) int

AddEntry creates new validating process with specific groupID and subGroupID identifiers. Provide additionally 3 callback methods: to initialize, to run and to finalize validation.

func (*UIValidator) CancelAll

func (v *UIValidator) CancelAll()

CancelAll cancel all pending processes if running.

func (*UIValidator) CancelValidates added in v0.3.3

func (v *UIValidator) CancelValidates(group, index string)

CancelValidates cancel processes identified by group + index identifiers, if running.

func (*UIValidator) GetCount

func (v *UIValidator) GetCount() int

GetCount return number of validating processes.

func (*UIValidator) RemoveEntry

func (v *UIValidator) RemoveEntry(key int)

RemoveEntry remove validating process via index key.

func (*UIValidator) Validate

func (v *UIValidator) Validate(group, index string) error

Validate is a main entry point to start validation process for specific group. Validate process trigger next strictly sequential steps: 1) Call "init validation" custom function in synchronous context. So, it's safe to update GTK+ widgets here. 2) Call "run validation" custom function in asynchronous context. You should never update GTK+ widgets here (you can read widgets), but might run long-term operations here (for instance run some external application). 3) Call "finalize validation" custom function in asynchronous context. You can update GTK+ widgets here, if you wrap code there with glib.IdleAdd() function from GOTK+ library to synchronize with GTK+ context.

type ValidatorData

type ValidatorData struct {
	Items []interface{}
}

ValidatorData is an array of arbitrary data used to pass to the validation process.

type ValidatorEnd

type ValidatorEnd func(groupLock *sync.Mutex, data *ValidatorData, results []interface{}) error

ValidatorEnd finalize validation process with next characteristics: - Asynchronous call. - Should take a limited time to execute. - GTK+ widgets might be updated here, if you wrap calls to glib.IdleAdd method.

type ValidatorEntry

type ValidatorEntry struct {
	Data *ValidatorData
	// contains filtered or unexported fields
}

ValidatorEntry stores validation data all together, including 3-step validation process (initialize, run, finalize).

type ValidatorInit

type ValidatorInit func(data *ValidatorData, group []*ValidatorData) error

ValidatorInit initialize validation process with next attributes: - Synchronous call. - Should take a limited time to execute. - Allowed to updated GTK+ widgets.

type ValidatorRun

type ValidatorRun func(groupLock *sync.Mutex, ctx context.Context, data *ValidatorData,
	group []*ValidatorData) ([]interface{}, error)

ValidatorRun run validation process with next characteristics: - Asynchronous call. - Can take long time to run. - GTK+ widgets should not be updated here (read only allowed).

Jump to

Keyboard shortcuts

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