geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

stash-example.c
Go to the documentation of this file.
2gboolean china_enabled;
4const gchar filename[] = "/path/data.conf";
5
6/* setup the group */
9stash_group_add_string(group, &potter_name, "potter_name", "Miss Clay");
10
11/* load the settings from a file */
13 g_warning(_("Could not load keyfile %s!"), filename);
14
15/* now use settings china_enabled and potter_name */
16...
17
18/* save settings to file */
19if (stash_group_save_to_file(group, filename, G_KEY_FILE_NONE) != 0)
20 g_error(_("Could not save keyfile %s!"), filename);
21
22/* free memory */
StashGroup * group
Definition: stash-example.c:1
gchar * potter_name
Definition: stash-example.c:3
stash_group_add_boolean(group, &china_enabled, "china", TRUE)
stash_group_add_string(group, &potter_name, "potter_name", "Miss Clay")
const gchar filename[]
Definition: stash-example.c:4
gboolean china_enabled
Definition: stash-example.c:2
gint stash_group_save_to_file(StashGroup *group, const gchar *filename, GKeyFileFlags flags)
Writes group settings to a configuration file using GKeyFile.
Definition: stash.c:326
gboolean stash_group_load_from_file(StashGroup *group, const gchar *filename)
Reads group settings from a configuration file using GKeyFile.
Definition: stash.c:301
StashGroup * stash_group_new(const gchar *name)
Creates a new group.
Definition: stash.c:360
void stash_group_free(StashGroup *group)
Frees a group.
Definition: stash.c:407
#define _(String)
Definition: support.h:42