From 4d34d9dfbe91e2d3e864d71d968cd88144fc63ed Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 27 Sep 2002 00:04:26 +0000 Subject: [PATCH] * hotlist.c (load_hotlist): Remove compatibility code with hotlist files created by ancient versions of mc. --- src/ChangeLog | 3 +++ src/hotlist.c | 55 --------------------------------------------------- 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fdfd26d01..84cc79a2c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-09-26 Pavel Roskin + * hotlist.c (load_hotlist): Remove compatibility code with + hotlist files created by ancient versions of mc. + * command.c (do_cd_command): Reuse translated message. * user.c (check_patterns): Ignore invalid shell_patterns and diff --git a/src/hotlist.c b/src/hotlist.c index 099f13c34..6f120bf8d 100644 --- a/src/hotlist.c +++ b/src/hotlist.c @@ -1352,8 +1352,6 @@ clean_up_hotlist_groups (char *section) void load_hotlist (void) { - char *grp_section; - int has_old_list = 0; int remove_old_list = 0; struct stat stat_buf; @@ -1377,11 +1375,6 @@ void load_hotlist (void) */ hotlist->directory = g_strdup ("Hotlist"); - grp_section = g_strconcat ("Hotlist", ".Group", NULL); - has_old_list = profile_has_section ("Hotlist", profile_name) || - profile_has_section (grp_section, profile_name); - g_free (grp_section); - if ((hotlist_file = fopen (hotlist_file_name, "r")) == 0) { int result; @@ -1408,54 +1401,6 @@ void load_hotlist (void) hot_load_file (hotlist); fclose (hotlist_file); hotlist_state.loaded = 1; - if (has_old_list) { - int result; - char *msg; - - msg = g_strconcat ( - _("You have ~/"), HOTLIST_FILENAME, _(" file and [Hotlist] section in ~/"), PROFILE_NAME, "\n", - _("Your ~/"), HOTLIST_FILENAME, _(" most probably was created\n"), - _("by an earlier development version of MC\nand is more actual than ~/"), - PROFILE_NAME, _(" entries\n\n"), - _("You can choose between\n\n" - " Remove - remove old hotlist entries from ~/"), PROFILE_NAME, "\n", - _(" Keep - keep your old entries; you will be asked\n" - " the same question next time\n" - " Merge - add old entries to hotlist as group \"Entries from ~/"), - PROFILE_NAME, "\"\n\n", NULL); - - result = query_dialog (_(" Hotlist Load "), - msg, D_ERROR, 3, _("&Remove"), _("&Keep"), _("&Merge")); - if (result == 0) - remove_old_list = 1; - else if (result == 2) { - struct hotlist *grp = hotlist->head; - struct hotlist *old; - - hotlist->head = 0; - load_group (hotlist); - - old = new_hotlist (); - old->type = HL_TYPE_GROUP; - old->label = g_strconcat (_(" Entries from ~/"), PROFILE_NAME, NULL); - old->up = hotlist; - old->head = hotlist->head; - old->next = grp; - hotlist->head = old; - hotlist_state.modified = 1; - if (!save_hotlist ()){ - char *str; - - str = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME, - _(" file, your old hotlist entries were not deleted"), NULL); - - message (D_ERROR, _(" Hotlist Load "), str); - g_free (str); - } else - remove_old_list = 1; - hotlist_state.modified = 0; - } - } } if (remove_old_list) {