Add offset address to memwin dump header
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 17 Oct 2013 02:23:01 +0000 (22:23 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 6 Nov 2013 02:50:17 +0000 (21:50 -0500)
src/memwin.c

index 8635248..24d3071 100644 (file)
@@ -147,6 +147,8 @@ memwin_init_columns(void)
        gtk_tree_view_append_column(GTK_TREE_VIEW(memlist), column);
 
        for (i = COL_DATA0; i < (COL_DATA0 + DATA_COLS); i++) {
+               char col_name[8];
+
                /* Create new renderer for each editable cell. */
                renderer = gtk_cell_renderer_text_new();
 
@@ -161,8 +163,10 @@ memwin_init_columns(void)
                g_object_set_data(G_OBJECT(renderer), "column",
                                  GUINT_TO_POINTER(i));
 
+               sprintf(col_name, "B%02d", i - COL_DATA0);
+
                column = gtk_tree_view_column_new_with_attributes(
-                       "Val", renderer, "text", i, NULL);
+                       col_name, renderer, "text", i, NULL);
                gtk_tree_view_column_set_sizing(column,
                                                GTK_TREE_VIEW_COLUMN_AUTOSIZE);
                gtk_tree_view_append_column(GTK_TREE_VIEW(memlist), column);