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

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

revision 282 by harbaum, Wed May 26 19:21:47 2010 UTC revision 288 by harbaum, Mon Jun 7 19:19:50 2010 UTC
# Line 121  float map_gps_get_heading(map_context_t Line 121  float map_gps_get_heading(map_context_t
121  }  }
122    
123  float map_gps_get_eph(map_context_t *context) {  float map_gps_get_eph(map_context_t *context) {
124    if(context->gps.set & FIX_LATLON_SET)    if(context->gps.set & FIX_HERR_SET)
125      return context->gps.fix.eph;      return context->gps.fix.eph;
126    
127    return NAN;    return NAN;
# Line 898  static void on_window_destroy(GtkWidget Line 898  static void on_window_destroy(GtkWidget
898  #endif  #endif
899    
900    gtk_timeout_remove(context->handler_id);    gtk_timeout_remove(context->handler_id);
   gps_unregister_callback(appdata->gps_state, gps_callback);  
901    
902    if(context->caches_displayed) {    if(context->caches_displayed) {
903      g_free(context->caches_displayed);      g_free(context->caches_displayed);
# Line 945  static gboolean on_focus_in(GtkWidget *w Line 944  static gboolean on_focus_in(GtkWidget *w
944      context->handler_id = gtk_timeout_add(1000, map_gps_update, context);      context->handler_id = gtk_timeout_add(1000, map_gps_update, context);
945  #endif  #endif
946    
947      gps_register_callback(context->appdata->gps_state,
948                            LATLON_CHANGED | HERR_CHANGED | TRACK_CHANGED,
949                            gps_callback, context);
950    
951    map_setup(context);    map_setup(context);
952    return FALSE;    return FALSE;
953  }  }
# Line 967  static gboolean on_focus_out(GtkWidget * Line 970  static gboolean on_focus_out(GtkWidget *
970    context->handler_id = 0;    context->handler_id = 0;
971  #endif  #endif
972    
973      gps_unregister_callback(context->appdata->gps_state, gps_callback);
974    
975    return FALSE;    return FALSE;
976  }  }
977    
# Line 1098  void map(appdata_t *appdata) { Line 1103  void map(appdata_t *appdata) {
1103    
1104    /* install handler for timed updates of the gps button */    /* install handler for timed updates of the gps button */
1105    context->handler_id = gtk_timeout_add(1000, map_gps_update, context);    context->handler_id = gtk_timeout_add(1000, map_gps_update, context);
   gps_register_callback(appdata->gps_state, LATLON_CHANGED | HERR_CHANGED,  
                         gps_callback, context);  
1106    
1107  #if MAEMO_VERSION_MAJOR == 5  #if MAEMO_VERSION_MAJOR == 5
1108    /* prevent some of the main screen things */    /* prevent some of the main screen things */

Legend:
Removed from v.282  
changed lines
  Added in v.288