git-svn-id: svn+ssh://garage/var/lib/gforge/svnroot/maemo-mapper/trunk@220
6c538b50-5814-0410-93ad-
8bdf4c0149d1
#include <string.h>
#include <math.h>
#include <gtk/gtk.h>
#include <string.h>
#include <math.h>
#include <gtk/gtk.h>
+#include <gconf/gconf-client.h>
#ifndef LEGACY
# include <hildon/hildon-note.h>
#ifndef LEGACY
# include <hildon/hildon-note.h>
#include "poi.h"
#include "util.h"
#include "poi.h"
#include "util.h"
+#define GCONF_SUPL_KEY_PREFIX "/system/osso/supl"
+#define GCONF_KEY_SUPL_LAT GCONF_SUPL_KEY_PREFIX"/pos_latitude"
+#define GCONF_KEY_SUPL_LON GCONF_SUPL_KEY_PREFIX"/pos_longitude"
+#define GCONF_KEY_SUPL_TIME GCONF_SUPL_KEY_PREFIX"/pos_timestamp"
static void
cmenu_show_latlon(gint unitx, gint unity)
static void
cmenu_show_latlon(gint unitx, gint unity)
/* Move mark to new location. */
map_refresh_mark(_center_mode > 0);
/* Move mark to new location. */
map_refresh_mark(_center_mode > 0);
+ GConfClient *gconf_client = gconf_client_get_default();
+ GTimeVal curtime;
+
+ gconf_client_set_float(gconf_client, GCONF_KEY_SUPL_LON, _gps.lon, NULL);
+ gconf_client_set_float(gconf_client, GCONF_KEY_SUPL_LAT, _gps.lat, NULL);
+ g_get_current_time(&curtime);
+ gconf_client_set_float(gconf_client, GCONF_KEY_SUPL_TIME, curtime.tv_sec, NULL);
+
+ g_object_unref(gconf_client);
+
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
if(SQLITE_OK != sqlite3_bind_double(_stmt_insert_poi, 1, poi.lat)
|| SQLITE_OK != sqlite3_bind_double(_stmt_insert_poi, 2, poi.lon)
|| SQLITE_OK != sqlite3_bind_text(_stmt_insert_poi, 3, poi.label,
if(SQLITE_OK != sqlite3_bind_double(_stmt_insert_poi, 1, poi.lat)
|| SQLITE_OK != sqlite3_bind_double(_stmt_insert_poi, 2, poi.lon)
|| SQLITE_OK != sqlite3_bind_text(_stmt_insert_poi, 3, poi.label,
|| SQLITE_OK != sqlite3_bind_text(_stmt_insert_poi, 4, poi.desc,
|| SQLITE_OK != sqlite3_bind_text(_stmt_insert_poi, 4, poi.desc,
|| SQLITE_OK != sqlite3_bind_int(_stmt_insert_poi, 5, poi.cat_id)
|| SQLITE_DONE != sqlite3_step(_stmt_insert_poi))
{
|| SQLITE_OK != sqlite3_bind_int(_stmt_insert_poi, 5, poi.cat_id)
|| SQLITE_DONE != sqlite3_step(_stmt_insert_poi))
{