Ticket #2676 (save of some learned keys is broken)

fixed saving of 'F13'-'F20' learned keys.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Andrew Savchenko 2011-12-05 13:45:03 +04:00 committed by Ilia Maslakov
parent b0a218cee2
commit 6d99accfe0
3 changed files with 16 additions and 2 deletions

View File

@ -68,6 +68,8 @@ int *mc_config_get_int_list (mc_config_t *, const gchar *, const gchar *, gsize
void mc_config_set_string_raw (mc_config_t *, const gchar *, const gchar *, const gchar *);
void mc_config_set_string_raw_value (mc_config_t *, const gchar *, const gchar *, const gchar *);
void mc_config_set_string (const mc_config_t *, const gchar *, const gchar *, const gchar *);
void mc_config_set_bool (mc_config_t *, const gchar *, const gchar *, gboolean);

View File

@ -79,6 +79,18 @@ mc_config_set_string_raw (mc_config_t * mc_config, const gchar * group,
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void
mc_config_set_string_raw_value (mc_config_t * mc_config, const gchar * group,
const gchar * param, const gchar * value)
{
if (!mc_config || !group || !param || !value)
return;
g_key_file_set_value (mc_config->handle, group, param, value);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void
mc_config_set_string (const mc_config_t * mc_config, const gchar * group,
const gchar * param, const gchar * value)

View File

@ -371,9 +371,9 @@ learn_save (void)
{
profile_changed = 1;
esc_str = strutils_escape (learnkeys[i].sequence, -1, ";", TRUE);
esc_str = strutils_escape (learnkeys[i].sequence, -1, ";\\", TRUE);
mc_config_set_string_raw (mc_main_config, section, key_name_conv_tab[i].name, esc_str);
mc_config_set_string_raw_value (mc_main_config, section, key_name_conv_tab[i].name, esc_str);
g_free (esc_str);
}