Diff of /trunk/src/map-tool.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 148 by harbaum, Wed Oct 28 11:57:54 2009 UTC revision 149 by harbaum, Thu Oct 29 13:59:16 2009 UTC
# Line 670  static void on_window_destroy(GtkWidget Line 670  static void on_window_destroy(GtkWidget
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;
# Line 713  void map_update(appdata_t *appdata) { Line 714  void map_update(appdata_t *appdata) {
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    
# Line 803  void map(appdata_t *appdata) { Line 810  void map(appdata_t *appdata) {
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 */

Legend:
Removed from v.148  
changed lines
  Added in v.149