From: Kaj-Michael Lang Date: Thu, 6 Mar 2008 12:08:34 +0000 (+0200) Subject: Use common path_insert_mark_text X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a1f4d724e56f25a87bcccd3310340759be8dc0c;p=mapper Use common path_insert_mark_text --- diff --git a/src/poi-gui.c b/src/poi-gui.c index 82f1148..fd55bb7 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -1006,7 +1006,7 @@ if (poi_add(p)==FALSE) { /* Add a text break to the current track */ /* XXX: Get category string in here if label is empty */ txt=g_strdup_printf("QP(%d): %f %f %s", p->cat_id, p->lat, p->lon, p->label); - track_insert_mark_text(txt); + path_insert_mark_text(&_track, txt); map_force_redraw(); if (qpdata->close==TRUE) diff --git a/src/track.c b/src/track.c index ad6317b..363fcd1 100644 --- a/src/track.c +++ b/src/track.c @@ -256,18 +256,6 @@ if (file_save(&_track_file_uri, &_track_file_uri, &handle)) { return r; } -/** - * Add a text description at current point - * - */ -void -track_insert_mark_text(gchar *text) -{ -MACRO_PATH_INCREMENT_WTAIL(_track); -_track.wtail->point = _track.tail; -_track.wtail->desc = text; -} - /** * Ask for a text description for the current point * @@ -329,7 +317,7 @@ while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) { gtk_text_buffer_get_end_iter(tbuf, &ti2); if (gtk_text_buffer_get_char_count(tbuf)>0) { - track_insert_mark_text(gtk_text_buffer_get_text(tbuf, &ti1, &ti2, TRUE)); + path_insert_mark_text(&_track, gtk_text_buffer_get_text(tbuf, &ti1, &ti2, TRUE)); } else { popup_error(dialog, _("Please provide a description for the mark.")); continue;