summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2003-07-22 23:35:18 +0000
committerGeorge Lebl <jirka@src.gnome.org>2003-07-22 23:35:18 +0000
commit6a099a913b20f4968fa4c121bccfe5bca3fad504 (patch)
tree3f4d4af1f3a53cf8b7baf8486f5751bb2605e144 /src
parentfbde4a803667638381dee71282508d489d0b69a0 (diff)
downloadnautilus-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 'src')
-rw-r--r--src/nautilus-navigation-window.c48
-rw-r--r--src/nautilus-object-window.c48
-rw-r--r--src/nautilus-shell.c8
-rw-r--r--src/nautilus-spatial-window.c48
-rw-r--r--src/nautilus-window.c48
5 files changed, 142 insertions, 58 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index dedf3b1ff..300f43ecb 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -549,9 +549,11 @@ side_pane_size_allocate_callback (GtkWidget *widget,
if (allocation->width != window->details->side_pane_width) {
window->details->side_pane_width = allocation->width;
- eel_preferences_set_integer
- (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
- allocation->width);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH)) {
+ eel_preferences_set_integer
+ (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
+ allocation->width);
+ }
}
}
@@ -631,11 +633,15 @@ side_pane_switch_page_callback (NautilusSidePane *side_pane,
if (NAUTILUS_IS_VIEW_FRAME (panel)) {
view_iid = nautilus_view_frame_get_view_iid (NAUTILUS_VIEW_FRAME (panel));
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
- view_iid);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
+ view_iid);
+ }
} else {
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ }
}
}
@@ -2032,7 +2038,8 @@ nautilus_window_hide_location_bar (NautilusWindow *window, gboolean save_prefere
{
window->details->temporary_navigation_bar = FALSE;
hide_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, FALSE);
}
}
@@ -2041,7 +2048,8 @@ void
nautilus_window_show_location_bar (NautilusWindow *window, gboolean save_preference)
{
show_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, TRUE);
}
}
@@ -2056,7 +2064,9 @@ void
nautilus_window_hide_toolbar (NautilusWindow *window)
{
hide_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ }
}
void
@@ -2064,7 +2074,9 @@ nautilus_window_show_toolbar (NautilusWindow *window)
{
nautilus_window_activate_throbber (window);
show_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ }
}
gboolean
@@ -2082,7 +2094,9 @@ nautilus_window_hide_sidebar (NautilusWindow *window)
nautilus_window_tear_down_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ }
}
void
@@ -2094,7 +2108,9 @@ nautilus_window_show_sidebar (NautilusWindow *window)
nautilus_window_set_up_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ }
}
gboolean
@@ -2112,7 +2128,9 @@ nautilus_window_hide_status_bar (NautilusWindow *window)
hide_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ }
}
void
@@ -2121,7 +2139,9 @@ nautilus_window_show_status_bar (NautilusWindow *window)
show_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ }
}
gboolean
diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c
index dedf3b1ff..300f43ecb 100644
--- a/src/nautilus-object-window.c
+++ b/src/nautilus-object-window.c
@@ -549,9 +549,11 @@ side_pane_size_allocate_callback (GtkWidget *widget,
if (allocation->width != window->details->side_pane_width) {
window->details->side_pane_width = allocation->width;
- eel_preferences_set_integer
- (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
- allocation->width);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH)) {
+ eel_preferences_set_integer
+ (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
+ allocation->width);
+ }
}
}
@@ -631,11 +633,15 @@ side_pane_switch_page_callback (NautilusSidePane *side_pane,
if (NAUTILUS_IS_VIEW_FRAME (panel)) {
view_iid = nautilus_view_frame_get_view_iid (NAUTILUS_VIEW_FRAME (panel));
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
- view_iid);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
+ view_iid);
+ }
} else {
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ }
}
}
@@ -2032,7 +2038,8 @@ nautilus_window_hide_location_bar (NautilusWindow *window, gboolean save_prefere
{
window->details->temporary_navigation_bar = FALSE;
hide_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, FALSE);
}
}
@@ -2041,7 +2048,8 @@ void
nautilus_window_show_location_bar (NautilusWindow *window, gboolean save_preference)
{
show_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, TRUE);
}
}
@@ -2056,7 +2064,9 @@ void
nautilus_window_hide_toolbar (NautilusWindow *window)
{
hide_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ }
}
void
@@ -2064,7 +2074,9 @@ nautilus_window_show_toolbar (NautilusWindow *window)
{
nautilus_window_activate_throbber (window);
show_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ }
}
gboolean
@@ -2082,7 +2094,9 @@ nautilus_window_hide_sidebar (NautilusWindow *window)
nautilus_window_tear_down_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ }
}
void
@@ -2094,7 +2108,9 @@ nautilus_window_show_sidebar (NautilusWindow *window)
nautilus_window_set_up_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ }
}
gboolean
@@ -2112,7 +2128,9 @@ nautilus_window_hide_status_bar (NautilusWindow *window)
hide_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ }
}
void
@@ -2121,7 +2139,9 @@ nautilus_window_show_status_bar (NautilusWindow *window)
show_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ }
}
gboolean
diff --git a/src/nautilus-shell.c b/src/nautilus-shell.c
index 44af81b31..10e62a9e5 100644
--- a/src/nautilus-shell.c
+++ b/src/nautilus-shell.c
@@ -299,7 +299,9 @@ save_window_states (void)
g_free (window_attributes);
}
- eel_preferences_set_string_list (START_STATE_CONFIG, states);
+ if (eel_preferences_key_is_writable (START_STATE_CONFIG)) {
+ eel_preferences_set_string_list (START_STATE_CONFIG, states);
+ }
eel_string_list_free (states);
}
@@ -372,7 +374,9 @@ restore_window_states (NautilusShell *shell)
result = eel_string_list_get_length (states) > 0;
eel_string_list_for_each (states, restore_one_window_callback, shell);
eel_string_list_free (states);
- eel_preferences_set_string_list (START_STATE_CONFIG, NULL);
+ if (eel_preferences_key_is_writable (START_STATE_CONFIG)) {
+ eel_preferences_set_string_list (START_STATE_CONFIG, NULL);
+ }
return result;
}
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index dedf3b1ff..300f43ecb 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -549,9 +549,11 @@ side_pane_size_allocate_callback (GtkWidget *widget,
if (allocation->width != window->details->side_pane_width) {
window->details->side_pane_width = allocation->width;
- eel_preferences_set_integer
- (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
- allocation->width);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH)) {
+ eel_preferences_set_integer
+ (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
+ allocation->width);
+ }
}
}
@@ -631,11 +633,15 @@ side_pane_switch_page_callback (NautilusSidePane *side_pane,
if (NAUTILUS_IS_VIEW_FRAME (panel)) {
view_iid = nautilus_view_frame_get_view_iid (NAUTILUS_VIEW_FRAME (panel));
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
- view_iid);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
+ view_iid);
+ }
} else {
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ }
}
}
@@ -2032,7 +2038,8 @@ nautilus_window_hide_location_bar (NautilusWindow *window, gboolean save_prefere
{
window->details->temporary_navigation_bar = FALSE;
hide_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, FALSE);
}
}
@@ -2041,7 +2048,8 @@ void
nautilus_window_show_location_bar (NautilusWindow *window, gboolean save_preference)
{
show_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, TRUE);
}
}
@@ -2056,7 +2064,9 @@ void
nautilus_window_hide_toolbar (NautilusWindow *window)
{
hide_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ }
}
void
@@ -2064,7 +2074,9 @@ nautilus_window_show_toolbar (NautilusWindow *window)
{
nautilus_window_activate_throbber (window);
show_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ }
}
gboolean
@@ -2082,7 +2094,9 @@ nautilus_window_hide_sidebar (NautilusWindow *window)
nautilus_window_tear_down_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ }
}
void
@@ -2094,7 +2108,9 @@ nautilus_window_show_sidebar (NautilusWindow *window)
nautilus_window_set_up_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ }
}
gboolean
@@ -2112,7 +2128,9 @@ nautilus_window_hide_status_bar (NautilusWindow *window)
hide_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ }
}
void
@@ -2121,7 +2139,9 @@ nautilus_window_show_status_bar (NautilusWindow *window)
show_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ }
}
gboolean
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index dedf3b1ff..300f43ecb 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -549,9 +549,11 @@ side_pane_size_allocate_callback (GtkWidget *widget,
if (allocation->width != window->details->side_pane_width) {
window->details->side_pane_width = allocation->width;
- eel_preferences_set_integer
- (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
- allocation->width);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH)) {
+ eel_preferences_set_integer
+ (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
+ allocation->width);
+ }
}
}
@@ -631,11 +633,15 @@ side_pane_switch_page_callback (NautilusSidePane *side_pane,
if (NAUTILUS_IS_VIEW_FRAME (panel)) {
view_iid = nautilus_view_frame_get_view_iid (NAUTILUS_VIEW_FRAME (panel));
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
- view_iid);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW,
+ view_iid);
+ }
} else {
- eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW)) {
+ eel_preferences_set (NAUTILUS_PREFERENCES_SIDE_PANE_VIEW, "");
+ }
}
}
@@ -2032,7 +2038,8 @@ nautilus_window_hide_location_bar (NautilusWindow *window, gboolean save_prefere
{
window->details->temporary_navigation_bar = FALSE;
hide_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, FALSE);
}
}
@@ -2041,7 +2048,8 @@ void
nautilus_window_show_location_bar (NautilusWindow *window, gboolean save_preference)
{
show_dock_item (window, LOCATION_BAR_PATH);
- if (save_preference) {
+ if (save_preference &&
+ eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR, TRUE);
}
}
@@ -2056,7 +2064,9 @@ void
nautilus_window_hide_toolbar (NautilusWindow *window)
{
hide_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
+ }
}
void
@@ -2064,7 +2074,9 @@ nautilus_window_show_toolbar (NautilusWindow *window)
{
nautilus_window_activate_throbber (window);
show_dock_item (window, TOOLBAR_PATH);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
+ }
}
gboolean
@@ -2082,7 +2094,9 @@ nautilus_window_hide_sidebar (NautilusWindow *window)
nautilus_window_tear_down_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, FALSE);
+ }
}
void
@@ -2094,7 +2108,9 @@ nautilus_window_show_sidebar (NautilusWindow *window)
nautilus_window_set_up_sidebar (window);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_SIDEBAR, TRUE);
+ }
}
gboolean
@@ -2112,7 +2128,9 @@ nautilus_window_hide_status_bar (NautilusWindow *window)
hide_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, FALSE);
+ }
}
void
@@ -2121,7 +2139,9 @@ nautilus_window_show_status_bar (NautilusWindow *window)
show_dock_item (window, STATUS_BAR_PATH);
nautilus_window_update_show_hide_menu_items (window);
- eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR)) {
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR, TRUE);
+ }
}
gboolean