![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define FM_CONFIG_DEFAULT_BIG_ICON_SIZE #define FM_CONFIG_DEFAULT_CONFIRM_DEL #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 { GObject parent; gboolean single_click; /* single click to open file */ gboolean use_trash; /* delete file to trash can */ gboolean confirm_del; /* ask before deleting files */ gint big_icon_size; /* size of big icons */ gint small_icon_size; /* size of small icons */ gint pane_icon_size; /* size of side pane icons */ gint thumbnail_size; /* size of thumbnail icons */ gboolean show_thumbnail; /* show thumbnails */ gboolean thumbnail_local; /* show thumbnails for local files only */ gint thumbnail_max; /* show thumbnails for files smaller than 'thumb_max' KB */ gboolean show_internal_volumes; /* show system internal volumes in side pane. (udisks-only)*/ char* terminal; /* command line to launch terminal emulator */ gboolean si_unit; /* use SI prefix for file sizes */ char* archiver; /* desktop_id of the archiver used */ gboolean advanced_mode; /* 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