From 4c759d9c36bc39b9646012cb62408e71bf8e2a9b Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 24 Jan 2008 17:04:53 +0200 Subject: [PATCH] Handle gps type and port --- src/config-gconf.c | 11 ++++++++--- src/settings-gconf.h | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/config-gconf.c b/src/config-gconf.c index cafda29..492e8c8 100644 --- a/src/config-gconf.c +++ b/src/config-gconf.c @@ -236,9 +236,12 @@ g_mkdir_with_parents(config_dir, 0700); /* Save Receiver MAC from GConf. */ if (_gps->io.address) - gconf_client_set_string(gconf_client, GCONF_KEY_RCVR_MAC, _gps->io.address, NULL); + gconf_client_set_string(gconf_client, GCONF_KEY_GPS_MAC, _gps->io.address, NULL); else - gconf_client_unset(gconf_client, GCONF_KEY_RCVR_MAC, NULL); + gconf_client_unset(gconf_client, GCONF_KEY_GPS_MAC, NULL); + +gconf_client_set_int(gconf_client, GCONF_KEY_GPS_TYPE, _gps->io.type, NULL); +gconf_client_set_int(gconf_client, GCONF_KEY_GPS_PORT, _gps->io.port, NULL); /* Save Auto-Download. */ gconf_client_set_bool(gconf_client, GCONF_KEY_AUTO_DOWNLOAD, _auto_download, NULL); @@ -423,7 +426,9 @@ config_dir = gnome_vfs_expand_initial_tilde(CONFIG_DIR_NAME); g_mkdir_with_parents(config_dir, 0700); /* Get Receiver MAC from GConf. Default is scanned via hci_inquiry. */ -_gps->io.address = gconf_client_get_string(gconf_client, GCONF_KEY_RCVR_MAC, NULL); +_gps->io.address = gconf_client_get_string(gconf_client, GCONF_KEY_GPS_MAC, NULL); +_gps->io.type = gconf_client_get_int(gconf_client, GCONF_KEY_GPS_TYPE, NULL); +_gps->io.port = gconf_client_get_int(gconf_client, GCONF_KEY_GPS_PORT, NULL); /* Get Auto-Download. Default is FALSE. */ _auto_download = gconf_client_get_bool(gconf_client, GCONF_KEY_AUTO_DOWNLOAD, NULL); diff --git a/src/settings-gconf.h b/src/settings-gconf.h index 3fe6db4..f13d391 100644 --- a/src/settings-gconf.h +++ b/src/settings-gconf.h @@ -16,8 +16,10 @@ #define REPO_DEFAULT_VIEW_ZOOM_STEPS (1) /* GPS */ -#define GCONF_KEY_RCVR_MAC GCONF_KEY_PREFIX"/receiver_mac" -#define GCONF_KEY_RCVR_CHAN GCONF_KEY_PREFIX"/receiver_channel" +#define GCONF_KEY_GPS_TYPE GCONF_KEY_PREFIX"/receiver_type" +#define GCONF_KEY_GPS_MAC GCONF_KEY_PREFIX"/receiver_mac" +#define GCONF_KEY_GPS_PORT GCONF_KEY_PREFIX"/receiver_port" +#define GCONF_KEY_GPS_CHAN GCONF_KEY_PREFIX"/receiver_channel" #define GCONF_KEY_ENABLE_GPS GCONF_KEY_PREFIX"/enable_gps" #define GCONF_KEY_GPS_INFO GCONF_KEY_PREFIX"/gps_info" -- 2.39.5