From: Alexandru C. <cs...@us...> - 2006-07-30 19:35:51
|
Update of /cvsroot/groundstation/gpredict2/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21298 Modified Files: first-time.c sat-cfg.c Log Message: Include Amateur.mod into initial setup. Index: first-time.c =================================================================== RCS file: /cvsroot/groundstation/gpredict2/src/first-time.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** first-time.c 27 Apr 2006 21:40:16 -0000 1.4 --- first-time.c 30 Jul 2006 19:35:48 -0000 1.5 *************** *** 66,70 **** * directory. * 3. Check for the existence of $HOME/.gpredict2/modules directory and create ! * it if it does not exist. * 4. Check for the existence of $HOME/.gpredict2/tle directory and create it if * it does not exist. --- 66,71 ---- * directory. * 3. Check for the existence of $HOME/.gpredict2/modules directory and create ! * it if it does not exist. Copy PACKAGE_DATA_DIR/data/Amateur.mod to the ! * newly created directory. * 4. Check for the existence of $HOME/.gpredict2/tle directory and create it if * it does not exist. *************** *** 236,241 **** first_time_check_step_03 (guint *error) { ! gchar *dir; ! int status; dir = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, --- 237,245 ---- first_time_check_step_03 (guint *error) { ! gchar *dir; ! int status; ! gchar *target; ! gchar *filename; ! dir = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, *************** *** 269,272 **** --- 273,297 ---- _("%s: Created %s."), __FUNCTION__, dir); + + /* copy Amateur.mod to this directory */ + filename = data_file_name ("Amateur.mod"); + target = g_strconcat (dir, G_DIR_SEPARATOR_S, + "Amateur.mod", NULL); + + if (gpredict_file_copy (filename, target)) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to copy Amateur.mod"), + __FUNCTION__); + + *error |= FTC_ERROR_STEP_02; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Copied amateur.mod to %s/"), + __FUNCTION__, dir); + } + + g_free (target); + g_free (filename); } } Index: sat-cfg.c =================================================================== RCS file: /cvsroot/groundstation/gpredict2/src/sat-cfg.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** sat-cfg.c 30 Jul 2006 19:26:40 -0000 1.45 --- sat-cfg.c 30 Jul 2006 19:35:48 -0000 1.46 *************** *** 173,177 **** { "GLOBAL", "TIME_FORMAT", "%Y/%m/%d %H:%M:%S"}, { "GLOBAL", "DEFAULT_QTH", "sample.qth"}, ! { "GLOBAL", "OPEN_MODULES", NULL}, { "GLOBAL", "HTML_BROWSER", NULL}, { "MODULES", "MAP_INFO_BGD_COLOUR", "000000"}, /* RRGGBB hex */ --- 173,177 ---- { "GLOBAL", "TIME_FORMAT", "%Y/%m/%d %H:%M:%S"}, { "GLOBAL", "DEFAULT_QTH", "sample.qth"}, ! { "GLOBAL", "OPEN_MODULES", "Amateur.mod"}, { "GLOBAL", "HTML_BROWSER", NULL}, { "MODULES", "MAP_INFO_BGD_COLOUR", "000000"}, /* RRGGBB hex */ |