Merge branch 'divetrip-rewrite' of git://github.com/torvalds/subsurface

Merge the dive trip rewrite by Dirk Hohndel.

This just merges the dive trip changes with the timestamp handling
changes.  There were multiple small data conflicts, along with some
newly added 'time_t' cases in the dive trip handling that needed to be
converted to 'timestamp_t' along the way.

* 'divetrip-rewrite' of git://github.com/torvalds/subsurface:
  Convert FIND_TRIP into function
  Partial rewrite of the dive trip code
  Check if trip is NULL before calling DIVE_TRIP
This commit is contained in:
Linus Torvalds 2012-09-20 12:30:58 -07:00
commit e8578ad9c9
5 changed files with 206 additions and 107 deletions

8
info.c
View file

@ -445,7 +445,7 @@ static void save_dive_info_changes(struct dive *dive, struct dive *master, struc
}
}
static void dive_trip_widget(GtkWidget *box, struct dive *trip, struct dive_info *info)
static void dive_trip_widget(GtkWidget *box, dive_trip_t *trip, struct dive_info *info)
{
GtkWidget *hbox, *label;
char buffer[80] = "Edit trip summary";
@ -537,7 +537,7 @@ void update_equipment_data(struct dive *dive, struct dive *master)
memcpy(dive->weightsystem, master->weightsystem, WS_BYTES);
}
gboolean edit_trip(struct dive *trip)
gboolean edit_trip(dive_trip_t *trip)
{
GtkWidget *dialog, *vbox;
int success;
@ -571,10 +571,8 @@ gboolean edit_trip(struct dive *trip)
if (old_text)
g_free(old_text);
}
if (changed) {
if (changed)
mark_divelist_changed(TRUE);
flush_divelist(trip);
}
}
gtk_widget_destroy(dialog);
return changed;