]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Add GtkTreeViewColumn information to 'struct DiveList'
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Sep 2011 15:42:05 +0000 (08:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Sep 2011 15:42:05 +0000 (08:42 -0700)
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>
divelist.c
divelist.h

index a6ffda8e8b9734cc8d934b6a35e7772dc3987479..c2acf72c4260afb8e364439fa4a676d9d52ca9d3 100644 (file)
@@ -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);
index dc573d770c313797501c3e30053cad73d854bf7a..da3bfc96bc02d0996143eb526399c70f20431fa7 100644 (file)
@@ -7,6 +7,7 @@ struct DiveList {
        GtkWidget    *tree_view;
        GtkWidget    *container_widget;
        GtkListStore *model;
+       GtkTreeViewColumn *date, *depth, *duration;
 };
 
 extern int selected_dive;