kernelshark/trace-view: Fix searching list on later pages

Currently the search function only works on the first page of the list.
The list is broken up into pages of 1,000,000 items. But if you are
on the second or later page (>1,000,000 item) the search will
not work.

This patch fixes the search feature to work on other pages.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/trace-view-store.c b/trace-view-store.c
index 34f8155..3b62680 100644
--- a/trace-view-store.c
+++ b/trace-view-store.c
@@ -387,18 +387,18 @@
 {
 	GtkTreePath	*path;
 	TraceViewRecord *record;
-	TraceViewStore	*trace_view_store;
+	TraceViewStore	*store;
 
 	g_return_val_if_fail (TRACE_VIEW_IS_LIST(tree_model), NULL);
 	g_return_val_if_fail (iter != NULL,	NULL);
 	g_return_val_if_fail (iter->user_data != NULL,	NULL);
 
-	trace_view_store = TRACE_VIEW_STORE(tree_model);
+	store = TRACE_VIEW_STORE(tree_model);
 
 	record = (TraceViewRecord*) iter->user_data;
 
 	path = gtk_tree_path_new();
-	gtk_tree_path_append_index(path, record->pos);
+	gtk_tree_path_append_index(path, record->pos - store->start_row);
 
 	return path;
 }
@@ -1106,8 +1106,9 @@
 static TraceViewRecord *get_row(TraceViewStore *store, gint row)
 {
 	TraceViewRecord *record;
+	gint index = row - store->start_row;
 
-	g_return_val_if_fail(row >= store->start_row && row < store->visible_rows, NULL);
+	g_return_val_if_fail(index >= 0 && index < store->visible_rows, NULL);
 
 	record = store->rows[row];
 	g_assert(record != NULL);
diff --git a/trace-view.c b/trace-view.c
index 8d121d1..37b7992 100644
--- a/trace-view.c
+++ b/trace-view.c
@@ -772,7 +772,6 @@
 			break;
 	}
 
-
 	if (!found) {
 		printf("NOT FOUND!\n");
 		/* show pop up */