Diff of /trunk/src/notes.c

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

revision 221 by harbaum, Mon Nov 30 21:28:04 2009 UTC revision 228 by harbaum, Thu Dec 3 20:07:13 2009 UTC
# Line 202  static int notes_write_file(cache_contex Line 202  static int notes_write_file(cache_contex
202    g_assert(context);    g_assert(context);
203    g_assert(context->cache);    g_assert(context->cache);
204    
   printf("write\n");  
   
205    /* build local path */    /* build local path */
206    int path_len = strlen(context->appdata->image_path) +    int path_len = strlen(context->appdata->image_path) +
207      2 * strlen(context->cache->id) + 6;      2 * strlen(context->cache->id) + 6;
   printf("plen = %d\n", path_len);  
208    
209    char *path = malloc(path_len);    char *path = malloc(path_len);
210    snprintf(path, path_len, "%s%s/%s.gpx",    snprintf(path, path_len, "%s%s/%s.gpx",
# Line 220  static int notes_write_file(cache_contex Line 217  static int notes_write_file(cache_contex
217      return -1;      return -1;
218    }    }
219    
   printf("still al\n");  
   
220    LIBXML_TEST_VERSION;    LIBXML_TEST_VERSION;
221    
222    xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");    xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");
# Line 283  static void notes_save(cache_context_t * Line 278  static void notes_save(cache_context_t *
278    /* or has been changed */    /* or has been changed */
279    
280    if(context->notes.modified) {    if(context->notes.modified) {
281    #ifdef USE_STACKABLE_WINDOW
282        context->notes_have_been_changed = TRUE;
283    #endif
284    
285      printf("something has been modified, saving notes\n");      printf("something has been modified, saving notes\n");
286    
287      GtkTextIter start;      GtkTextIter start;
# Line 619  GtkWidget *cache_notes(cache_context_t * Line 618  GtkWidget *cache_notes(cache_context_t *
618    GtkWidget *table = gtk_table_new(2, 4, FALSE);    GtkWidget *table = gtk_table_new(2, 4, FALSE);
619  #if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5)  #if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5)
620    gtk_table_set_col_spacing(GTK_TABLE(table), 0, 16);    gtk_table_set_col_spacing(GTK_TABLE(table), 0, 16);
   gtk_table_set_col_spacing(GTK_TABLE(table), 2, 16);  
621  #endif  #endif
622    
623      gtk_table_set_col_spacing(GTK_TABLE(table), 2, 16);
624    
625    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
626                      gtk_label_new(_("New coordinate:")), 0, 1, 0, 1);                      gtk_label_new(_("New coordinate:")), 0, 1, 0, 1);
627    context->notes.overridew = check_button_new_with_label(_("Override"));    context->notes.overridew = check_button_new_with_label(_("Override"));
628    check_button_set_active(context->notes.overridew,    check_button_set_active(context->notes.overridew,
629                            cache->notes && cache->notes->override);                            cache->notes && cache->notes->override);
630    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
631                              context->notes.overridew, 0, 1, 1, 2);                              context->notes.overridew, 2, 3, 0, 1);
632    
633    GtkWidget *hbox = gtk_hbox_new(FALSE, 2);    GtkWidget *hbox = gtk_hbox_new(FALSE, 2);
634    
# Line 660  GtkWidget *cache_notes(cache_context_t * Line 660  GtkWidget *cache_notes(cache_context_t *
660    if(cache->notes) pos = cache->notes->pos;    if(cache->notes) pos = cache->notes->pos;
661    
662    gtk_table_attach_defaults(GTK_TABLE(table),    gtk_table_attach_defaults(GTK_TABLE(table),
663              context->notes.latw = lat_entry_new(pos.lat), 2, 3, 0, 1);              context->notes.latw = lat_entry_new(pos.lat), 0, 1, 1, 2);
664    g_signal_connect(G_OBJECT(context->notes.latw), "focus-out-event",    g_signal_connect(G_OBJECT(context->notes.latw), "focus-out-event",
665                     G_CALLBACK(focus_out), context);                     G_CALLBACK(focus_out), context);
666    

Legend:
Removed from v.221  
changed lines
  Added in v.228