4

Is there a way to hook the interactive-search dialog in such a way that I handle what happens when the user types text in it? I want to hook it so I can implement interactive filtering instead of searching.

I'll use GtkTreeModelFilter over a list-store, and I'll call gtk_tree_model_filter_refilter() each time the user types or deletes a symbol in the interactive search box.

I imagine something like this pseudo-code:

void on_search_box_text_changed(gchar *new_text)
{
     set_filter_text(new_text);
     GtkTreeModelFilter *filter = ...;
     gtk_tree_model_filter_refilter(filter);
}

If it works, it would look like this.

sashoalm
  • 75,001
  • 122
  • 434
  • 781

0 Answers0