diff options
author | Havoc Pennington <hp@pobox.com> | 2000-09-17 00:55:03 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-09-17 00:55:03 +0000 |
commit | b780e8386cc3632992b70d6232bc8e63d64154f8 (patch) | |
tree | a8f9f1253a8c2db2c54545a1326c21283db1f4f4 /examples | |
parent | 06f8e406e040119173f0bf919719c8ce402c0838 (diff) | |
download | gconf-b780e8386cc3632992b70d6232bc8e63d64154f8.tar.gz |
Update some docs
2000-09-16 Havoc Pennington <hp@pobox.com>
* doc/gconf/tmpl/gconf-value.sgml: Update some docs
* wrappers/gtk/gconf-client.c (notify_listeners_callback): Update
to reflect new callback signature for GConfClientNotifyFunc
* gconf/gconf-sources.c (gconf_sources_set_value): Make it an
error to if we try to write a value for a non-writable source.
This is new; it used to silently fail.
* gconf/gconf-database.c (gconf_database_notify_listeners): Add
is_writable here
* gconf/GConf.idl: Add writable flag to notification
* gconf/gconf.h: Update GConfNotifyFunc to have fewer args, and
a GConfEntry is just passed in (since I was going to have
to add an is_writable arg, and passing in a GConfEntry
gives us future extensibility against this sort of thing)
BREAKS USER CODE, many apologies.
* wrappers/gtk/gconf-client.c (gconf_client_get_entry): Update
to reflect GConfEngine changes
* gconf/gconf.c (gconf_engine_all_entries): Get the writability
stuff
(gconf_engine_get_full): rename to gconf_value_get_entry
and return an entry; drop the is_default argument.
* gconf/gconf-sources.c (gconf_sources_query_value): Implement
finding out if a value is writable
(gconf_sources_all_entries): Implement setting is_writable
flag on the entries
* gconf/gconf-value.c (gconf_entry_new_nocopy): Default to
the entry being writable
* gconf/gconf-database.c: Change to match IDL changes
* gconf/GConf.idl (lookup_with_locale): Add out param for
writability
(all_entries): Add out param for writability
* gconf/gconf-value.h: Add is_writable field to GConfEntry
(gconf_entry_get_is_writable): Add this
* wrappers/gtk/gconf-client.c (gconf_client_key_is_writable): Add
the matching stub here
* gconf/gconf.c (gconf_engine_key_is_writable): Go ahead and add
this function so we can implement it later, but it always returns
TRUE at the moment.
* gconf/gconf-changeset.c (gconf_change_set_set_user_data,
gconf_change_set_get_user_data): Add user data for language
bindings
* gconf/gconf.c (gconf_engine_set_user_data,
gconf_engine_get_user_data): Add user data for language
bindings
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic-gconf-app.c | 11 | ||||
-rw-r--r-- | examples/simple-view.c | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/examples/basic-gconf-app.c b/examples/basic-gconf-app.c index 1dae53b1..07690303 100644 --- a/examples/basic-gconf-app.c +++ b/examples/basic-gconf-app.c @@ -123,9 +123,7 @@ configurable_widget_destroy_callback(GtkWidget* widget, gpointer data) static void configurable_widget_config_notify(GConfClient* client, guint cnxn_id, - const gchar* key, - GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GtkWidget* label = user_data; @@ -136,13 +134,14 @@ configurable_widget_config_notify(GConfClient* client, /* Note that value can be NULL (unset) or it can have the wrong type! */ - if (value == NULL) + if (entry->value == NULL) { gtk_label_set_text(GTK_LABEL(label), ""); } - else if (value->type == GCONF_VALUE_STRING) + else if (entry->value->type == GCONF_VALUE_STRING) { - gtk_label_set_text(GTK_LABEL(label), gconf_value_get_string(value)); + gtk_label_set_text(GTK_LABEL(label), + gconf_value_get_string(entry->value)); } else { diff --git a/examples/simple-view.c b/examples/simple-view.c index 8b852bd7..fb44a919 100644 --- a/examples/simple-view.c +++ b/examples/simple-view.c @@ -27,24 +27,23 @@ void key_changed_callback(GConfClient* client, guint cnxn_id, - const gchar* key, - GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GtkWidget* label; label = GTK_WIDGET(user_data); - if (value == NULL) + if (entry->value == NULL) { gtk_label_set(GTK_LABEL(label), "<unset>"); } else { - if (value->type == GCONF_VALUE_STRING) + if (entry->value->type == GCONF_VALUE_STRING) { - gtk_label_set(GTK_LABEL(label), gconf_value_get_string(value)); + gtk_label_set(GTK_LABEL(label), + gconf_value_get_string(entry->value)); } else { |