mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Fix bug that prevented a reasonable default from being fetched. Use the
provided default value if the stored one is null.
This commit is contained in:
parent
9f1eccb99b
commit
fbd277e07a
4 changed files with 24 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-04-18 Ramiro Estrugo <ramiro@eazel.com>
|
||||
|
||||
* nautilus-widgets/nautilus-preferences.c:
|
||||
(preference_get): If the stored default_value is NULL, then used
|
||||
the provided one.
|
||||
|
||||
2000-04-19 Andy Hertzfeld <andy@eazel.com>
|
||||
|
||||
added better abstraction for the xml-based links introduced yesterday
|
||||
|
|
|
@ -506,10 +506,10 @@ preference_set (NautilusPreferences *preferences,
|
|||
|
||||
static void
|
||||
preference_get (const NautilusPreferences *preferences,
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
{
|
||||
PrefHashNode *pref_hash_node;
|
||||
|
||||
|
@ -525,7 +525,8 @@ preference_get (const NautilusPreferences *preferences,
|
|||
|
||||
g_assert (pref_hash_node != NULL);
|
||||
|
||||
*value_out = pref_hash_node->value;
|
||||
/* If the stored default_value is NULL, then used the provided one */
|
||||
*value_out = (pref_hash_node->value ? pref_hash_node->value : default_value);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -506,10 +506,10 @@ preference_set (NautilusPreferences *preferences,
|
|||
|
||||
static void
|
||||
preference_get (const NautilusPreferences *preferences,
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
{
|
||||
PrefHashNode *pref_hash_node;
|
||||
|
||||
|
@ -525,7 +525,8 @@ preference_get (const NautilusPreferences *preferences,
|
|||
|
||||
g_assert (pref_hash_node != NULL);
|
||||
|
||||
*value_out = pref_hash_node->value;
|
||||
/* If the stored default_value is NULL, then used the provided one */
|
||||
*value_out = (pref_hash_node->value ? pref_hash_node->value : default_value);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -506,10 +506,10 @@ preference_set (NautilusPreferences *preferences,
|
|||
|
||||
static void
|
||||
preference_get (const NautilusPreferences *preferences,
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
const char *name,
|
||||
NautilusPreferenceType type,
|
||||
gconstpointer default_value,
|
||||
gconstpointer *value_out)
|
||||
{
|
||||
PrefHashNode *pref_hash_node;
|
||||
|
||||
|
@ -525,7 +525,8 @@ preference_get (const NautilusPreferences *preferences,
|
|||
|
||||
g_assert (pref_hash_node != NULL);
|
||||
|
||||
*value_out = pref_hash_node->value;
|
||||
/* If the stored default_value is NULL, then used the provided one */
|
||||
*value_out = (pref_hash_node->value ? pref_hash_node->value : default_value);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue