Betreff: some devel-questions
- From: mt abe-si de
- To: balsa-list gnome org
- Subject: Betreff: some devel-questions
- Date: Thu, 1 May 2003 14:40:00 +0200 (CEST)
Hi
GConf is easy to use, especially on single variables or strings.
The question is, it is a good idea to port balsa to GConf?
(If I understand GConf correct, then GConf provide a diff between
local settings, system-settings and user-definde-setting. If I
work on two PCs, so every PC can have other fonts (this is system-deps)
but my email-account is the same (user-settings) - so, if we use
GConf with balsa, we should split conf-data in this parts.)
GConf provide (with easy to use)
data_type = {int, float, bool, string, list, pair}
- list is from type GSList*
- every hash, you can store as serial string.
If I look inside my own '${HOME}/.gnome2/balsa' I see only
simple value with the form
'name'='value'
this you can easy make with GConf, or have I forgot some importents.
Bye,
Heiko
---
An code-example:
---------cut----------------
/* src/main.c main(...) */
GConfClient *gconf;
gconf = gconf_client_get_default ();
gconf_client_add_dir(gconf, "/apps/balsa",
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
read_gconf_date(... , gconf);
...
/* create main-windows */
...
/* exit-code */
write_gconf_data(...);
gconf_client_remove_dir (gconf, "/apps/keyman", NULL);
g_object_unref (gconf);
} /* end main(..) */
---------cut----------------
---------cut----------------
void read_gconf_date(... , GConfClient * gconf) {
gboolean value1;
gint value2;
gchar *value3;
value1 = gconf_client_get_bool ( gconf, "/apps/balsa/value1", NULL);
value2 = gconf_client_get_int ( gconf, "/apps/balsa/value2", NULL);
value3 = gconf_client_get_string( gconf, "/apps/balsa/value3", NULL);
...
}
---------cut----------------
void write_gconf_data(... , GConfClient * gconf) {
...
gconf_client_set_bool(gconf, "/apps/balsa/value1", value1, NULL);
gconf_client_set_int (gconf, "/apps/balsa/value2", value2, NULL);
gconf_client_set_string(gconf, "/apps/balsa/value2", value3, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]