670 |
#endif |
#endif |
671 |
|
|
672 |
gtk_timeout_remove(context->handler_id); |
gtk_timeout_remove(context->handler_id); |
673 |
|
gps_unregister_callback(appdata, context->cb_id); |
674 |
|
|
675 |
g_free(context); |
g_free(context); |
676 |
appdata->map.context = NULL; |
appdata->map.context = NULL; |
714 |
#endif |
#endif |
715 |
} |
} |
716 |
|
|
717 |
|
/* callback called by the gps layer whenever gps state changes */ |
718 |
|
static void |
719 |
|
gps_callback(struct gps_state *state, gpointer data) { |
720 |
|
printf("map: gps callback\n"); |
721 |
|
} |
722 |
|
|
723 |
void map(appdata_t *appdata) { |
void map(appdata_t *appdata) { |
724 |
map_context_t *context = NULL; |
map_context_t *context = NULL; |
725 |
|
|
810 |
|
|
811 |
/* install handler for timed updates of the gps button */ |
/* install handler for timed updates of the gps button */ |
812 |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
813 |
|
context->cb_id = gps_register_callback(appdata, gps_callback, context); |
814 |
|
|
815 |
#if MAEMO_VERSION_MAJOR == 5 |
#if MAEMO_VERSION_MAJOR == 5 |
816 |
/* prevent some of the main screen things */ |
/* prevent some of the main screen things */ |