mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Handle notes from planner
New strategy to identify old planner output in notes when
replanning a dive: Text anchors ("*!*" and "***") added for planner output
For backwards compatibility: If there is no anchor but an old table
delete everything.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
d82f8cbd3f
commit
a5d54b04a7
2 changed files with 16 additions and 8 deletions
|
|
@ -588,10 +588,10 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
|
|||
return;
|
||||
}
|
||||
|
||||
len = show_disclaimer ? snprintf(buffer, sz_buffer, "<div><b>%s</b><br></div>", disclaimer) : 0;
|
||||
len = show_disclaimer ? snprintf(buffer, sz_buffer, "<div>*!* <b>%s</b><br></div>", disclaimer) : 0;
|
||||
|
||||
if (diveplan->surface_interval > 60) {
|
||||
len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %d:%02d) %s %s<br>",
|
||||
len += snprintf(buffer + len, sz_buffer - len, "<div>*** <b>%s (%s) %s %d:%02d) %s %s<br>",
|
||||
translate("gettextFromC", "Subsurface"),
|
||||
subsurface_canonical_version(),
|
||||
translate("gettextFromC", "dive plan</b> (surface interval "),
|
||||
|
|
@ -599,7 +599,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
|
|||
translate("gettextFromC", "created on"),
|
||||
get_current_date());
|
||||
} else {
|
||||
len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %s</b><br>",
|
||||
len += snprintf(buffer + len, sz_buffer - len, "<div>*** <b>%s (%s) %s %s</b><br>",
|
||||
translate("gettextFromC", "Subsurface"),
|
||||
subsurface_canonical_version(),
|
||||
translate("gettextFromC", "dive plan</b> created on"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue