From 5415361dc5ee7da15ac8434dd5853ae45c45e471 Mon Sep 17 00:00:00 2001 From: Darren Hart Date: Mon, 4 Jan 2010 21:33:01 -0800 Subject: trace-view: consolidate the trace-view-store row access Rather than provide an accessor function for each field of the row record in the trace-view-store, simply return the row record and allow the caller to access the fields directly. Signed-off-by: Darren Hart --- trace-view.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'trace-view.c') diff --git a/trace-view.c b/trace-view.c index 3c023e5..899b3b3 100644 --- a/trace-view.c +++ b/trace-view.c @@ -271,6 +271,7 @@ void trace_view_make_selection_visible(GtkWidget *treeview) void trace_view_update_task_filter(GtkWidget *treeview, struct filter_task *filter) { GtkTreeView *tree = GTK_TREE_VIEW(treeview); + TraceViewRecord *vrec; GtkTreeModel *model; guint64 time; gint row; @@ -281,8 +282,10 @@ void trace_view_update_task_filter(GtkWidget *treeview, struct filter_task *filt /* Keep track of the currently selected row */ row = trace_view_get_selected_row(treeview); - if (row >= 0) - time = trace_view_store_get_time_from_row(TRACE_VIEW_STORE(model), row); + if (row >= 0) { + vrec = trace_view_store_get_row(TRACE_VIEW_STORE(model), row); + time = vrec->timestamp; + } g_object_ref(model); gtk_tree_view_set_model(tree, NULL); -- cgit v1.2.2