- renderer = gtk_cell_renderer_text_new();
- dive_list.location = col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "Location");
- gtk_tree_view_column_set_sort_column_id(col, DIVE_LOCATION);
- gtk_tree_view_column_pack_start(col, renderer, FALSE);
- gtk_tree_view_column_add_attribute(col, renderer, "text", DIVE_LOCATION);
- gtk_tree_view_append_column(GTK_TREE_VIEW(dive_list.tree_view), col);
-
- renderer = gtk_cell_renderer_text_new();
- dive_list.temperature = col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "deg");
- gtk_tree_view_column_set_sort_column_id(col, DIVE_TEMP);
- gtk_tree_view_column_pack_start(col, renderer, FALSE);
- gtk_tree_view_column_add_attribute(col, renderer, "text", DIVE_TEMPSTR);
- gtk_tree_view_append_column(GTK_TREE_VIEW(dive_list.tree_view), col);
- gtk_object_set(GTK_OBJECT(renderer), "alignment", PANGO_ALIGN_RIGHT, NULL);
- gtk_cell_renderer_set_alignment(GTK_CELL_RENDERER(renderer), 1.0, 0.5);
-
- renderer = gtk_cell_renderer_text_new();
- dive_list.nitrox = col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "O2%");
- gtk_tree_view_column_set_sort_column_id(col, DIVE_NITROX);
- gtk_tree_view_column_pack_start(col, renderer, FALSE);
- gtk_tree_view_column_add_attribute(col, renderer, "text", DIVE_NITROXSTR);
- gtk_tree_view_append_column(GTK_TREE_VIEW(dive_list.tree_view), col);
- gtk_object_set(GTK_OBJECT(renderer), "alignment", PANGO_ALIGN_RIGHT, NULL);
- gtk_cell_renderer_set_alignment(GTK_CELL_RENDERER(renderer), 1.0, 0.5);
-
- renderer = gtk_cell_renderer_text_new();
- dive_list.sac = col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "SAC");
- gtk_tree_view_column_set_sort_column_id(col, DIVE_SAC);
- gtk_tree_view_column_pack_start(col, renderer, FALSE);
- gtk_tree_view_column_add_attribute(col, renderer, "text", DIVE_SACSTR);
- gtk_tree_view_append_column(GTK_TREE_VIEW(dive_list.tree_view), col);
- gtk_object_set(GTK_OBJECT(renderer), "alignment", PANGO_ALIGN_RIGHT, NULL);
- gtk_cell_renderer_set_alignment(GTK_CELL_RENDERER(renderer), 1.0, 0.5);
-
- fill_dive_list(&dive_list);