mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-20 18:29:19 +03:00
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:
parent
bbb6233049
commit
1ae9172d2a
@ -64,7 +64,7 @@ int *mc_config_get_int_list (mc_config_t *, const gchar *, const gchar *, gsize
|
|||||||
|
|
||||||
/* mcconfig/set.c: */
|
/* 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 *);
|
void mc_config_set_string (mc_config_t *, const gchar *, const gchar *, const gchar *);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ mc_config_normalize_before_save (const gchar * value)
|
|||||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||||
|
|
||||||
void
|
void
|
||||||
mc_config_direct_set_string (mc_config_t * mc_config, const gchar * group,
|
mc_config_set_string_raw (mc_config_t * mc_config, const gchar * group,
|
||||||
const gchar * param, const gchar * value)
|
const gchar * param, const gchar * value)
|
||||||
{
|
{
|
||||||
gchar *buffer;
|
gchar *buffer;
|
||||||
@ -74,11 +74,7 @@ mc_config_direct_set_string (mc_config_t * mc_config, const gchar * group,
|
|||||||
if (!mc_config || !group || !param || !value)
|
if (!mc_config || !group || !param || !value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
buffer = mc_config_normalize_before_save (value);
|
g_key_file_set_value (mc_config->handle, group, param, value);
|
||||||
|
|
||||||
g_key_file_set_value (mc_config->handle, group, param, buffer);
|
|
||||||
|
|
||||||
g_free (buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||||
|
@ -367,7 +367,7 @@ learn_save (void)
|
|||||||
|
|
||||||
esc_str = strutils_escape (learnkeys[i].sequence, -1, ";\\", TRUE);
|
esc_str = strutils_escape (learnkeys[i].sequence, -1, ";\\", TRUE);
|
||||||
|
|
||||||
mc_config_direct_set_string (mc_main_config, section,
|
mc_config_set_string_raw (mc_main_config, section,
|
||||||
key_name_conv_tab[i].name, esc_str);
|
key_name_conv_tab[i].name, esc_str);
|
||||||
|
|
||||||
g_free (esc_str);
|
g_free (esc_str);
|
||||||
|
Loading…
Reference in New Issue
Block a user