Diff of /trunk/src/main.c

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

revision 222 by harbaum, Mon Nov 30 21:28:04 2009 UTC revision 223 by harbaum, Tue Dec 1 20:03:51 2009 UTC
# Line 1110  static GtkWidget *gpxlist_create_view_an Line 1110  static GtkWidget *gpxlist_create_view_an
1110  }  }
1111    
1112  /* add last entry in gpx list to visual representation */  /* add last entry in gpx list to visual representation */
1113  static void gpxlist_add(appdata_t *appdata, gpx_t *new) {  void gpxlist_add(appdata_t *appdata, gpx_t *new) {
1114    GtkTreeIter         iter;    GtkTreeIter         iter;
1115    
1116    gtk_list_store_append(appdata->gpxstore, &iter);    gtk_list_store_append(appdata->gpxstore, &iter);
# Line 1120  static void gpxlist_add(appdata_t *appda Line 1120  static void gpxlist_add(appdata_t *appda
1120    gpx_t **gpx = &appdata->gpx;    gpx_t **gpx = &appdata->gpx;
1121    while(*gpx) gpx = &((*gpx)->next);    while(*gpx) gpx = &((*gpx)->next);
1122    *gpx = new;    *gpx = new;
1123    
1124      /* select new iter */
1125      GtkTreeSelection *selection =
1126        gtk_tree_view_get_selection(GTK_TREE_VIEW(appdata->gpxview));
1127      gtk_tree_selection_select_iter(selection, &iter);
1128      GtkTreePath *path =
1129        gtk_tree_model_get_path(GTK_TREE_MODEL(appdata->gpxstore), &iter);
1130      gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(appdata->gpxview),
1131                                   path, NULL, TRUE, 0.0, 0.0);
1132      gtk_tree_path_free(path);
1133  }  }
1134    
1135  /******************** end of gpxlist ********************/  /******************** end of gpxlist ********************/
# Line 2395  int main(int argc, char *argv[]) { Line 2405  int main(int argc, char *argv[]) {
2405    
2406    gtk_init (&argc, &argv);    gtk_init (&argc, &argv);
2407    
2408      misc_init();
2409    
2410    curl_global_init(CURL_GLOBAL_ALL);    curl_global_init(CURL_GLOBAL_ALL);
2411    
2412  #ifdef USE_MAEMO  #ifdef USE_MAEMO

Legend:
Removed from v.222  
changed lines
  Added in v.223