for(i = 0; i < cfile.cinfo.num_cols; i++) {
col = gtk_tree_view_column_new();
gtk_tree_view_column_pack_start(col, renderer, TRUE);
- gtk_tree_view_column_add_attribute(col, renderer, "text",
- cfile.cinfo.col_fmt[i]);
+ gtk_tree_view_column_add_attribute(col, renderer, "text",i);
gtk_tree_view_column_set_title(col, cfile.cinfo.col_title[i]);
gtk_tree_view_column_set_sort_column_id(col, i);
gtk_tree_view_column_set_resizable(col, TRUE);
#include <gtk/gtk.h>
#include <glib.h>
-#if 0
#include "epan/column_info.h"
#include "epan/column.h"
-#endif
#include "packet_list_store.h"
#include "globals.h"
packet_list_init(PacketList *packet_list)
{
guint i;
-#if 0
gint fmt;
for(i = 0; i < (guint)cfile.cinfo.num_cols; i++) {
break;
}
}
-#endif
-
- for(i = 0; i < NUM_COL_FMTS; i++) { /* XXX - Temporary? */
- packet_list->column_types[i] = G_TYPE_STRING;
- }
-
- packet_list->n_columns = NUM_COL_FMTS;
+ packet_list->n_columns = (guint)cfile.cinfo.num_cols;
packet_list->num_rows = 0;
packet_list->rows = NULL;
packet_list->num_rows);
newrecord = se_alloc0(sizeof(PacketListRecord));
- newrecord->col_text = se_alloc0(sizeof(row_data->col_text)* NUM_COL_FMTS);
+ newrecord->col_text = se_alloc0(sizeof(row_data->col_text)* cfile.cinfo.num_cols);
/* XXX newrecord->col_text still uses the fmt index */
for(i = 0; i < cfile.cinfo.num_cols; i++)
- newrecord->col_text[row_data->col_fmt[i]] = row_data->col_text[i];
+ newrecord->col_text[i] = row_data->col_text[i];
newrecord->fdata = row_data->fdata;