On 11/01/2011 05:17 PM, Denys Vlasenko wrote:
On Tue, 2011-11-01 at 15:31 +0100, Jiri Moskovcak wrote:
> This patch makes the search box on the backtrace page to saerch thru all
> editable items in problem_data highlights the strings in the associated
> textview and also highlights the tab containing the textview. This
> should fix rhbz#748457. Run tested.
+ GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
+ gtk_container_add(GTK_CONTAINER(sw), tev);
+ GList *children = gtk_container_get_children(GTK_CONTAINER(notebook_child));
+ GtkTextView *tev = GTK_TEXT_VIEW(g_list_nth_data(children, 0));
(1) Result of gtk_container_get_children must be freed.
(2) since your container is GtkScrolledWindow, which is GtkBin,
you can actually use that fact and use gtk_bin_get_child
to get just the one child it has, without intermediate list:
GtkTextView *tev = GTK_TEXT_VIEW(gtk_bin_get_child(GTK_BIN(notebook_child)));
+ while ((strlen(search_text)> 0)&& ...
- thx, will include your proposals and push the patch in a minute
Can be done cheaper: while (search_text&& ...
I saw no other problems in the patch.
And I like the idea a lot. Thanks for working on it.
- no problem, I'm thinking about removing the (click to view/edit) and
editing the one-liners from the details treeview and mabye we can merge
some windows, to make the wizard "shorter"