mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
1e0bc8a1ab
commit
4587f8a274
3 changed files with 21 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue