]> err.no Git - mapper/blobdiff - src/maemo-osso.c
Fixes to gstreamer element and caps handlings.
[mapper] / src / maemo-osso.c
index 203cd88903d3245d6c57358bf70e006fc2ea5202..9f6354bfdf35388822f1dfa4cc6a0f952541278e 100644 (file)
@@ -44,7 +44,6 @@
 #include "map-download.h"
 #include "route.h"
 #include "mapper-types.h"
-#include "bt.h"
 #include "gps.h"
 #include "settings-gconf.h"
 #include "settings.h"
@@ -70,12 +69,12 @@ if (state->system_inactivity_ind) {
        if (_must_save_data)
                _must_save_data = FALSE;
        else {
-               if (_conn_state > RCVR_OFF) {
+               if (_gps->io.conn > RCVR_OFF) {
                        if (gconf_client_get_bool(gconf_client, GCONF_KEY_DISCONNECT_ON_COVER, NULL)) {
                                gconf_client_clear_cache(gconf_client);
-                               gps_conn_set_state(RCVR_OFF);
-                               rcvr_disconnect();
-                               track_add(0, FALSE);
+                               gps_conn_set_state(_gps, RCVR_OFF);
+                               gps_disconnect(_gps);
+                               track_add(NULL);
                                /* Pretend autoroute is in progress to avoid download. */
                                if (_autoroute_data.enabled)
                                        _autoroute_data.in_progress = TRUE;
@@ -92,9 +91,9 @@ if (state->system_inactivity_ind) {
 } else if (state->memory_low_ind) {
        poi_icon_hash_clear();
 } else {
-       if (_conn_state == RCVR_OFF && _enable_gps) {
-               gps_conn_set_state(RCVR_DOWN);
-               rcvr_connect_later();
+       if (_gps->io.conn == RCVR_OFF && _enable_gps) {
+               gps_conn_set_state(_gps, RCVR_DOWN);
+               gps_connect_later(_gps);
                if (_autoroute_data.enabled)
                        _autoroute_data.in_progress = TRUE;
        }