Migrated to new user configuration.

git-svn-id: https://gpredict.svn.sourceforge.net/svnroot/gpredict/trunk@366 ab6734ba-2843-0410-b83b-99c217ef6c0f
This commit is contained in:
csete 2009-08-06 09:44:45 +00:00
parent 6b3a20b170
commit db02627cd3
7 changed files with 14 additions and 52 deletions

View file

@ -639,7 +639,6 @@ create_conf_widgets (GtkRigCtrl *ctrl)
GtkWidget *frame,*table,*label,*timer;
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
gchar **vbuff;
const gchar *filename; /* file name */
@ -662,10 +661,7 @@ create_conf_widgets (GtkRigCtrl *ctrl)
"unless you select a secondary device for uplink"));
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {
@ -2341,17 +2337,13 @@ static gboolean have_conf ()
{
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
const gchar *filename; /* file name */
gint i = 0;
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {

View file

@ -469,7 +469,6 @@ create_conf_widgets (GtkRotCtrl *ctrl)
GtkWidget *frame,*table,*label,*timer,*toler;
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
gchar **vbuff;
const gchar *filename; /* file name */
@ -490,10 +489,7 @@ create_conf_widgets (GtkRotCtrl *ctrl)
gtk_widget_set_tooltip_text (ctrl->DevSel, _("Select antenna rotator device"));
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {
@ -1202,17 +1198,13 @@ static gboolean have_conf ()
{
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
const gchar *filename; /* file name */
gint i = 0;
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {

View file

@ -70,9 +70,8 @@ gboolean radio_conf_read (radio_conf_t *conf)
return FALSE;
}
confdir = get_conf_dir();
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
"hwconf", G_DIR_SEPARATOR_S,
conf->name, ".rig", NULL);
g_free (confdir);
@ -245,9 +244,8 @@ void radio_conf_save (radio_conf_t *conf)
/* convert to text sdata */
data = g_key_file_to_data (cfg, &len, NULL);
confdir = get_conf_dir();
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
"hwconf", G_DIR_SEPARATOR_S,
conf->name, ".rig", NULL);
g_free (confdir);

View file

@ -67,9 +67,8 @@ gboolean rotor_conf_read (rotor_conf_t *conf)
return FALSE;
}
confdir = get_conf_dir();
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
"hwconf", G_DIR_SEPARATOR_S,
conf->name, ".rot", NULL);
g_free (confdir);
@ -193,9 +192,8 @@ void rotor_conf_save (rotor_conf_t *conf)
/* convert to text sdata */
data = g_key_file_to_data (cfg, &len, NULL);
confdir = get_conf_dir();
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
"hwconf", G_DIR_SEPARATOR_S,
conf->name, ".rot", NULL);
g_free (confdir);

View file

@ -227,7 +227,6 @@ static GtkTreeModel *create_and_fill_model ()
GtkTreeIter item; /* new item added to the list store */
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
gchar **vbuff;
const gchar *filename; /* file name */
@ -247,10 +246,7 @@ static GtkTreeModel *create_and_fill_model ()
);
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {
@ -393,10 +389,7 @@ void sat_pref_rig_ok ()
/* delete all .rig files */
buff = get_conf_dir ();
dirname = g_strconcat (buff, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (buff);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {

View file

@ -195,7 +195,6 @@ static GtkTreeModel *create_and_fill_model ()
GtkTreeIter item; /* new item added to the list store */
GDir *dir = NULL; /* directory handle */
GError *error = NULL; /* error flag and info */
gchar *cfgdir;
gchar *dirname; /* directory name */
gchar **vbuff;
const gchar *filename; /* file name */
@ -214,10 +213,7 @@ static GtkTreeModel *create_and_fill_model ()
);
/* open configuration directory */
cfgdir = get_conf_dir ();
dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (cfgdir);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {
@ -357,10 +353,7 @@ void sat_pref_rot_ok ()
/* delete all .rot files */
buff = get_conf_dir ();
dirname = g_strconcat (buff, G_DIR_SEPARATOR_S,
"hwconf", NULL);
g_free (buff);
dirname = get_hwconf_dir ();
dir = g_dir_open (dirname, 0, &error);
if (dir) {

View file

@ -51,16 +51,13 @@ GSList *read_transponders (guint catnum)
trsp_t *trsp;
GKeyFile *cfg = NULL;
GError *error = NULL;
gchar *name,*fname,*confdir;
gchar *name,*fname;
gchar **groups;
gsize numgrp,i;
name = g_strdup_printf ("%d.trsp", catnum);
confdir = get_conf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
"trsp", G_DIR_SEPARATOR_S,
name, NULL);
fname = trsp_file_name (name);
cfg = g_key_file_new ();
if (!g_key_file_load_from_file (cfg, fname, G_KEY_FILE_KEEP_COMMENTS, &error)) {
@ -158,7 +155,6 @@ GSList *read_transponders (guint catnum)
g_strfreev (groups);
g_key_file_free (cfg);
g_free (name);
g_free (confdir);
g_free (fname);