Commit ba29511a authored by Ramiro Estrugo's avatar Ramiro Estrugo

Implement the missing GconfValue comparison for lists.

	* libnautilus-extensions/nautilus-gconf-extensions.c:
	(simple_value_is_equal), (nautilus_gconf_value_is_equal):
	Implement the missing GconfValue comparison for lists.

	* libnautilus-extensions/nautilus-global-preferences.h:
	More consistent name for the icon captions preference.

	* libnautilus-extensions/nautilus-global-preferences.c:
	(global_preferences_register_enumerations): Allow enumeration ids
	to be installed for string lists.  A bit of a hack to let
	enumeration lists work in the NautilusPreferencesItem object.
	(global_preferences_install_one_default): Add support for string
	lists.
	(global_preferences_create_dialog):
	Move the icon captions widgetry from its own lonesome dialog into
	the preferences dialog.

	* libnautilus-extensions/nautilus-preferences-box.h:
	* libnautilus-extensions/nautilus-preferences-box.c:
	(nautilus_preferences_box_new):
	Remove unused parameter from constructor.  Remove some crufty
	unused code.  Match the Nautilus style more.

	* libnautilus-extensions/nautilus-preferences-dialog.h:
	* libnautilus-extensions/nautilus-preferences-dialog.c:
	(nautilus_preferences_dialog_construct):
	Remove some crufty unused signals, defines and code.  Match the
	Nautilus style more.  Dont hard code the default size.  Let Gtk do
	that work for us.  Remove unused dialog_destroy callback.

	* libnautilus-extensions/nautilus-preferences-item.h:
	* libnautilus-extensions/nautilus-preferences-item.c:
	(preferences_item_destroy),
	(preferences_item_update_enumeration_list),
	(preferences_item_set_main_child),
	(preferences_item_add_connection_child),
	(preferences_item_create_enumeration_radio),
	(preferences_item_create_enumeration_list),
	(preferences_item_create_boolean),
	(preferences_item_update_editable_string),
	(preferences_item_create_editable_string),
	(preferences_item_create_editable_integer),
	(preferences_item_create_enumeration_menu),
	(preferences_item_create_font), (preferences_item_create_padding),
	(preferences_item_create_smooth_font),
	(nautilus_preferences_item_new),
	(enumeration_list_changed_callback),
	(preferences_item_update_displayed_value):
	Add support for enumerations lists.
	Cleanup the way children are added to the main box.  Allow for
	more than one child (for enum list support).  Keep a list of
	widgets and their respective changed signal ids, so they can all
	be blocked and unblocked when needed.

	* libnautilus-extensions/nautilus-preferences.h:
	* libnautilus-extensions/nautilus-preferences.c:
	(update_auto_string_list), (preferences_entry_update_auto_storage),
	(preferences_entry_remove_auto_storage),
	(nautilus_preferences_add_auto_string_list),
	(nautilus_preferences_remove_auto_string),
	(nautilus_preferences_remove_auto_string_list):
	Add support for auto storage of string lists.

	* src/nautilus-application.c: (check_required_directories): Update
	for EelStringList _as_string changes.
parent a250946b
2001-04-17 Ramiro Estrugo <ramiro@eazel.com>
* libnautilus-extensions/nautilus-gconf-extensions.c:
(simple_value_is_equal), (nautilus_gconf_value_is_equal):
Implement the missing GconfValue comparison for lists.
* libnautilus-extensions/nautilus-global-preferences.h:
More consistent name for the icon captions preference.
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_register_enumerations): Allow enumeration ids
to be installed for string lists. A bit of a hack to let
enumeration lists work in the NautilusPreferencesItem object.
(global_preferences_install_one_default): Add support for string
lists.
(global_preferences_create_dialog):
Move the icon captions widgetry from its own lonesome dialog into
the preferences dialog.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_new):
Remove unused parameter from constructor. Remove some crufty
unused code. Match the Nautilus style more.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_construct):
Remove some crufty unused signals, defines and code. Match the
Nautilus style more. Dont hard code the default size. Let Gtk do
that work for us. Remove unused dialog_destroy callback.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_destroy),
(preferences_item_update_enumeration_list),
(preferences_item_set_main_child),
(preferences_item_add_connection_child),
(preferences_item_create_enumeration_radio),
(preferences_item_create_enumeration_list),
(preferences_item_create_boolean),
(preferences_item_update_editable_string),
(preferences_item_create_editable_string),
(preferences_item_create_editable_integer),
(preferences_item_create_enumeration_menu),
(preferences_item_create_font), (preferences_item_create_padding),
(preferences_item_create_smooth_font),
(nautilus_preferences_item_new),
(enumeration_list_changed_callback),
(preferences_item_update_displayed_value):
Add support for enumerations lists.
Cleanup the way children are added to the main box. Allow for
more than one child (for enum list support). Keep a list of
widgets and their respective changed signal ids, so they can all
be blocked and unblocked when needed.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(update_auto_string_list), (preferences_entry_update_auto_storage),
(preferences_entry_remove_auto_storage),
(nautilus_preferences_add_auto_string_list),
(nautilus_preferences_remove_auto_string),
(nautilus_preferences_remove_auto_string_list):
Add support for auto storage of string lists.
* src/nautilus-application.c: (check_required_directories): Update
for EelStringList _as_string changes.
2001-04-17 Josh Barrow <josh@whitecape.org>
* AUTHORS:
......
......@@ -363,10 +363,43 @@ nautilus_gconf_get_value (const char *key)
return value;
}
static gboolean
simple_value_is_equal (const GConfValue *a,
const GConfValue *b)
{
g_return_val_if_fail (a != NULL, FALSE);
g_return_val_if_fail (b != NULL, FALSE);
switch (a->type) {
case GCONF_VALUE_STRING:
return eel_str_is_equal (a->d.string_data, b->d.string_data);
break;
case GCONF_VALUE_INT:
return a->d.int_data == b->d.int_data;
break;
case GCONF_VALUE_FLOAT:
return a->d.float_data == b->d.float_data;
break;
case GCONF_VALUE_BOOL:
return a->d.bool_data == b->d.bool_data;
break;
default:
g_assert_not_reached ();
}
return FALSE;
}
gboolean
nautilus_gconf_value_is_equal (const GConfValue *a,
const GConfValue *b)
{
GSList *node_a;
GSList *node_b;
if (a == NULL && b == NULL) {
return TRUE;
}
......@@ -381,28 +414,45 @@ nautilus_gconf_value_is_equal (const GConfValue *a,
switch (a->type) {
case GCONF_VALUE_STRING:
return eel_str_is_equal (a->d.string_data, b->d.string_data);
break;
case GCONF_VALUE_INT:
return a->d.int_data == b->d.int_data;
break;
case GCONF_VALUE_FLOAT:
return a->d.float_data == b->d.float_data;
break;
case GCONF_VALUE_BOOL:
return a->d.bool_data == b->d.bool_data;
return simple_value_is_equal (a, b);
break;
case GCONF_VALUE_LIST:
/* FIXME */
g_assert (0);
return FALSE;
if (a->d.list_data.type != b->d.list_data.type) {
return FALSE;
}
if (a->d.list_data.list == NULL && b->d.list_data.list == NULL) {
return TRUE;
}
if (a->d.list_data.list != NULL || b->d.list_data.list != NULL) {
return FALSE;
}
if (g_slist_length (a->d.list_data.list) != g_slist_length (b->d.list_data.list)) {
return FALSE;
}
for (node_a = a->d.list_data.list,node_b = b->d.list_data.list;
node_a != NULL && node_b != NULL;
node_a = node_a->next, node_b = node_b->next) {
g_assert (node_a->data != NULL);
g_assert (node_b->data != NULL);
if (!simple_value_is_equal (node_a->data, node_b->data)) {
return FALSE;
}
}
return TRUE;
default:
/* FIXME: pair ? */
g_assert (0);
}
g_assert_not_reached ();
return FALSE;
}
......
......@@ -48,6 +48,7 @@
/* Constants */
static const char untranslated_global_preferences_dialog_title[] = N_("Nautilus Preferences");
#define GLOBAL_PREFERENCES_DIALOG_TITLE _(untranslated_global_preferences_dialog_title)
#define STRING_LIST_DEFAULT_TOKENS_DELIMETER ","
/* Preference names for known sidebar panels. These are used to install the default
* enabled state for the panel. Unknown panels will have a default enabled state of FALSE.
......@@ -90,7 +91,8 @@ typedef enum
{
PREFERENCE_BOOLEAN = 1,
PREFERENCE_INTEGER,
PREFERENCE_STRING
PREFERENCE_STRING,
PREFERENCE_STRING_LIST
} PreferenceType;
/* Enumerations used to qualify some INTEGER preferences */
......@@ -191,6 +193,21 @@ static EelEnumerationEntry standard_font_size_entries[] = {
{ NULL }
};
static EelEnumerationEntry icon_captions_enum_entries[] = {
{ "size", N_("size"), 0 },
{ "type", N_("type"), 1 },
{ "date_modified", N_("date modified"), 2 },
{ "date_changed", N_("date changed"), 3 },
{ "date_accessed", N_("date accessed"), 4 },
{ "owner", N_("owner"), 5 },
{ "group", N_("group"), 6 },
{ "permissions", N_("permissions"), 7 },
{ "octal_permissions", N_("octal permissions"), 8 },
{ "mime_type", N_("MIME type"), 9 },
{ "none", N_("none"), 10 },
{ NULL }
};
/* These enumerations are used in the preferences dialog to
* populate widgets and route preferences changes between the
* storage (GConf) and the displayed values.
......@@ -205,6 +222,7 @@ static EelEnumerationInfo enumerations[] = {
{ "search_bar_type", search_bar_type_enum_entries },
{ "speed_tradeoff", speed_tradeoff_enum_entries },
{ "standard_font_size", standard_font_size_entries },
{ "icon_captions", icon_captions_enum_entries },
{ NULL }
};
......@@ -255,6 +273,7 @@ typedef struct
* PREFERENCE_BOOLEAN
* PREFERENCE_INTEGER
* PREFERENCE_STRING
* PREFERENCE_STRING_LIST
*
* 3. visible_user_level
* The visible user level is the first user level at which the
......@@ -433,11 +452,12 @@ static const PreferenceDefault preference_defaults[] = {
{ NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (FALSE) },
{ USER_LEVEL_NONE }
},
{ NAUTILUS_PREFERENCES_ICON_CAPTIONS,
PREFERENCE_STRING,
{ NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS,
PREFERENCE_STRING_LIST,
NAUTILUS_USER_LEVEL_NOVICE,
{ NAUTILUS_USER_LEVEL_NOVICE, "size|date_modified|type" },
{ USER_LEVEL_NONE }
{ NAUTILUS_USER_LEVEL_NOVICE, "size,date_modified,type", },
{ USER_LEVEL_NONE },
"icon_captions"
},
{ NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS,
PREFERENCE_BOOLEAN,
......@@ -683,8 +703,9 @@ global_preferences_register_enumerations (void)
/* Set the enumeration ids for preferences that need them */
for (i = 0; preference_defaults[i].name != NULL; i++) {
if (preference_defaults[i].type == PREFERENCE_INTEGER
&& eel_strlen (preference_defaults[i].enumeration_id) > 0) {
if (eel_strlen (preference_defaults[i].enumeration_id) > 0) {
g_assert (preference_defaults[i].type == PREFERENCE_INTEGER
|| preference_defaults[i].type == PREFERENCE_STRING_LIST);
nautilus_preferences_set_enumeration_id (preference_defaults[i].name,
preference_defaults[i].enumeration_id);
}
......@@ -697,10 +718,11 @@ global_preferences_install_one_default (const char *preference_name,
const PreferenceUserLevelDefault *user_level_default)
{
gpointer value = NULL;
EelStringList *string_list_value;
g_return_if_fail (preference_name != NULL);
g_return_if_fail (preference_type >= PREFERENCE_BOOLEAN);
g_return_if_fail (preference_type <= PREFERENCE_STRING);
g_return_if_fail (preference_type <= PREFERENCE_STRING_LIST);
g_return_if_fail (user_level_default != NULL);
if (user_level_default->user_level == USER_LEVEL_NONE) {
......@@ -733,6 +755,16 @@ global_preferences_install_one_default (const char *preference_name,
value);
break;
case PREFERENCE_STRING_LIST:
string_list_value = eel_string_list_new_from_tokens (value,
STRING_LIST_DEFAULT_TOKENS_DELIMETER,
TRUE);
nautilus_preferences_default_set_string_list (preference_name,
user_level_default->user_level,
string_list_value);
eel_string_list_free (string_list_value);
break;
default:
g_assert_not_reached ();
}
......@@ -962,6 +994,16 @@ static PreferenceDialogItem directory_views_items[] = {
{ NULL }
};
static PreferenceDialogItem icon_captions_items[] = {
{ N_("Icon Captions"),
NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS,
N_("Choose the order for information to appear beneath icon names.\n"
"More information appears as you zoom in closer"),
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_LIST_VERTICAL
},
{ NULL }
};
static PreferenceDialogItem view_preferences_items[] = {
{ N_("Default View"),
NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
......@@ -1191,11 +1233,16 @@ global_preferences_create_dialog (void)
_("Windows & Desktop"),
windows_and_desktop_items);
/* Folder Views */
/* Directory Views */
global_preferences_populate_pane (preference_box,
_("Icon & List Views"),
directory_views_items);
/* Icon Captions */
global_preferences_populate_pane (preference_box,
_("Icon Captions"),
icon_captions_items);
/* Sidebar Panels */
global_preferences_create_sidebar_panels_pane (preference_box);
......
......@@ -116,6 +116,9 @@ enum
#define NAUTILUS_PREFERENCES_ICON_VIEW_FONT "icon-view/font"
#define NAUTILUS_PREFERENCES_ICON_VIEW_SMOOTH_FONT "icon-view/smooth_font"
/* Which text attributes appear beneath icon names */
#define NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS "icon-view/captions"
/* List View */
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER "list-view/default_sort_in_reverse_order"
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_SORT_ORDER "list-view/default_sort_order"
......
......@@ -41,7 +41,7 @@ typedef struct
GtkWidget *pane_widget;
} PaneInfo;
struct _NautilusPreferencesBoxDetails
struct NautilusPreferencesBoxDetails
{
GtkWidget *category_list;
GtkWidget *pane_notebook;
......@@ -299,7 +299,7 @@ category_list_select_row_callback (GtkCList *clist,
* NautilusPreferencesBox public methods
*/
GtkWidget*
nautilus_preferences_box_new (const char *box_title)
nautilus_preferences_box_new (void)
{
NautilusPreferencesBox *preferences_box;
......
......@@ -37,11 +37,11 @@ BEGIN_GNOME_DECLS
#define NAUTILUS_IS_PREFERENCES_BOX(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_PREFERENCES_BOX))
#define NAUTILUS_IS_PREFERENCES_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_PREFERENCES_BOX))
typedef struct _NautilusPreferencesBox NautilusPreferencesBox;
typedef struct _NautilusPreferencesBoxClass NautilusPreferencesBoxClass;
typedef struct _NautilusPreferencesBoxDetails NautilusPreferencesBoxDetails;
typedef struct NautilusPreferencesBox NautilusPreferencesBox;
typedef struct NautilusPreferencesBoxClass NautilusPreferencesBoxClass;
typedef struct NautilusPreferencesBoxDetails NautilusPreferencesBoxDetails;
struct _NautilusPreferencesBox
struct NautilusPreferencesBox
{
/* Super Class */
GtkHBox hbox;
......@@ -50,15 +50,13 @@ struct _NautilusPreferencesBox
NautilusPreferencesBoxDetails *details;
};
struct _NautilusPreferencesBoxClass
struct NautilusPreferencesBoxClass
{
GtkHBoxClass parent_class;
void (*activate) (GtkWidget *preferences_box, gint entry_number);
};
GtkType nautilus_preferences_box_get_type (void);
GtkWidget* nautilus_preferences_box_new (const char *box_title);
GtkWidget* nautilus_preferences_box_new (void);
GtkWidget* nautilus_preferences_box_add_pane (NautilusPreferencesBox *preferences_box,
const char *pane_title);
void nautilus_preferences_box_update (NautilusPreferencesBox *preferences_box);
......
......@@ -32,15 +32,9 @@
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-stock.h>
enum
struct NautilusPreferencesDialogDetails
{
ACTIVATE,
LAST_SIGNAL
};
struct _NautilusPreferencesDialogDetails
{
GtkWidget *prefs_box;
GtkWidget *prefs_box;
};
static const gchar * stock_buttons[] =
......@@ -54,9 +48,6 @@ static const gint OK_BUTTON = 0;
static const gint DEFAULT_BUTTON = 0;
static const guint DEFAULT_BORDER_WIDTH = 0;
static const guint PREFS_DIALOG_DEFAULT_WIDTH = 500;
static const guint PREFS_DIALOG_DEFAULT_HEIGHT = 403;
enum
{
COMMAND_ROW = 0,
......@@ -69,24 +60,22 @@ static void nautilus_preferences_dialog_initialize_class (NautilusPreferencesDia
static void nautilus_preferences_dialog_initialize (NautilusPreferencesDialog *prefs_dialog);
/* GtkObjectClass methods */
static void nautilus_preferences_dialog_destroy (GtkObject *object);
static void dialog_clicked (GtkWidget *widget,
gint n,
gpointer data);
static void dialog_show (GtkWidget *widget,
gpointer data);
static void dialog_destroy (GtkWidget *widget,
gpointer data);
static void nautilus_preferences_dialog_destroy (GtkObject *object);
static void dialog_clicked (GtkWidget *widget,
gint n,
gpointer data);
static void dialog_show (GtkWidget *widget,
gpointer data);
/* Misc private stuff */
static void nautilus_preferences_dialog_construct (NautilusPreferencesDialog *prefs_dialog,
const gchar *dialog_title);
static void user_level_changed_callback (gpointer callback_data);
const gchar *dialog_title);
static void user_level_changed_callback (gpointer callback_data);
EEL_DEFINE_CLASS_BOILERPLATE (NautilusPreferencesDialog,
nautilus_preferences_dialog,
gnome_dialog_get_type ())
nautilus_preferences_dialog,
gnome_dialog_get_type ())
/*
* NautilusPreferencesDialogClass methods
......@@ -135,14 +124,6 @@ dialog_show (GtkWidget * widget, gpointer data)
g_assert (prefs_dialog);
}
static void
dialog_destroy (GtkWidget * widget, gpointer data)
{
NautilusPreferencesDialog * prefs_dialog = (NautilusPreferencesDialog *) data;
g_assert(prefs_dialog);
}
static void
nautilus_preferences_dialog_construct (NautilusPreferencesDialog *prefs_dialog,
const gchar *dialog_title)
......@@ -164,16 +145,6 @@ nautilus_preferences_dialog_construct (NautilusPreferencesDialog *prefs_dialog,
TRUE, /* allow_grow */
FALSE); /* auto_shrink */
gtk_window_set_default_size (GTK_WINDOW (prefs_dialog),
510,
406);
/* Doesnt work in enlightenment or sawmill */
#if 0
/* This is supposed to setup the window manager functions */
gdk_window_set_functions (GTK_WIDGET (prefs_dialog)->window, GDK_FUNC_MOVE | GDK_FUNC_RESIZE);
#endif
gtk_container_set_border_width (GTK_CONTAINER(prefs_dialog),
DEFAULT_BORDER_WIDTH);
......@@ -192,15 +163,10 @@ nautilus_preferences_dialog_construct (NautilusPreferencesDialog *prefs_dialog,
GTK_SIGNAL_FUNC(dialog_show),
prefs_dialog);
gtk_signal_connect (GTK_OBJECT (prefs_dialog),
"destroy",
GTK_SIGNAL_FUNC (dialog_destroy),
prefs_dialog);
/* Configure the GNOME_DIALOG's vbox */
g_assert (gnome_dialog->vbox);
prefs_dialog->details->prefs_box = nautilus_preferences_box_new (_("Prefs Box"));
prefs_dialog->details->prefs_box = nautilus_preferences_box_new ();
gtk_box_set_spacing (GTK_BOX (gnome_dialog->vbox), 10);
......
......@@ -36,25 +36,22 @@ BEGIN_GNOME_DECLS
#define NAUTILUS_IS_PREFERENCES_DIALOG(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_PREFERENCES_DIALOG))
#define NAUTILUS_IS_PREFERENCES_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_PREFERENCES_DIALOG))
typedef struct NautilusPreferencesDialog NautilusPreferencesDialog;
typedef struct NautilusPreferencesDialogClass NautilusPreferencesDialogClass;
typedef struct NautilusPreferencesDialogDetails NautilusPreferencesDialogDetails;
typedef struct _NautilusPreferencesDialog NautilusPreferencesDialog;
typedef struct _NautilusPreferencesDialogClass NautilusPreferencesDialogClass;
typedef struct _NautilusPreferencesDialogDetails NautilusPreferencesDialogDetails;
struct _NautilusPreferencesDialog
struct NautilusPreferencesDialog
{
/* Super Class */
GnomeDialog gnome_dialog;
GnomeDialog gnome_dialog;
/* Private stuff */
NautilusPreferencesDialogDetails *details;
NautilusPreferencesDialogDetails *details;
};
struct _NautilusPreferencesDialogClass
struct NautilusPreferencesDialogClass
{
GnomeDialogClass parent_class;
void (*activate) (GtkWidget * prefs_dialog, gint entry_number);
};
GtkType nautilus_preferences_dialog_get_type (void);
......
......@@ -68,6 +68,8 @@ typedef enum
NAUTILUS_PREFERENCE_ITEM_EDITABLE_INTEGER,
NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING,
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_HORIZONTAL_RADIO,
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_LIST_HORIZONTAL,
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_LIST_VERTICAL,
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_MENU,
NAUTILUS_PREFERENCE_ITEM_ENUMERATION_VERTICAL_RADIO,
NAUTILUS_PREFERENCE_ITEM_FONT,
......
......@@ -49,7 +49,8 @@ typedef enum
{
PREFERENCE_BOOLEAN = 1,
PREFERENCE_INTEGER,
PREFERENCE_STRING
PREFERENCE_STRING,
PREFERENCE_STRING_LIST
} PreferenceType;
/*
......@@ -783,6 +784,22 @@ update_auto_string (gpointer data, gpointer callback_data)
*(char **)storage = g_strdup (value);
}
static void
update_auto_string_list (gpointer data, gpointer callback_data)
{
EelStringList **storage;
const EelStringList *value;
g_return_if_fail (data != NULL);
g_return_if_fail (callback_data != NULL);
storage = (EelStringList **)data;
value = (const EelStringList *)callback_data;
eel_string_list_free (*storage);
*(EelStringList **)storage = eel_string_list_copy (value);
}
static void
update_auto_integer_or_boolean (gpointer data, gpointer callback_data)
{
......@@ -795,6 +812,7 @@ static void
preferences_entry_update_auto_storage (PreferencesEntry *entry)
{
char *new_string_value;
EelStringList *new_string_list_value;
int new_int_value;
gboolean new_boolean_value;
......@@ -806,6 +824,13 @@ preferences_entry_update_auto_storage (PreferencesEntry *entry)
new_string_value);
g_free (new_string_value);
break;
case PREFERENCE_STRING_LIST:
new_string_list_value = nautilus_preferences_get_string_list (entry->name);
g_list_foreach (entry->auto_storage_list,
update_auto_string_list,
new_string_list_value);
eel_string_list_free (new_string_list_value);
break;
case PREFERENCE_INTEGER:
new_int_value = nautilus_preferences_get_integer (entry->name);
g_list_foreach (entry->auto_storage_list,
......@@ -1070,6 +1095,9 @@ preferences_entry_remove_auto_storage (PreferencesEntry *entry,
case PREFERENCE_STRING:
update_auto_string (storage, NULL);
break;
case PREFERENCE_STRING_LIST:
update_auto_string_list (storage, NULL);
break;
case PREFERENCE_BOOLEAN:
case PREFERENCE_INTEGER:
update_auto_integer_or_boolean (storage, 0);
......@@ -1302,6 +1330,27 @@ nautilus_preferences_add_auto_string (const char *name,
g_free (value);
}