summaryrefslogtreecommitdiff
path: root/ui/gtk
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-06-27 17:12:23 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-06-27 17:12:23 +0000
commit1895c1c5a041a2c8b67734c25ea7bf9be5ae24ef (patch)
tree32aeab57ce89d537d22e84761c61b4a6dee73705 /ui/gtk
parent0bdc0efc46ec66a298306aae253225c702ed6bea (diff)
downloadwireshark-1895c1c5a041a2c8b67734c25ea7bf9be5ae24ef.tar.gz
cleanup, use packet_list_iter_nth_child() in another place.
svn path=/trunk/; revision=50189
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/packet_list_store.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/ui/gtk/packet_list_store.c b/ui/gtk/packet_list_store.c
index c1e9a4c29c..e6cf94b048 100644
--- a/ui/gtk/packet_list_store.c
+++ b/ui/gtk/packet_list_store.c
@@ -330,9 +330,7 @@ packet_list_get_iter(GtkTreeModel *tree_model, GtkTreeIter *iter,
GtkTreePath *path)
{
PacketList *packet_list;
- PacketListRecord *record;
gint *indices, depth;
- gint n;
g_assert(PACKETLIST_IS_LIST(tree_model));
packet_list = (PacketList *) tree_model;
@@ -345,23 +343,7 @@ packet_list_get_iter(GtkTreeModel *tree_model, GtkTreeIter *iter,
/* we do not allow children since it's just a list */
g_assert(depth == 1);
- n = indices[0]; /* the n-th top level row */
-
- if(PACKET_LIST_RECORD_COUNT(packet_list->visible_rows) == 0)
- return FALSE;
-
- if(!PACKET_LIST_RECORD_INDEX_VALID(packet_list->visible_rows, n))
- return FALSE;
-
- record = PACKET_LIST_RECORD_GET(packet_list->visible_rows, n);
-
- g_assert(record->visible_pos == n);
-
- /* We simply store a pointer to our custom record in the iter */
- iter->stamp = packet_list->stamp;
- iter->user_data = record;
-
- return TRUE;
+ return packet_list_iter_nth_child(tree_model, iter, NULL, indices[0]);
}
static GtkTreePath *