diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-02-27 12:31:00 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 10:48:35 -0800 |
commit | 8c56b2f45e546048941ba004bce5e5bfd0e6e660 (patch) | |
tree | dda271fc80ce1d57df9dd31ea7c0644ae8bd62fc /profile.c | |
parent | 0307f3d5432dfc98cc4be317b0f2ce93e27c336b (diff) | |
download | subsurface-8c56b2f45e546048941ba004bce5e5bfd0e6e660.tar.gz |
Store zoomed plot in preferences
This patch makes the 'Zoomed Plot' a preference that can be stored and
retrieved, this way if the user sets the plot to be 'zoomed', this
information will persist even if they closed or opened subsurface again.
Also, added the 'Scale' button on the new profile, but didn't did the glue
code yet.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -16,7 +16,6 @@ #include "membuffer.h" int selected_dive = -1; /* careful: 0 is a valid value */ -char zoomed_plot = 0; char dc_number = 0; @@ -61,7 +60,7 @@ static void dump_pi (struct plot_info *pi) int get_maxtime(struct plot_info *pi) { int seconds = pi->maxtime; - if (zoomed_plot) { + if (prefs.zoomed_plot) { /* Rounded up to one minute, with at least 2.5 minutes to * spare. * For dive times shorter than 10 minutes, we use seconds/4 to @@ -86,7 +85,7 @@ int get_maxdepth(struct plot_info *pi) unsigned mm = pi->maxdepth; int md; - if (zoomed_plot) { + if (prefs.zoomed_plot) { /* Rounded up to 10m, with at least 3m to spare */ md = ROUND_UP(mm+3000, 10000); } else { |