diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-25 19:09:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-26 09:28:34 -0800 |
commit | 85f0749c854b014d6f8759426fa981eb9418ca18 (patch) | |
tree | de2380f613d7cde63543c7f6f7301c180705f5cf /divelist.c | |
parent | 544a8b9d7742befe8af768eca00c254b8a11cfb1 (diff) | |
download | subsurface-85f0749c854b014d6f8759426fa981eb9418ca18.tar.gz |
Remove 'when_from_file' field from dive trip
It had become a write-only field (apart from some now useless debugging)
when simplifying the remove_autogen_trips() function.
So remove it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/divelist.c b/divelist.c index 7174e9dfb..8f9b3de40 100644 --- a/divelist.c +++ b/divelist.c @@ -949,11 +949,6 @@ static void dump_trip_list(void) ++i, dive_trip->location, tm.tm_year + 1900, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, dive_trip->nrdives, dive_trip); - if (dive_trip->when_from_file && dive_trip->when != dive_trip->when_from_file) { - utc_mkdate(dive_trip->when_from_file, &tm); - printf("originally on %04u-%02u-%02u %02u:%02u:%02u\n", tm.tm_year + 1900, - tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - } last_time = dive_trip->when; } printf("-----\n"); @@ -1609,7 +1604,6 @@ static void merge_dive_into_trip_above_cb(GtkWidget *menuitem, GtkTreePath *path add_dive_to_trip(dive, prev_dive->divetrip); /* we intentionally changed the dive_trip, so update the time * stamp that we fall back to when toggling autogroup */ - dive->divetrip->when_from_file = dive->divetrip->when; dive->tripflag = IN_TRIP; free(move_dive_between_trips(&dive_iter, NULL, &trip_iter, NULL, TRUE)); prev_dive = dive; @@ -1636,7 +1630,6 @@ static void turn_dive_into_trip(GtkTreePath *path) char *location; int idx; struct dive *dive; - dive_trip_t *dive_trip; /* this is a dive on the top level, insert trip AFTER it, populate its date / location, and * then move the dive below that trip */ @@ -1651,10 +1644,7 @@ static void turn_dive_into_trip(GtkTreePath *path) treepath = gtk_tree_model_get_path(MODEL(dive_list), newiter); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(dive_list.tree_view), treepath); dive = get_dive(idx); - /* this trip is intentionally created so it should be treated as if - * it was read from a file */ - dive_trip = create_and_hookup_trip_from_dive(dive); - dive_trip->when_from_file = dive_trip->when; + create_and_hookup_trip_from_dive(dive); free(newiter); } @@ -1702,7 +1692,6 @@ static void insert_trip_before(GtkTreePath *path) break; } /* treat this divetrip as if it had been read from a file */ - new_divetrip->when_from_file = new_divetrip->when; treepath = gtk_tree_model_get_path(MODEL(dive_list), &newparent); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(dive_list.tree_view), treepath); #ifdef DEBUG_TRIP |