diff options
-rw-r--r-- | trace-view-store.c | 9 | ||||
-rw-r--r-- | trace-view.c | 1 |
2 files changed, 5 insertions, 5 deletions
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 @@ trace_view_store_get_path (GtkTreeModel *tree_model, | |||
387 | { | 387 | { |
388 | GtkTreePath *path; | 388 | GtkTreePath *path; |
389 | TraceViewRecord *record; | 389 | TraceViewRecord *record; |
390 | TraceViewStore *trace_view_store; | 390 | TraceViewStore *store; |
391 | 391 | ||
392 | g_return_val_if_fail (TRACE_VIEW_IS_LIST(tree_model), NULL); | 392 | g_return_val_if_fail (TRACE_VIEW_IS_LIST(tree_model), NULL); |
393 | g_return_val_if_fail (iter != NULL, NULL); | 393 | g_return_val_if_fail (iter != NULL, NULL); |
394 | g_return_val_if_fail (iter->user_data != NULL, NULL); | 394 | g_return_val_if_fail (iter->user_data != NULL, NULL); |
395 | 395 | ||
396 | trace_view_store = TRACE_VIEW_STORE(tree_model); | 396 | store = TRACE_VIEW_STORE(tree_model); |
397 | 397 | ||
398 | record = (TraceViewRecord*) iter->user_data; | 398 | record = (TraceViewRecord*) iter->user_data; |
399 | 399 | ||
400 | path = gtk_tree_path_new(); | 400 | path = gtk_tree_path_new(); |
401 | gtk_tree_path_append_index(path, record->pos); | 401 | gtk_tree_path_append_index(path, record->pos - store->start_row); |
402 | 402 | ||
403 | return path; | 403 | return path; |
404 | } | 404 | } |
@@ -1106,8 +1106,9 @@ gint trace_view_store_get_timestamp_page(TraceViewStore *store, guint64 ts) | |||
1106 | static TraceViewRecord *get_row(TraceViewStore *store, gint row) | 1106 | static TraceViewRecord *get_row(TraceViewStore *store, gint row) |
1107 | { | 1107 | { |
1108 | TraceViewRecord *record; | 1108 | TraceViewRecord *record; |
1109 | gint index = row - store->start_row; | ||
1109 | 1110 | ||
1110 | g_return_val_if_fail(row >= store->start_row && row < store->visible_rows, NULL); | 1111 | g_return_val_if_fail(index >= 0 && index < store->visible_rows, NULL); |
1111 | 1112 | ||
1112 | record = store->rows[row]; | 1113 | record = store->rows[row]; |
1113 | g_assert(record != NULL); | 1114 | 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 @@ static void search_tree(gpointer data) | |||
772 | break; | 772 | break; |
773 | } | 773 | } |
774 | 774 | ||
775 | |||
776 | if (!found) { | 775 | if (!found) { |
777 | printf("NOT FOUND!\n"); | 776 | printf("NOT FOUND!\n"); |
778 | /* show pop up */ | 777 | /* show pop up */ |