Merge branch '2676_learn_f13-f20_fix'

* 2676_learn_f13-f20_fix:
  Ticket #2676 (save of some learned keys is broken)
This commit is contained in:
Ilia Maslakov 2011-12-06 11:47:19 +04:00
commit 5cc8114d33
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);
}