TABLE OF CONTENTS
- 1. Hunter/Preferences
- 1.1. Preferences/Settings_Data
- 1.2. Preferences/PreferencesPopup
- 1.3. Preferences/Settings
- 1.4. Preferences/CreatePreferences
- 1.5. Preferences/LoadSettings
- 1.6. Preferences/SavePreferences
- 1.7. Preferences/SetAutoClose
- 1.8. Preferences/SetAutoRefresh
- 1.9. Preferences/SetClearTrash
- 1.10. Preferences/SetColorText
- 1.11. Preferences/SetColorTheme
- 1.12. Preferences/SetDeleteFiles
- 1.13. Preferences/SetDeleteTooltip
- 1.14. Preferences/SetLastModified
- 1.15. Preferences/SetOverwrite
- 1.16. Preferences/SetScaleImages
- 1.17. Preferences/SetShowFinished
- 1.18. Preferences/SetShowHidden
- 1.19. Preferences/SetShowPreview
- 1.20. Preferences/SetStayInOld
- 1.21. Preferences/SetToolbarsOnTop
- 1.22. Preferences/TogglePreferences
Hunter/Preferences [ Packages ]
FUNCTION
Provide code for save/restore and manipulate the program settings
SOURCE
package Preferences is
Preferences/Settings_Data [ Types ]
[ Top ] [ Preferences ] [ Types ]
FUNCTION
Data structure to the program settings
SOURCE
type Settings_Data is record ShowHidden: Boolean; ShowLastModified: Boolean; ScaleImages: Boolean; AutoCloseMessagesTime: Natural; WindowWidth: Positive; WindowHeight: Positive; ShowPreview: Boolean; StayInOld: Boolean; ColorText: Boolean; ColorTheme: Unbounded_String; DeleteFiles: Boolean; ClearTrashOnExit: Boolean; ShowFinishedInfo: Boolean; OverwriteOnExist: Boolean; ToolbarsOnTop: Boolean; AutoRefreshInterval: Natural; end record;
OPTIONS
ShowHidden - If true, show hidden files ShowLastModified - If true, show column with last modification time on files list ScaleImages - If true, scale images in preview AutoCloseMessagesTime - Amount of seconds after which current message will be auto hidden WindowWidth - Width of the main window in pixels WindowHeight - Height of the main window in pixels ShowPreview - If true, show preview panel for files and directories StayInOld - If true, after copying, moving files and directories or creating new link, stay in old directory instead of going to the destination directory. ColorText - If true, try color syntax in text files in preview ColorTheme - Selected by user color theme for coloring syntax in text files in preview DeleteFiles - If true, delete file and directories instead of moving them to trash ClearTrashOnExit - Clear trash on quit from the program ShowFinishedInfo - If true, show info about finished copying, moving deleting files and directories OverwriteOnExist - If true, copied or moved file or directory will be overwritting existing with that same name ToolbarsOnTop - If true, toolbars for actions and information will be show on the top of the window. Otherwise toolbar action will be on the left and toolbar with information will be on the right AutoRefreshInterval - How often, in seconds, auto refresh should be triggered
Preferences/PreferencesPopup [ Variables ]
[ Top ] [ Preferences ] [ Variables ]
FUNCTION
The preferences Gtk_Popover "window"
SOURCE
PreferencesPopup: Gtk_Popover;
Preferences/Settings [ Variables ]
[ Top ] [ Preferences ] [ Variables ]
FUNCTION
The program settings
SOURCE
Settings: Settings_Data;
Preferences/CreatePreferences [ Subprograms ]
[ Top ] [ Preferences ] [ Subprograms ]
FUNCTION
Create preferences UI and fill it with data from the program settings
SOURCE
procedure CreatePreferences(Parent: Gtk_Widget);
PARAMETERS
Parent - Gtk_Widget which will be parent for the preferences window. Should be always button for preferences.
Preferences/SavePreferences [ Subprograms ]
[ Top ] [ Preferences ] [ Subprograms ]
FUNCTION
Save the program preferences to the file.
SOURCE
procedure SavePreferences;
Preferences/SetDeleteTooltip [ Subprograms ]
[ Top ] [ Preferences ] [ Subprograms ]
FUNCTION
Set tooltip for delete button, depends did delete action delete files or move them to trash
SOURCE
procedure SetDeleteTooltip;