GtkWidget *tree_view;
GtkWidget *container_widget;
GtkListStore *model;
- GtkTreeViewColumn *date, *depth, *duration, *location;
+ GtkTreeViewColumn *nr, *date, *depth, *duration, *location;
GtkTreeViewColumn *temperature, *cylinder, *nitrox, *sac, *otu;
int changed;
};
*/
enum {
DIVE_INDEX = 0,
+ DIVE_NR, /* int: dive->nr */
DIVE_DATE, /* time_t: dive->when */
DIVE_DEPTH, /* int: dive->maxdepth in mm */
DIVE_DURATION, /* int: in seconds */
* The core data itself is unaffected by units
*/
gtk_list_store_set(GTK_LIST_STORE(model), iter,
+ DIVE_NR, dive->number,
DIVE_LOCATION, location,
DIVE_CYLINDER, cylinder,
DIVE_SAC, sac,
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
DIVE_INDEX, i,
+ DIVE_NR, dive->number,
DIVE_DATE, dive->when,
DIVE_DEPTH, dive->maxdepth,
DIVE_DURATION, dive->duration.seconds,
dive_list.model = gtk_list_store_new(DIVELIST_COLUMNS,
G_TYPE_INT, /* index */
+ G_TYPE_INT, /* nr */
G_TYPE_INT, /* Date */
G_TYPE_INT, /* Depth */
G_TYPE_INT, /* Duration */
gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_MULTIPLE);
gtk_widget_set_size_request(dive_list.tree_view, 200, 200);
+ dive_list.nr = divelist_column(&dive_list, DIVE_NR, "#", NULL, PANGO_ALIGN_RIGHT, TRUE);
dive_list.date = divelist_column(&dive_list, DIVE_DATE, "Date", date_data_func, PANGO_ALIGN_LEFT, TRUE);
dive_list.depth = divelist_column(&dive_list, DIVE_DEPTH, "ft", depth_data_func, PANGO_ALIGN_RIGHT, TRUE);
dive_list.duration = divelist_column(&dive_list, DIVE_DURATION, "min", duration_data_func, PANGO_ALIGN_RIGHT, TRUE);