![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define FM_CONFIG_DEFAULT_BACKUP_HIDDEN #define FM_CONFIG_DEFAULT_BIG_ICON_SIZE #define FM_CONFIG_DEFAULT_CONFIRM_DEL #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_PANE_ICON_SIZE #define FM_CONFIG_DEFAULT_SHOW_THUMBNAIL #define FM_CONFIG_DEFAULT_SINGLE_CLICK #define FM_CONFIG_DEFAULT_SMALL_ICON_SIZE #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; 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-config.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 { gboolean single_click; gboolean use_trash; gboolean confirm_del; gint big_icon_size; gint small_icon_size; gint pane_icon_size; gint thumbnail_size; gboolean show_thumbnail; gboolean thumbnail_local; gint thumbnail_max; gboolean show_internal_volumes; char* terminal; gboolean si_unit; char* archiver; gboolean advanced_mode; };
single click to open file | |
delete file to trash can | |
ask before deleting files | |
size of big icons | |
size of small icons | |
size of side pane icons | |
size of thumbnail icons | |
show thumbnails | |
show thumbnails for local files only | |
show thumbnails for files smaller than 'thumb_max' KB | |
show system internal volumes in side pane. (udisks-only) | |
command line to launch terminal emulator | |
use SI prefix for file sizes | |
desktop_id of the archiver used | |
enable advanced features for experienced user |
struct FmConfigClass { GObjectClass parent_class; void (*changed)(FmConfig* cfg); };
the parent class | |
the class closure for the "changed" signal |
void fm_config_emit_changed (FmConfig *cfg
,const char *changed_key
);
Causes the "changed" signal to be emitted.
|
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