Merge branch 'misc-fixes' of git://github.com/DataBeaver/subsurface

Pull miscellaneous fixes, mostly UI stuff from Mikko Rasa.

Both this and the pull from Pierre-Yves Chibon created a "Save As" menu
entry and logic.  As a result, there were a fair number of conflicts,
but I tried to make the end result somewhat reasonable.  I might have
missed some semantic conflict, though.

Series-acked-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>

* 'misc-fixes' of git://github.com/DataBeaver/subsurface:
  Add a separate "Save as" entry to the menu
  Changes to menu icons
  Improved depth info for dives without samples
  Divide the panes evenly in view_three
This commit is contained in:
Linus Torvalds 2012-08-17 10:57:24 -07:00
commit d0e27c6c53
5 changed files with 59 additions and 53 deletions

5
dive.c
View file

@ -473,7 +473,12 @@ struct dive *fixup_dive(struct dive *dive)
}
}
if (end < 0)
{
/* Assume an ascent/descent rate of 9 m/min */
int asc_desc_time = dive->maxdepth.mm*60/9000;
dive->meandepth.mm = dive->maxdepth.mm*(dive->duration.seconds-asc_desc_time)/dive->duration.seconds;
return dive;
}
update_duration(&dive->duration, end - start);
if (start != end)