diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-02-16 20:59:03 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-02-21 20:42:07 -0500 |
commit | 169e56b468c38d073cf0076d7acfb199885ae874 (patch) | |
tree | 3980252fc808b44425ccc9b5d2c797d1f2cb7554 | |
parent | b5eb0d3e7d7f6a12db9c8c756a2d4faff6ebc172 (diff) |
trace-view: Freeze window and wait cursor while doing search
When doing a list search, it may take a while if there are a lot of
events to search through. Freeze the window and change the cursor
to the wait cursor while processing the search.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-view.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/trace-view.c b/trace-view.c index e46c7f9..0f00098 100644 --- a/trace-view.c +++ b/trace-view.c | |||
@@ -738,8 +738,15 @@ static void search_tree(gpointer data) | |||
738 | if (!gtk_tree_model_iter_nth_child(model, &iter, NULL, start_row)) | 738 | if (!gtk_tree_model_iter_nth_child(model, &iter, NULL, start_row)) |
739 | return; | 739 | return; |
740 | 740 | ||
741 | trace_set_cursor(GDK_WATCH); | ||
742 | trace_freeze_all(); | ||
743 | |||
741 | search_val = atoi(search_text); | 744 | search_val = atoi(search_text); |
742 | while (gtk_tree_model_iter_next(model, &iter)) { | 745 | while (gtk_tree_model_iter_next(model, &iter)) { |
746 | |||
747 | /* Needed to process the cursor change */ | ||
748 | gtk_main_iteration_do(FALSE); | ||
749 | |||
743 | switch (col_num) { | 750 | switch (col_num) { |
744 | case TRACE_VIEW_STORE_COL_INDEX: | 751 | case TRACE_VIEW_STORE_COL_INDEX: |
745 | case TRACE_VIEW_STORE_COL_CPU: | 752 | case TRACE_VIEW_STORE_COL_CPU: |
@@ -772,6 +779,8 @@ static void search_tree(gpointer data) | |||
772 | if (found) | 779 | if (found) |
773 | break; | 780 | break; |
774 | } | 781 | } |
782 | trace_unfreeze_all(); | ||
783 | trace_put_cursor(); | ||
775 | 784 | ||
776 | if (!found) { | 785 | if (!found) { |
777 | trace_dialog(NULL, TRACE_GUI_INFO, "Not found"); | 786 | trace_dialog(NULL, TRACE_GUI_INFO, "Not found"); |