]> err.no Git - mapper/blobdiff - src/mapper.c
Parse directly but update informations in callbacks only if we got a sentence that...
[mapper] / src / mapper.c
index e31e94c5b2571f7d84f8d6915176f24f67bdb996..bb51c85c2705ae582140d9b8b513dfc91668e1ae 100644 (file)
@@ -58,6 +58,7 @@
 #include "mapper-types.h"
 #include "settings.h"
 #include "gps.h"
+#include "gps-conn.h"
 #include "map.h"
 #include "route.h"
 #include "track.h"
@@ -286,6 +287,12 @@ switch (mis) {
                gnome_vfs_init();
                /* XXX: Load GPS configuration, then create gps */
                _gps=gps_new(GPS_IO_SIMULATION);
+               _gps->connection_retry=gps_retry_connection;
+               _gps->connection_error=NULL;
+               _gps->connection_progress=gps_conn_set_progress;
+               _gps->update_location=gps_location_update;
+               _gps->update_info=gps_info_update;
+
                timezone_init();
                gpx_init();
                variables_init();
@@ -339,6 +346,7 @@ switch (mis) {
                /* Initialize D-Bus system connection. */
                if (NULL == (dbus_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error))) {
                        g_printerr("Failed to open connection to D-Bus: %s.\n", error->message);
+                       popup_error(_window, "Failed to connect to D-Bus.");
                        error = NULL;
                }
 
@@ -347,12 +355,6 @@ switch (mis) {
                osso_hw_set_event_cb(_osso, NULL, osso_cb_hw_state, NULL);
                #endif
 
-               #ifdef WITH_HILDON_DBUS_BT
-               if (NULL == (_rfcomm_req_proxy = dbus_g_proxy_new_for_name(dbus_conn, BTCOND_SERVICE, BTCOND_REQ_PATH, BTCOND_REQ_INTERFACE))) {
-                       g_printerr("Failed to open connection to %s.\n", BTCOND_REQ_INTERFACE);
-                       popup_error(_window, "Bluetooth connection handling failed.");
-               }
-               #endif
                mis=MAPPER_INIT_UI;
                p=0.9;
                w="Misc";
@@ -375,7 +377,7 @@ switch (mis) {
        case MAPPER_INIT_DONE:
                progress_dialog_remove(init_dialog);
                if (_enable_gps)   
-               gps_connect_now(_gps);
+                       gps_connect_now(_gps);
                return FALSE;
        break;
 }