Changeset 6afcbee in subsurface


Ignore:
Timestamp:
Apr 6, 2017, 6:29:11 PM (2 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
11f7e18
Parents:
c9c9b1b3
git-author:
Robert C. Helling <helling@…> (04/06/17 13:19:57)
git-committer:
Dirk Hohndel <dirk@…> (04/06/17 18:29:11)
Message:

Move version and date around notes to save space

This prints this information in the header near
"Subsurface" where I guess at least the version information
belongs. Plus it saves a line.

Signed-off-by: Robert C. Helling <helling@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/planner.c

    rc9c9b1b3 r6afcbee  
    592592
    593593        if (diveplan->surface_interval > 60) {
    594                 len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s %d:%02d)</b><br>",
    595                                 translate("gettextFromC", "Subsurface dive plan (surface interval "),
    596                                 FRACTION(diveplan->surface_interval / 60, 60));
     594                len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %d:%02d) %s %s<br>",
     595                                translate("gettextFromC", "Subsurface"),
     596                                subsurface_canonical_version(),
     597                                translate("gettextFromC", "dive plan</b> (surface interval "),
     598                                FRACTION(diveplan->surface_interval / 60, 60),
     599                                translate("gettextFromC", "created on"),
     600                                get_current_date());
    597601        } else {
    598                 len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s</b><br>",
    599                                 translate("gettextFromC", "Subsurface dive plan"));
     602                len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %s</b><br>",
     603                                translate("gettextFromC", "Subsurface"),
     604                                subsurface_canonical_version(),
     605                                translate("gettextFromC", "dive plan</b> created on"),
     606                                get_current_date());
    600607        }
    601608
     
    842849        int altitude = (int) get_depth_units((int) (log(1013.0 / diveplan->surface_pressure) * 7800000), NULL, &depth_unit);
    843850
    844         len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "ATM pressure: %dmbar (%d%s)<br>"),
     851        len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "ATM pressure: %dmbar (%d%s)<br></div>"),
    845852                        diveplan->surface_pressure,
    846853                        altitude,
    847854                        depth_unit);
    848 
    849         len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Plan creation date and version: %s, %s<br></div>"),
    850                         get_current_date(), subsurface_canonical_version());
    851855
    852856        /* Get SAC values and units for printing it in gas consumption */
Note: See TracChangeset for help on using the changeset viewer.