New.
* e-config-listener.c (e_config_listener_remove_value): New. * e-passwords.c (e_passwords_get_password): Don't look at the passwords hash until calling e_passwords_init(). svn path=/trunk/; revision=19253
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
2003-01-07 Dan Winship <danw@ximian.com>
|
||||
|
||||
* e-config-listener.c (e_config_listener_remove_value): New.
|
||||
|
||||
* e-passwords.c (e_passwords_get_password): Don't look at the
|
||||
passwords hash until calling e_passwords_init().
|
||||
|
||||
2003-01-06 Dan Winship <danw@ximian.com>
|
||||
|
||||
* e-html-utils.c: Add this back: Connector needs it, and there's
|
||||
|
@ -561,11 +561,34 @@ e_config_listener_set_string (EConfigListener *cl, const char *key, const char *
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
e_config_listener_remove_value (EConfigListener *cl, const char *key)
|
||||
{
|
||||
gpointer orig_key, orig_value;
|
||||
|
||||
g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
|
||||
g_return_if_fail (key != NULL);
|
||||
|
||||
if (g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
|
||||
KeyData *kd = orig_value;
|
||||
|
||||
g_hash_table_remove (cl->priv->keys, key);
|
||||
g_free (kd->key);
|
||||
if (kd->type == GCONF_VALUE_STRING)
|
||||
g_free (kd->value.v_str);
|
||||
gconf_client_notify_remove (cl->priv->db, kd->lid);
|
||||
|
||||
g_free (kd);
|
||||
}
|
||||
|
||||
gconf_client_unset (cl->priv->db, key, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
e_config_listener_remove_dir (EConfigListener *cl, const char *dir)
|
||||
{
|
||||
GSList *slist, *iter;
|
||||
gchar *key;
|
||||
const gchar *key;
|
||||
|
||||
g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
|
||||
g_return_if_fail (dir != NULL);
|
||||
|
@ -70,7 +70,10 @@ void e_config_listener_set_string (EConfigListener *cl,
|
||||
const char *key,
|
||||
const char *value);
|
||||
|
||||
void e_config_listener_remove_dir (EConfigListener *cl, const char *dir);
|
||||
void e_config_listener_remove_value (EConfigListener *cl,
|
||||
const char *key);
|
||||
void e_config_listener_remove_dir (EConfigListener *cl,
|
||||
const char *dir);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -219,11 +219,12 @@ e_passwords_forget_password (const char *component_name, const char *key)
|
||||
char *
|
||||
e_passwords_get_password (const char *component_name, const char *key)
|
||||
{
|
||||
char *path, *passwd = g_hash_table_lookup (passwords, key);
|
||||
char *path, *passwd;
|
||||
char *encoded = NULL;
|
||||
|
||||
e_passwords_init ();
|
||||
|
||||
passwd = g_hash_table_lookup (passwords, key);
|
||||
if (passwd)
|
||||
return g_strdup (passwd);
|
||||
|
||||
|
Reference in New Issue
Block a user