Renamed mc_config_direct_set_string() to mc_config_set_string_raw()

... and avoid any string modification before save to ini.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-11-16 13:52:23 +03:00
parent bbb6233049
commit 1ae9172d2a
3 changed files with 6 additions and 10 deletions

View File

@ -64,7 +64,7 @@ int *mc_config_get_int_list (mc_config_t *, const gchar *, const gchar *, gsize
/* mcconfig/set.c: */
void mc_config_direct_set_string (mc_config_t *, const gchar *, const gchar *, const gchar *);
void mc_config_set_string_raw (mc_config_t *, const gchar *, const gchar *, const gchar *);
void mc_config_set_string (mc_config_t *, const gchar *, const gchar *, const gchar *);

View File

@ -66,19 +66,15 @@ mc_config_normalize_before_save (const gchar * value)
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void
mc_config_direct_set_string (mc_config_t * mc_config, const gchar * group,
const gchar * param, const gchar * value)
mc_config_set_string_raw (mc_config_t * mc_config, const gchar * group,
const gchar * param, const gchar * value)
{
gchar *buffer;
if (!mc_config || !group || !param || !value)
return;
buffer = mc_config_normalize_before_save (value);
g_key_file_set_value (mc_config->handle, group, param, buffer);
g_free (buffer);
g_key_file_set_value (mc_config->handle, group, param, value);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

View File

@ -367,8 +367,8 @@ learn_save (void)
esc_str = strutils_escape (learnkeys[i].sequence, -1, ";\\", TRUE);
mc_config_direct_set_string (mc_main_config, section,
key_name_conv_tab[i].name, esc_str);
mc_config_set_string_raw (mc_main_config, section,
key_name_conv_tab[i].name, esc_str);
g_free (esc_str);
}