Cleanup of gconf and a few other things, patch from Kjartan Maraas

2005-05-22  Sebastien Bacher  <seb128@debian.org>

        * ChangeLog capplets/about-me/e-image-chooser.c
        capplets/accessibility/at-properties/at-startup-session.h
        capplets/accessibility/keyboard/accessibility-keyboard.c
        capplets/background/gnome-wp-info.c
        capplets/common/gconf-property-editor.c
        capplets/common/gnome-theme-apply.c
        capplets/default-applications/gnome-default-applications-properties.c
        capplets/keybindings/gnome-keybinding-properties.c
        capplets/keyboard/gnome-keyboard-properties.c
        capplets/mouse/gnome-mouse-properties.c
        capplets/network/gnome-network-preferences.c
        capplets/sound/sound-properties-capplet.c
        capplets/theme-switcher/gnome-theme-details.c
        capplets/theme-switcher/gnome-theme-manager.c
        capplets/ui-properties/gnome-ui-properties.c
        capplets/windows/gnome-window-properties.c
        gnome-settings-daemon/factory.c
        gnome-settings-daemon/gnome-settings-accessibility-keyboard.c
        gnome-settings-daemon/gnome-settings-background.c
        gnome-settings-daemon/gnome-settings-daemon.c
        gnome-settings-daemon/gnome-settings-daemon.h
        gnome-settings-daemon/gnome-settings-font.c
        gnome-settings-daemon/gnome-settings-keybindings.c
        gnome-settings-daemon/gnome-settings-keybindings.h
        gnome-settings-daemon/gnome-settings-keyboard-xkb.c
        gnome-settings-daemon/gnome-settings-keyboard.c
        gnome-settings-daemon/gnome-settings-locate-pointer.h
        gnome-settings-daemon/gnome-settings-mouse.c
        gnome-settings-daemon/gnome-settings-multimedia-keys.c
        gnome-settings-daemon/gnome-settings-screensaver.c
        gnome-settings-daemon/gnome-settings-sound.c
        gnome-settings-daemon/gnome-settings-xmodmap.c
        gnome-settings-daemon/gnome-settings-xrdb.c
        gnome-settings-daemon/gnome-settings-xsettings.c
        libbackground/applier.c libbackground/applier.h
        libbackground/preferences.c libsounds/sound-properties.c
        libsounds/sound-view.h libwindow-settings/gnome-wm-manager.c
        libwindow-settings/metacity-window-manager.c
        typing-break/drw-break-window.c typing-break/drw-utils.h
        typing-break/drwright.c vfs-methods/fontilus/font-view.c
        vfs-methods/themus/themus-theme-applier.c:
        Cleanup of gconf and a few other things,
        patch from Kjartan Maraas <kmaraas@gnome.org> (Closes: #301945).
This commit is contained in:
Sebastien Bacher 2005-05-22 15:46:45 +00:00 committed by Sebastien Bacher
parent 912f58a06f
commit 581c37e2bb
46 changed files with 238 additions and 109 deletions

View file

@ -261,6 +261,7 @@ gconf_property_editor_set_prop (GObject *object,
gconf_client_notify_add (client, peditor->p->key,
peditor->p->callback,
peditor, NULL, NULL);
g_object_unref (client);
break;
case PROP_CHANGESET:
@ -340,6 +341,7 @@ gconf_property_editor_finalize (GObject *object)
client = gconf_client_get_default ();
gconf_client_notify_remove (client,
gconf_property_editor->p->handler_id);
g_object_unref (client);
}
g_free (gconf_property_editor->p);
@ -408,10 +410,14 @@ peditor_set_gconf_value (GConfPropertyEditor *peditor,
const gchar *key,
GConfValue *value)
{
GConfClient *client = gconf_client_get_default();
if (peditor->p->changeset != NULL)
gconf_change_set_set (peditor->p->changeset, peditor->p->key, value);
else
gconf_client_set (gconf_client_get_default (), peditor->p->key, value, NULL);
gconf_client_set (client, peditor->p->key, value, NULL);
g_object_unref (client);
}
static void
@ -1107,15 +1113,20 @@ peditor_numeric_range_widget_changed (GConfPropertyEditor *peditor,
GtkAdjustment *adjustment)
{
GConfValue *value, *value_wid, *default_value;
GConfClient *client;
if (!peditor->p->inited) return;
/* We try to get the default type from the schemas. if not, we default
* to a float.
*/
default_value = gconf_client_get_default_from_schema (gconf_client_get_default (),
client = gconf_client_get_default();
default_value = gconf_client_get_default_from_schema (client,
peditor->p->key,
NULL);
g_object_unref (client);
if (default_value)
value_wid = gconf_value_new (default_value->type);
else {
@ -1225,6 +1236,7 @@ gconf_peditor_widget_set_guard (GConfPropertyEditor *peditor,
client = gconf_client_get_default ();
value = gconf_client_get (client, peditor->p->key, NULL);
g_object_unref (client);
if (value) {
gtk_widget_set_sensitive (widget, guard_get_bool (peditor, value));
@ -1615,6 +1627,7 @@ peditor_image_clicked_cb (GConfPropertyEditor *peditor, GtkButton *button)
{
GConfClient *client = gconf_client_get_default ();
value = gconf_client_get (client, peditor->p->key, NULL);
g_object_unref (client);
}
value_wid = peditor->p->conv_to_widget_cb (peditor, value);