![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define FM_CONFIG_DEFAULT_AUTO_SELECTION_DELAY #define FM_CONFIG_DEFAULT_BACKUP_HIDDEN #define FM_CONFIG_DEFAULT_BIG_ICON_SIZE #define FM_CONFIG_DEFAULT_CONFIRM_DEL #define FM_CONFIG_DEFAULT_CONFIRM_TRASH #define FM_CONFIG_DEFAULT_DEFER_CONTENT_TEST #define FM_CONFIG_DEFAULT_FORCE_S_NOTIFY #define FM_CONFIG_DEFAULT_NO_EXPAND_EMPTY #define FM_CONFIG_DEFAULT_NO_USB_TRASH #define FM_CONFIG_DEFAULT_ONLY_USER_TEMPLATES #define FM_CONFIG_DEFAULT_PANE_ICON_SIZE #define FM_CONFIG_DEFAULT_PLACES_APPLICATIONS #define FM_CONFIG_DEFAULT_PLACES_COMPUTER #define FM_CONFIG_DEFAULT_PLACES_DESKTOP #define FM_CONFIG_DEFAULT_PLACES_HOME #define FM_CONFIG_DEFAULT_PLACES_NETWORK #define FM_CONFIG_DEFAULT_PLACES_ROOT #define FM_CONFIG_DEFAULT_PLACES_TRASH #define FM_CONFIG_DEFAULT_PLACES_UNMOUNTED #define FM_CONFIG_DEFAULT_QUICK_EXEC #define FM_CONFIG_DEFAULT_SHADOW_HIDDEN #define FM_CONFIG_DEFAULT_SHOW_FULL_NAMES #define FM_CONFIG_DEFAULT_SHOW_THUMBNAIL #define FM_CONFIG_DEFAULT_SINGLE_CLICK #define FM_CONFIG_DEFAULT_SMALL_ICON_SIZE #define FM_CONFIG_DEFAULT_SMART_DESKTOP_AUTODROP #define FM_CONFIG_DEFAULT_TEMPL_TYPE_ONCE #define FM_CONFIG_DEFAULT_TEMPLATE_RUN_APP #define FM_CONFIG_DEFAULT_THUMBNAIL_LOCAL #define FM_CONFIG_DEFAULT_THUMBNAIL_MAX #define FM_CONFIG_DEFAULT_THUMBNAIL_SIZE #define FM_CONFIG_DEFAULT_USE_TRASH #define FM_CONFIG_TYPE struct FmConfig; struct FmConfigClass; enum FmDndDestDropAction; extern FmConfig* fm_config; void fm_config_emit_changed (FmConfig *cfg
,const char *changed_key
); void fm_config_load_from_file (FmConfig *cfg
,const char *name
); void fm_config_load_from_key_file (FmConfig *cfg
,GKeyFile *kf
); FmConfig * fm_config_new (void
); void fm_config_save (FmConfig *cfg
,const char *name
);
include
: libfm/fm.h
The FmConfig represents basic configuration options that are used by libfm classes and methods. Methods of class FmConfig allow use either default file (~/.config/libfm/libfm.conf) or another one to load the configuration and to save it.
struct FmConfig { char* terminal; char* archiver; gint big_icon_size; gint small_icon_size; gint pane_icon_size; gint thumbnail_size; gint thumbnail_max; gint auto_selection_delay; gint drop_default_action; gboolean single_click; gboolean use_trash; gboolean confirm_del; gboolean confirm_trash; gboolean show_thumbnail; gboolean thumbnail_local; gboolean show_internal_volumes; gboolean si_unit; gboolean advanced_mode; gboolean force_startup_notify; gboolean backup_as_hidden; gboolean no_usb_trash; gboolean no_child_non_expandable; gboolean show_full_names; gboolean shadow_hidden; gboolean places_home; gboolean places_desktop; gboolean places_applications; gboolean places_trash; gboolean places_root; gboolean places_computer; gboolean places_network; gboolean places_unmounted; gboolean only_user_templates; gboolean template_run_app; gboolean template_type_once; gboolean defer_content_test; gboolean quick_exec; gchar **modules_blacklist; gchar **modules_whitelist; gchar *list_view_size_units; gchar *format_cmd; gboolean smart_desktop_autodrop; gchar *saved_search; };
command line to launch terminal emulator | |
desktop_id of the archiver used | |
size of big icons | |
size of small icons | |
size of side pane icons | |
size of thumbnail icons | |
show thumbnails for files smaller than 'thumb_max' KB | |
(since 1.2.0) delay for autoselection in single-click mode, in ms | |
(since 1.2.0) default action on drop (see FmDndDestDropAction) | |
single click to open file | |
delete file to trash can | |
ask before deleting files | |
(since 1.2.0) ask before moving files to trash can | |
show thumbnails | |
show thumbnails for local files only | |
show system internal volumes in side pane. (udisks-only) | |
use SI prefix for file sizes | |
enable advanced features for experienced user | |
(since 1.0.1) use startup notify by default | |
(since 1.0.1) treat backup files as hidden | |
(since 1.0.1) don't create trash folder on removable media | |
(since 1.0.1) hide expanders on empty folder | |
(since 1.2.0) always show full names in Icon View mode | |
(since 1.2.0) show icons of hidden files shadowed in the view | |
(since 1.2.0) show 'Home' item in Places | |
(since 1.2.0) show 'Desktop' item in Places | |
(since 1.2.0) show 'Applications' item in Places | |
(since 1.2.0) show 'Trash' item in Places | |
(since 1.2.0) show '/' item in Places | |
(since 1.2.0) show 'My computer' item in Places | |
(since 1.2.0) show 'Network' item in Places | |
(since 1.2.0) show unmounted internal volumes in Places | |
(since 1.2.0) show only user defined templates in 'Create...' menu | |
(since 1.2.0) run default application after creation from template | |
(since 1.2.0) use only one template of each MIME type | |
(since 1.2.0) defer test for content type on folder loading | |
(since 1.2.0) don't ask user for action on executable launch | |
(since 1.2.0) list of modules (mask in form "type:name") to never load | |
(since 1.2.0) list of excemptions from modules_blacklist
|
|
(since 1.2.0) file size units in list view: h, k, M, G | |
(since 1.2.0) command to format the volume (device will be added) | |
(since 1.2.0) enable "smart shortcut" auto-action for ~/Desktop | |
(since 1.2.0) internal saved data of fm_launch_search_simple()
|
struct FmConfigClass { GObjectClass parent_class; void (*changed)(FmConfig* cfg); };
the parent class | |
the class closure for the "changed" signal |
typedef enum { FM_DND_DEST_DROP_AUTO, FM_DND_DEST_DROP_COPY, FM_DND_DEST_DROP_MOVE, FM_DND_DEST_DROP_ASK } FmDndDestDropAction;
selected behavior when files are dropped on destination widget.
void fm_config_emit_changed (FmConfig *cfg
,const char *changed_key
);
Causes the "changed" signal to be emitted.
This API is not thread-safe and should be used only in default context.
|
pointer to configuration |
|
what was changed |
Since 0.1.0
void fm_config_load_from_file (FmConfig *cfg
,const char *name
);
Fills configuration cfg
with data from configuration file. The file
name
may be NULL
to load default configuration file. If name
is
full path then that file will be loaded. Otherwise name
will be
searched in system config directories and after that in ~/.config/
directory and all found files will be loaded, overwriting existing
data in cfg
.
See also: fm_config_load_from_key_file()
|
pointer to configuration |
|
file name to load configuration. [allow-none] |
Since 0.1.0
void fm_config_load_from_key_file (FmConfig *cfg
,GKeyFile *kf
);
Fills configuration cfg
with data from GKeyFile kf
.
|
pointer to configuration |
|
a GKeyFile with configuration keys and values |
Since 0.1.0
FmConfig * fm_config_new (void
);
Creates a new configuration structure filled with default values.
Returns : |
a new FmConfig object. |
Since 0.1.0
void fm_config_save (FmConfig *cfg
,const char *name
);
Saves configuration into configuration file name
. If name
is NULL
then configuration will be saved into default configuration file.
Otherwise it will be saved into file name
under directory ~/.config.
|
pointer to configuration |
|
file name to save configuration. [allow-none] |
Since 0.1.0