diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-24 21:05:57 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-24 21:05:57 -0700 |
commit | 4587f8a2744ed8286aa8912de75516deaf217f4e (patch) | |
tree | 4103e6c22a4b517ddc6824bca76f6b7fb1587632 /divelist-gtk.c | |
parent | 1e0bc8a1ab5d124445786266ad916744b1368986 (diff) | |
download | subsurface-4587f8a2744ed8286aa8912de75516deaf217f4e.tar.gz |
Call the get_date functions with timestamp_t instead of struct tm
This is the much more natural way to use this function, now that I look at
it...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist-gtk.c')
-rw-r--r-- | divelist-gtk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c index e1482ee06..a5d70f348 100644 --- a/divelist-gtk.c +++ b/divelist-gtk.c @@ -258,7 +258,6 @@ static void date_data_func(GtkTreeViewColumn *col, gpointer data) { int idx, nr; - struct tm tm; timestamp_t when; /* this should be enought for most languages. if not increase the value. */ char *buffer; @@ -266,11 +265,10 @@ static void date_data_func(GtkTreeViewColumn *col, gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &when, -1); nr = gtk_tree_model_iter_n_children(model, iter); - utc_mkdate(when, &tm); if (idx < 0) { - buffer = get_trip_date_string(&tm, nr); + buffer = get_trip_date_string(when, nr); } else { - buffer = get_dive_date_string(&tm); + buffer = get_dive_date_string(when); } g_object_set(renderer, "text", buffer, NULL); free(buffer); |