[Gpredict-svn] SF.net SVN: gpredict:[370] trunk/src/gtk-sat-module.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <cs...@us...> - 2009-08-06 13:25:00
|
Revision: 370 http://gpredict.svn.sourceforge.net/gpredict/?rev=370&view=rev Author: csete Date: 2009-08-06 13:24:48 +0000 (Thu, 06 Aug 2009) Log Message: ----------- Migrated to new user configuration. Modified Paths: -------------- trunk/src/gtk-sat-module.c Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-08-06 12:32:31 UTC (rev 369) +++ trunk/src/gtk-sat-module.c 2009-08-06 13:24:48 UTC (rev 370) @@ -537,6 +537,7 @@ { gchar *buffer = NULL; gchar *qthfile; + gchar *confdir; gchar **buffv; GError *error = NULL; @@ -576,9 +577,9 @@ MOD_CFG_QTH_FILE_KEY, SAT_CFG_STR_DEF_QTH); - qthfile = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, - ".gpredict2", G_DIR_SEPARATOR_S, - buffer, NULL); + confdir = get_user_conf_dir (); + qthfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, buffer, NULL); + /* load QTH data */ if (!qth_data_read (qthfile, module->qth)) { @@ -597,9 +598,7 @@ /* try SAT_CFG_STR_DEF_QTH */ buffer = sat_cfg_get_str (SAT_CFG_STR_DEF_QTH); - qthfile = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, - ".gpredict2", G_DIR_SEPARATOR_S, - buffer, NULL); + qthfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, buffer, NULL); if (!qth_data_read (qthfile, module->qth)) { @@ -617,6 +616,7 @@ } g_free (buffer); + g_free (confdir); g_free (qthfile); @@ -1261,14 +1261,9 @@ gtk_sat_module_close_cb (NULL, module); - cfgfile = g_strconcat (g_get_home_dir (), - G_DIR_SEPARATOR_S, - ".gpredict2", - G_DIR_SEPARATOR_S, - "modules", - G_DIR_SEPARATOR_S, - name, ".mod", - NULL); + gchar *confdir = get_modules_dir (); + cfgfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, name, ".mod", NULL); + g_free (confdir); module = GTK_SAT_MODULE (gtk_sat_module_new (cfgfile)); module->state = laststate; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |