diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-10-06 07:44:48 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-10-06 07:44:48 +0000 |
commit | b42fda0fd262a61b615a2171b67a818814bbc040 (patch) | |
tree | 8827fec7615073685f7310599e6b5f669eb427a9 /gtk/conversations_table.h | |
parent | 999ab129452a3126cd1f26d3afbd2e81ec11ce9d (diff) |
From : Didier Gautheron
gtktreeview for conversations:
- use a garray rather than g_realloc memory for conversations list.
- use a hashtable for finding conversation rather than a linear search.
Notes:
- sorting is too slow, I disabled it.
- the dialog box is really a big problem because it's also empty the idle event queue, slow down a lot.
- Test on a 1.5M packets with hundred thousands conversations capture, slow but bearable.
svn path=/trunk/; revision=30353
Diffstat (limited to 'gtk/conversations_table.h')
-rw-r--r-- | gtk/conversations_table.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/conversations_table.h b/gtk/conversations_table.h index 584d411136..1d0d2622a6 100644 --- a/gtk/conversations_table.h +++ b/gtk/conversations_table.h @@ -46,6 +46,10 @@ typedef struct _conversation_t { nstime_t start_time; /**< start time for the conversation */ nstime_t stop_time; /**< stop time for the conversation */ + + gboolean modified; /**< new to redraw the row */ + GtkTreeIter iter; + gboolean iter_valid; /**< not a new row */ } conv_t; /** Conversation widget */ @@ -57,13 +61,15 @@ typedef struct _conversations_table { GtkWidget *page_lb; /**< page label */ GtkWidget *name_lb; /**< name label */ GtkWidget *scrolled_window; /**< the scrolled window */ - GtkCList *table; /**< the GTK table */ - guint32 num_columns; /**< number of columns in the above table */ + GtkTreeView *table; /**< the GTK table */ const char *default_titles[14]; /**< Column headers */ GtkWidget *menu; /**< context menu */ gboolean has_ports; /**< table has ports */ guint32 num_conversations; /**< number of conversations */ - conv_t *conversations; /**< array of conversation values */ + GArray *conversations; /**< array of conversation values */ + GHashTable *hashtable; /**< conversations hash table */ + + gboolean fixed_col; /**< if switched to fixed column */ gboolean resolve_names; /**< resolve address names? */ } conversations_table; |