diff --git a/src/ChangeLog b/src/ChangeLog
index 55b4d40..5653ea6 100644
a
|
b
|
|
| 1 | 2009-01-05 Slava Zanko |
| 2 | * main.c (main): remove compatibility_move_mc_files stuff. |
| 3 | |
1 | 4 | 2008-12-19 Roland Illig <roland.illig@gmx.de> |
2 | 5 | |
3 | 6 | * x11conn.c (x11_available): If the X11 shared library cannot be |
diff --git a/src/main.c b/src/main.c
index a59607e..949dcf9 100644
a
|
b
|
handle_args (int argc, char *argv[]) |
2114 | 2114 | poptFreeContext (ctx); |
2115 | 2115 | } |
2116 | 2116 | |
2117 | | /* |
2118 | | * The compatibility_move_mc_files routine is intended to |
2119 | | * move all of the hidden .mc files into a private ~/.mc |
2120 | | * directory in the home directory, to avoid cluttering the users. |
2121 | | * |
2122 | | * Previous versions of the program had all of their files in |
2123 | | * the $HOME, we are now putting them in $HOME/.mc |
2124 | | */ |
2125 | | |
2126 | 2117 | static int |
2127 | 2118 | do_mc_filename_rename (const char *o_name, const char *n_name) |
2128 | 2119 | { |
… |
… |
do_mc_filename_rename (const char *o_name, const char *n_name) |
2136 | 2127 | return move; |
2137 | 2128 | } |
2138 | 2129 | |
2139 | | static int |
2140 | | compatibility_move_mc_files (void) |
2141 | | { |
2142 | | struct stat s; |
2143 | | int move = 0; |
2144 | | char *mc_dir = concat_dir_and_file (home_dir, ".mc"); |
2145 | | |
2146 | | if (stat (mc_dir, &s) && (errno == ENOENT) |
2147 | | && (mkdir (mc_dir, 0777) != -1)) { |
2148 | | |
2149 | | move = do_mc_filename_rename (".mc.ini", "ini"); |
2150 | | move += do_mc_filename_rename (".mc.hot", "hotlist"); |
2151 | | move += do_mc_filename_rename (".mc.ext", "bindings"); |
2152 | | move += do_mc_filename_rename (".mc.menu", "menu"); |
2153 | | move += do_mc_filename_rename (".mc.bashrc", "bashrc"); |
2154 | | move += do_mc_filename_rename (".mc.inputrc", "inputrc"); |
2155 | | move += do_mc_filename_rename (".mc.tcshrc", "tcshrc"); |
2156 | | move += do_mc_filename_rename (".mc.tree", "Tree"); |
2157 | | } |
2158 | | g_free (mc_dir); |
2159 | | return move; |
2160 | | } |
2161 | | |
2162 | 2130 | int |
2163 | 2131 | main (int argc, char *argv[]) |
2164 | 2132 | { |
2165 | | /* if on, it displays the information that files have been moved to ~/.mc */ |
2166 | | int show_change_notice = 0; |
2167 | | |
2168 | 2133 | /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */ |
2169 | 2134 | setlocale (LC_ALL, ""); |
2170 | 2135 | bindtextdomain ("mc", LOCALEDIR); |
… |
… |
main (int argc, char *argv[]) |
2209 | 2174 | /* Install the SIGCHLD handler; must be done before init_subshell() */ |
2210 | 2175 | init_sigchld (); |
2211 | 2176 | |
2212 | | show_change_notice = compatibility_move_mc_files (); |
2213 | | |
2214 | 2177 | /* We need this, since ncurses endwin () doesn't restore the signals */ |
2215 | 2178 | save_stop_handler (); |
2216 | 2179 | |
… |
… |
main (int argc, char *argv[]) |
2248 | 2211 | if (alternate_plus_minus) |
2249 | 2212 | application_keypad_mode (); |
2250 | 2213 | |
2251 | | if (show_change_notice) { |
2252 | | message (1, _(" Notice "), |
2253 | | _(" The Midnight Commander configuration files \n" |
2254 | | " are now stored in the ~/.mc directory, the \n" |
2255 | | " files have been moved now\n")); |
2256 | | } |
2257 | 2214 | #ifdef HAVE_SUBSHELL_SUPPORT |
2258 | 2215 | if (use_subshell) { |
2259 | 2216 | prompt = strip_ctrl_codes (subshell_prompt); |