summaryrefslogtreecommitdiff
path: root/ui/gtk/packet_list_store.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2012-09-23 10:57:05 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2012-09-23 10:57:05 +0000
commit2fc1cdeb74456f65701481bca2741fe6b07b3339 (patch)
tree033421bb83cd633173ab7dcfbbe3f1980f38e1bb /ui/gtk/packet_list_store.c
parentaa141ca177c57274bccbae4ae8033351ab4099b0 (diff)
downloadwireshark-2fc1cdeb74456f65701481bca2741fe6b07b3339.tar.gz
Speedup loading capture files by about 20%-30% (wireshark only)
Right now packetlist model is used only by one treeview, so we can check if packetlist->view has connected model if no, don't emit row-inserted signal. svn path=/trunk/; revision=45063
Diffstat (limited to 'ui/gtk/packet_list_store.c')
-rw-r--r--ui/gtk/packet_list_store.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/gtk/packet_list_store.c b/ui/gtk/packet_list_store.c
index b46b79981d..10f553e59e 100644
--- a/ui/gtk/packet_list_store.c
+++ b/ui/gtk/packet_list_store.c
@@ -637,7 +637,6 @@ gint
packet_list_append_record(PacketList *packet_list, frame_data *fdata)
{
PacketListRecord *newrecord;
- GtkTreeModel *model = GTK_TREE_MODEL(packet_list);
g_return_val_if_fail(PACKETLIST_IS_LIST(packet_list), -1);
@@ -666,7 +665,7 @@ packet_list_append_record(PacketList *packet_list, frame_data *fdata)
* Issue a row_inserted signal if the model is connected
* and the row is visible.
*/
- if((model)&&(newrecord->visible_pos!=-1)) {
+ if (gtk_tree_view_get_model(GTK_TREE_VIEW(packet_list->view)) && newrecord->visible_pos != -1) {
GtkTreeIter iter;
GtkTreePath *path;