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
|
@ -333,8 +333,8 @@ static void save_picture(struct membuffer *b, struct picture *pic)
|
|||
put_string(b, " <picture filename='");
|
||||
put_string(b, pic->filename);
|
||||
put_string(b, "'");
|
||||
if (pic->offset)
|
||||
put_format(b, " offset='%d'", pic->offset);
|
||||
if (pic->offset.seconds)
|
||||
put_format(b, " offset='%u:%02u min'", FRACTION(pic->offset.seconds, 60));
|
||||
if (pic->latitude.udeg || pic->longitude.udeg) {
|
||||
put_degrees(b, pic->latitude, " gps='", " ");
|
||||
put_degrees(b, pic->longitude, "", "'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue