mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge branch 'trip3' of git://git.hohndel.org/subsurface
Pull trip manipulation branch from Dirk Hohndel: "I have added yet more of the requested features. I am not aware of any outstanding bugs or crashes (except for the Gtk problem that causes the import to crash for some people on Ubuntu and MacOS - but as I mentioned earlier, that bug has been around as long as the import file selector box)." * 'trip3' of git://git.hohndel.org/subsurface: Avoid duplicate dive_trip entries More trip manipulations: remove selected dives from trip Add ability to merge trip with trip below Use the infrastructure for moving dives in more places Correct the trip related test dives Fix crash when removing the first dive of a trip Correctly initialize the toggle state of the autogroup menu entry Fix copy_tree_node to no longer overwrite dive duration Add autogen menu command Fix a crash when changing sort column Use truth values with gboolean Allow modification and edits of trips Clean up macros and auxiliary functions Store time_t as long value
This commit is contained in:
commit
252c28f8f2
10 changed files with 707 additions and 97 deletions
13
parse-xml.c
13
parse-xml.c
|
@ -39,11 +39,6 @@ void record_dive(struct dive *dive)
|
|||
dive_table.nr = nr+1;
|
||||
}
|
||||
|
||||
void record_trip(struct dive *trip)
|
||||
{
|
||||
dive_trip_list = insert_trip(trip, dive_trip_list);
|
||||
}
|
||||
|
||||
static void delete_dive_renumber(struct dive **dives, int i, int nr)
|
||||
{
|
||||
struct dive *dive = dives[i];
|
||||
|
@ -1165,10 +1160,10 @@ static void try_to_fill_trip(struct dive **divep, const char *name, char *buf)
|
|||
|
||||
struct dive *dive = *divep;
|
||||
|
||||
if (MATCH(".date", divedate, &dive->when)) {
|
||||
dive->when = utc_mktime(&cur_tm);
|
||||
if (MATCH(".date", divedate, &dive->when))
|
||||
return;
|
||||
if (MATCH(".time", divetime, &dive->when))
|
||||
return;
|
||||
}
|
||||
if (MATCH(".location", utf8_string, &dive->location))
|
||||
return;
|
||||
if (MATCH(".notes", utf8_string, &dive->notes))
|
||||
|
@ -1213,7 +1208,7 @@ static void trip_end(void)
|
|||
{
|
||||
if (!cur_trip)
|
||||
return;
|
||||
record_trip(cur_trip);
|
||||
insert_trip(&cur_trip);
|
||||
cur_trip = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue