Diff of /trunk/src/geotoad.c

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

revision 211 by harbaum, Wed Nov 25 10:13:26 2009 UTC revision 212 by harbaum, Wed Nov 25 13:52:17 2009 UTC
# Line 87  static void context_free(gt_context_t *c Line 87  static void context_free(gt_context_t *c
87    
88      if(context->info) g_free(context->info);      if(context->info) g_free(context->info);
89    
90      g_ptr_array_foreach(context->argv, arg_free, NULL);      if(context->argv) {
91      g_ptr_array_free (context->argv, TRUE);        g_ptr_array_foreach(context->argv, arg_free, NULL);
92          g_ptr_array_free (context->argv, TRUE);
93        }
94    
95      g_free(context);      g_free(context);
96    }    }
# Line 500  static gboolean gui_setup(gt_context_t * Line 502  static gboolean gui_setup(gt_context_t *
502    gtk_box_pack_start_defaults(GTK_BOX(ihbox), context->lat);    gtk_box_pack_start_defaults(GTK_BOX(ihbox), context->lat);
503    context->lon = lon_entry_new(appdata->gt.lon);    context->lon = lon_entry_new(appdata->gt.lon);
504    gtk_box_pack_start_defaults(GTK_BOX(ihbox), context->lon);    gtk_box_pack_start_defaults(GTK_BOX(ihbox), context->lon);
505      GtkWidget *popup = coo_popup(appdata, context->lat, context->lon);
506      gtk_box_pack_start_defaults(GTK_BOX(ihbox), popup);
507    gtk_box_pack_start_defaults(GTK_BOX(vbox), ihbox);    gtk_box_pack_start_defaults(GTK_BOX(vbox), ihbox);
508    float dst = appdata->gt.distance;  // distance is given in kilometers    float dst = appdata->gt.distance;  // distance is given in kilometers
509    if(appdata->imperial) dst /= 1.609344;    if(appdata->imperial) dst /= 1.609344;
# Line 537  static gboolean gui_setup(gt_context_t * Line 541  static gboolean gui_setup(gt_context_t *
541    gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);    gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
542    
543    vbox = gtk_vbox_new(FALSE, 0);    vbox = gtk_vbox_new(FALSE, 0);
544  #ifndef FREMANTLE    context->username = entry_new();
545    context->username = gtk_entry_new();    context->password = entry_new();
   context->password = gtk_entry_new();  
 #else  
   context->username = hildon_entry_new(HILDON_SIZE_AUTO);  
   hildon_gtk_entry_set_input_mode(GTK_ENTRY(context->username),  
                                   HILDON_GTK_INPUT_MODE_FULL);  
   context->password = hildon_entry_new(HILDON_SIZE_AUTO);  
   hildon_gtk_entry_set_input_mode(GTK_ENTRY(context->password),  
                                   HILDON_GTK_INPUT_MODE_FULL);  
 #endif  
546    gtk_entry_set_visibility(GTK_ENTRY(context->password), FALSE);    gtk_entry_set_visibility(GTK_ENTRY(context->password), FALSE);
547    
548    /* set saved defaults */    /* set saved defaults */
# Line 620  void geotoad(appdata_t *appdata) { Line 615  void geotoad(appdata_t *appdata) {
615    context->update_mutex = g_mutex_new();    context->update_mutex = g_mutex_new();
616    context->update_cond = g_cond_new();    context->update_cond = g_cond_new();
617    
   printf("geoToad\n");  
   
618    if(gui_setup(context))    if(gui_setup(context))
619      gui_run(context);      gui_run(context);
620    
# Line 676  void geotoad(appdata_t *appdata) { Line 669  void geotoad(appdata_t *appdata) {
669    
670      } else      } else
671        printf("GPX file not imported\n");        printf("GPX file not imported\n");
672      }
   } else  
     errorf(_("GeoToad finished without result"));  
673    
674    printf("main context free\n");    printf("main context free\n");
675    context_free(context);    context_free(context);

Legend:
Removed from v.211  
changed lines
  Added in v.212