summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-09 09:38:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-09 09:38:50 -0700
commita26719c5419754b24a16b7c8163d236eae765a6d (patch)
tree6c735fa8d100686cd06c679584c3632b41347b00 /save-xml.c
parentb0983d9d13d2d967d52a0fbbc1052f7f6eca840a (diff)
downloadsubsurface-a26719c5419754b24a16b7c8163d236eae765a6d.tar.gz
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>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/save-xml.c b/save-xml.c
index 037fc45cb..4cebc3d61 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -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, "", "'");