diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-04-01 14:23:54 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-04-01 14:23:54 +0000 |
commit | ff55efe3007d0b9bc80a8dfac39c4f62a8533962 (patch) | |
tree | 4cd0bb06b36e746cec1129223c3ff700abd580b2 /navit/bookmarks.c | |
parent | cd7d305b8ade41a12af09397b32366af39f44671 (diff) | |
download | navit-ff55efe3007d0b9bc80a8dfac39c4f62a8533962.tar.gz |
Add:gui_internal:Allow having several waypoints. Fixes #46.|Thanks heiko wegeler.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5004 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/bookmarks.c')
-rw-r--r-- | navit/bookmarks.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/navit/bookmarks.c b/navit/bookmarks.c index 96c6c6721..e70fb6dab 100644 --- a/navit/bookmarks.c +++ b/navit/bookmarks.c @@ -130,6 +130,19 @@ struct item* bookmarks_get_item(struct bookmarks* this_) { return ret; } +int bookmarks_get_bookmark_count(struct bookmarks* this_) { + int ret=0; + bookmarks_item_rewind(this_); + while (this_->current->iter!=NULL) { + struct bookmark_item_priv* data=(struct bookmark_item_priv*)this_->current->iter->data; + if (data->type == type_bookmark) { + ret++; + } + this_->current->iter=g_list_next(this_->current->iter); + } + return ret; +} + const char* bookmarks_item_cwd(struct bookmarks* this_) { return this_->current->label; } |