summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-07 08:42:05 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-07 08:42:05 -0700
commit378ac0d44a7867a01cc8a23c05243cea53bab5de (patch)
tree51795074547384af8857a78453684ccc56a85946
parent7bbdea19ed0c634b4a990e49be7a2c8936a61818 (diff)
downloadsubsurface-378ac0d44a7867a01cc8a23c05243cea53bab5de.tar.gz
Add GtkTreeViewColumn information to 'struct DiveList'
We will need the column information in order to update the naming when the units change. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--divelist.c6
-rw-r--r--divelist.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/divelist.c b/divelist.c
index a6ffda8e8..c2acf72c4 100644
--- a/divelist.c
+++ b/divelist.c
@@ -91,7 +91,7 @@ struct DiveList dive_list_create(void)
fill_dive_list(dive_list.model);
renderer = gtk_cell_renderer_text_new();
- col = gtk_tree_view_column_new();
+ dive_list.date = col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(col, "Date");
gtk_tree_view_column_set_sort_column_id(col, 1);
gtk_tree_view_column_set_resizable (col, TRUE);
@@ -100,7 +100,7 @@ struct DiveList dive_list_create(void)
gtk_tree_view_append_column(GTK_TREE_VIEW(dive_list.tree_view), col);
renderer = gtk_cell_renderer_text_new();
- col = gtk_tree_view_column_new();
+ dive_list.depth = col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(col, "ft");
gtk_tree_view_column_set_sort_column_id(col, 3);
gtk_tree_view_column_pack_start(col, renderer, FALSE);
@@ -110,7 +110,7 @@ struct DiveList dive_list_create(void)
gtk_cell_renderer_set_alignment(GTK_CELL_RENDERER(renderer), 1.0, 0.5);
renderer = gtk_cell_renderer_text_new();
- col = gtk_tree_view_column_new();
+ dive_list.duration = col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(col, "min");
gtk_tree_view_column_set_sort_column_id(col, 5);
gtk_tree_view_column_pack_start(col, renderer, FALSE);
diff --git a/divelist.h b/divelist.h
index dc573d770..da3bfc96b 100644
--- a/divelist.h
+++ b/divelist.h
@@ -7,6 +7,7 @@ struct DiveList {
GtkWidget *tree_view;
GtkWidget *container_widget;
GtkListStore *model;
+ GtkTreeViewColumn *date, *depth, *duration;
};
extern int selected_dive;