From a2748035684d02deacfd1e300e420d5c1c8f6a16 Mon Sep 17 00:00:00 2001 From: Giuseppe Penone Date: Sun, 3 Mar 2024 21:52:46 +0000 Subject: [PATCH] fixed tooltip on search results dialog, expected to display the node hierarchical name --- src/ct/ct_actions_find.cc | 4 ++-- src/ct/ct_dialogs_find.cc | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ct/ct_actions_find.cc b/src/ct/ct_actions_find.cc index 73a300d16..d0a6c45d7 100644 --- a/src/ct/ct_actions_find.cc +++ b/src/ct/ct_actions_find.cc @@ -444,7 +444,7 @@ bool CtActions::_parse_node_name_n_tags_iter(CtTreeIter& node_iter, if (match_info.matches()) { if (all_matches) { gint64 node_id = node_iter.get_node_id(); - Glib::ustring node_hier_name = CtMiscUtil::get_node_hierarchical_name(node_iter, " << ", false, false); + Glib::ustring node_hier_name = CtMiscUtil::get_node_hierarchical_name(node_iter, " / ", false/*for_filename*/, true/*root_to_leaf*/); Glib::ustring line_content = _get_first_line_content(node_iter.get_node_text_buffer()); const Glib::ustring text_tags = node_iter.get_node_tags(); _s_state.match_store->add_row(node_id, @@ -624,7 +624,7 @@ bool CtActions::_find_pattern(CtTreeIter tree_iter, if (all_matches) { const gint64 node_id = tree_iter.get_node_id(); const Glib::ustring node_name = tree_iter.get_node_name(); - const std::string node_hier_name = CtMiscUtil::get_node_hierarchical_name(tree_iter, " << ", false, false); + const std::string node_hier_name = CtMiscUtil::get_node_hierarchical_name(tree_iter, " / ", false/*for_filename*/, true/*root_to_leaf*/); const Glib::ustring line_content = obj_match_offsets.first != -1 ? obj_content : _get_line_content(text_buffer, _s_state.latest_match_offsets.second); int line_num = text_buffer->get_iter_at_offset(_s_state.latest_match_offsets.first).get_line(); diff --git a/src/ct/ct_dialogs_find.cc b/src/ct/ct_dialogs_find.cc index 1c1ef0b37..c445114a7 100644 --- a/src/ct/ct_dialogs_find.cc +++ b/src/ct/ct_dialogs_find.cc @@ -520,9 +520,7 @@ void CtDialogs::match_dialog(const std::string& str_find, pTreeview->append_column(_("Node Name"), rModel->columns.node_name); pTreeview->append_column(_("Line"), rModel->columns.line_num); pTreeview->append_column(_("Line Content"), rModel->columns.line_content); - pTreeview->append_column("", rModel->columns.node_hier_name); - pTreeview->get_column(3)->property_visible() = false; - pTreeview->set_tooltip_column(3); + pTreeview->set_tooltip_column(2/*rModel->columns.node_hier_name*/); auto pScrolledBox = Gtk::manage(new Gtk::Box{Gtk::ORIENTATION_VERTICAL, 3/*spacing*/}); pScrolledBox->pack_start(*pTreeview); if (CtTreeIter::get_hit_exclusion_from_search()) {