Commit 8b6d16dd authored by daniel_e's avatar daniel_e
Browse files

(expand_and_select): Make use of Gtk::TreeView::expand_to_path() if available.

parent e7efc139
2002-12-15 Daniel Elstner <daniel.elstner@gmx.net>
* src/filetree.cc (expand_and_select): Make use of
Gtk::TreeView::expand_to_path() if available.
2002-12-15 Daniel Elstner <daniel.elstner@gmx.net>
* src/miscutils.{cc,h}: New files. Move Util::prior() and next()
......
......@@ -27,6 +27,8 @@
#include <gtkmm/stock.h>
#include <config.h>
using namespace Regexxer::FileTreePrivate;
......@@ -719,6 +721,9 @@ bool FileTree::prev_match_file(Gtk::TreeModel::iterator& iter,
void FileTree::expand_and_select(const Gtk::TreePath& path)
{
#if REGEXXER_HAVE_GTKMM_22
expand_to_path(path);
#else
std::stack<Gtk::TreePath> parents;
for(Gtk::TreePath parent (path); parent.up(); )
......@@ -726,6 +731,7 @@ void FileTree::expand_and_select(const Gtk::TreePath& path)
for(; !parents.empty(); parents.pop())
expand_row(parents.top(), false);
#endif
get_selection()->select(path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment