diff options
author | George Lebl <jirka@5z.com> | 2003-07-22 23:35:18 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-07-22 23:35:18 +0000 |
commit | 6a099a913b20f4968fa4c121bccfe5bca3fad504 (patch) | |
tree | 3f4d4af1f3a53cf8b7baf8486f5751bb2605e144 /libnautilus-private/nautilus-global-preferences.c | |
parent | fbde4a803667638381dee71282508d489d0b69a0 (diff) | |
download | nautilus-6a099a913b20f4968fa4c121bccfe5bca3fad504.tar.gz |
(The key-writability commit as discussed with release-team
last week)
Tue Jul 22 16:34:10 2003 George Lebl <jirka@5z.com>
* libnautilus-private/nautilus-global-preferences.c
(import_old_preferences_if_needed): Don't import
a preference if we can't write the new value
* libnautilus-private/nautilus-sound.c (nautilus_sound_init)
(nautilus_sound_kill_sound) (nautilus_sound_register_sound)
(nautilus_sound_can_play_sound): If we can't write the current
sound state key, don't allow the sound preview since we won't be
able to kill the preview process later, and don't set the sound
state key if not writable.
* src/nautilus-shell.c (save_window_states): If we can't
save the start state, don't save it then.
* src/nautilus-window.c (side_pane_size_allocate_callback)
(side_pane_switch_page_callback) (nautilus_window_hide_location_bar)
(nautilus_window_show_location_bar)
(nautilus_window_hide_toolbar) (nautilus_window_show_toolbar)
(nautilus_window_hide_sidebar) (nautilus_window_show_sidebar)
(nautilus_window_hide_status_bar) (nautilus_window_show_status_bar):
When we can't write the preference of the start state, don't set
it.
Diffstat (limited to 'libnautilus-private/nautilus-global-preferences.c')
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c index 55aaac15c..92c465dfb 100644 --- a/libnautilus-private/nautilus-global-preferences.c +++ b/libnautilus-private/nautilus-global-preferences.c @@ -809,14 +809,16 @@ import_old_preferences_if_needed (void) for (i=0; OLD_PREFERENCES_TO_IMPORT[i].new_key != NULL; i++) { to_import = & (OLD_PREFERENCES_TO_IMPORT[i]); - error = NULL; - value = gconf_client_get (client, to_import->old_key, &error); - - if ((error == NULL) && (value != NULL)) { - gconf_client_set (client, to_import->new_key, value, NULL); - } else { - if (error != NULL) { - g_error_free (error); + if (gconf_client_key_is_writable (client, to_import->new_key, NULL)) { + error = NULL; + value = gconf_client_get (client, to_import->old_key, &error); + + if ((error == NULL) && (value != NULL)) { + gconf_client_set (client, to_import->new_key, value, NULL); + } else { + if (error != NULL) { + g_error_free (error); + } } } } |