diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 8d1f76026..291d37c4d 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -1571,6 +1571,9 @@ save_setup_cmd (void) if (save_setup (TRUE, TRUE)) message (D_NORMAL, _("Setup"), _("Setup saved to %s%s%s"), mc_config_get_path (), PATH_SEP_STR, MC_CONFIG_FILE); + else + message (D_ERROR, _("Setup"), _("Unable to save setup to %s%s%s"), + mc_config_get_path (), PATH_SEP_STR, MC_CONFIG_FILE); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c index 9d2fb969e..7acbbe514 100644 --- a/src/filemanager/panelize.c +++ b/src/filemanager/panelize.c @@ -515,7 +515,6 @@ save_panelize (void) mc_config_set_string (mc_main_config, panelize_section, current->label, current->command); } - mc_config_save_file (mc_main_config, NULL); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/setup.c b/src/setup.c index 2d7dad78a..8a775c712 100644 --- a/src/setup.c +++ b/src/setup.c @@ -1008,7 +1008,6 @@ save_setup (gboolean save_options, gboolean save_panel_options) tmp_profile = g_build_filename (mc_config_get_path (), MC_CONFIG_FILE, NULL); ret = mc_config_save_to_file (mc_main_config, tmp_profile, NULL); - g_free (tmp_profile); } @@ -1056,12 +1055,8 @@ done_setup (void) void save_config (void) { - char *profile; - GError *error = NULL; size_t i; - profile = g_build_filename (mc_config_get_path (), MC_CONFIG_FILE, NULL); - /* Save integer options */ for (i = 0; int_options[i].opt_name != NULL; i++) mc_config_set_int (mc_main_config, CONFIG_APP_SECTION, int_options[i].opt_name, @@ -1071,11 +1066,6 @@ save_config (void) for (i = 0; str_options[i].opt_name != NULL; i++) mc_config_set_string (mc_main_config, CONFIG_APP_SECTION, str_options[i].opt_name, *str_options[i].opt_addr); - - if (!mc_config_save_to_file (mc_main_config, profile, &error)) - setup_save_config_show_error (profile, &error); - - g_free (profile); } /* --------------------------------------------------------------------------------------------- */ @@ -1096,15 +1086,11 @@ setup_save_config_show_error (const char *filename, GError ** error) void save_layout (void) { - char *profile; size_t i; - profile = g_build_filename (mc_config_get_path (), MC_CONFIG_FILE, NULL); /* Save integer options */ for (i = 0; layout[i].opt_name != NULL; i++) mc_config_set_int (mc_main_config, "Layout", layout[i].opt_name, *layout[i].opt_addr); - mc_config_save_to_file (mc_main_config, profile, NULL); - g_free (profile); } /* --------------------------------------------------------------------------------------------- */