action_tree->append_column(*column);
}
+ action_tree->set_enable_search(true);
+ action_tree->set_search_column(history_tree_model.name);
+ action_tree->set_search_equal_func(sigc::ptr_fun(&studio::HistoryTreeStore::search_func));
action_tree->set_rules_hint();
// action_tree->signal_row_activated().connect(sigc::mem_fun(*this,&Dock_History::on_row_activate));
}
}
}
+
+bool
+HistoryTreeStore::search_func(const Glib::RefPtr<Gtk::TreeModel>&,int,const Glib::ustring& x,const Gtk::TreeModel::iterator& iter)
+{
+ const Model model;
+
+ Glib::ustring substr(x.uppercase());
+ Glib::ustring name((*iter)[model.name]);
+ name=name.uppercase();
+
+ return name.find(substr)==Glib::ustring::npos;
+}
void insert_action(Gtk::TreeRow row,etl::handle<synfigapp::Action::Undoable> action, bool is_active=true, bool is_undo=true, bool is_redo=false);
+ static bool search_func(const Glib::RefPtr<TreeModel>&,int,const Glib::ustring&,const TreeModel::iterator&);
+
/*
-- ** -- P R O T E C T E D M E T H O D S -----------------------------------
*/