mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Picture handling: switch to stronger typed offset
Also change the on file XML to be even easier to read by making it a duration as well (which gets us '32:34 min' instead of un-typed seconds). This is backwards compatible, it will happily read what was written with the previous commit). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b0983d9d13
commit
a26719c541
5 changed files with 9 additions and 9 deletions
|
@ -1084,7 +1084,7 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
|
|||
|
||||
if (MATCH("filename.picture", utf8_string, &cur_picture->filename))
|
||||
return;
|
||||
if (MATCH("offset.picture", get_index, &cur_picture->offset))
|
||||
if (MATCH("offset.picture", sampletime, &cur_picture->offset))
|
||||
return;
|
||||
if (MATCH("gps.picture", gps_picture_location, cur_picture))
|
||||
return;
|
||||
|
@ -1295,7 +1295,7 @@ static void event_end(void)
|
|||
if (cur_event.type == 123) {
|
||||
struct picture *pic = alloc_picture();
|
||||
pic->filename = strdup(cur_event.name);
|
||||
pic->offset = cur_event.time.seconds;
|
||||
pic->offset = cur_event.time;
|
||||
dive_add_picture(cur_dive, pic);
|
||||
} else {
|
||||
add_event(dc, cur_event.time.seconds,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue