From 4c3c43370001b70b470b50470927539c83476121 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Wed, 26 Jan 2022 23:01:44 +0100 Subject: [PATCH] gtkmm: use get_first_cell() instead of deprecated Gtk::TreeViewColumn::get_first_cell_renderer() --- gtk2_ardour/region_list_base.cc | 8 ++++---- gtk2_ardour/route_list_base.cc | 2 +- gtk2_ardour/route_list_base.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/region_list_base.cc b/gtk2_ardour/region_list_base.cc index 38290f8a3d..ebfb6e185a 100644 --- a/gtk2_ardour/region_list_base.cc +++ b/gtk2_ardour/region_list_base.cc @@ -131,7 +131,7 @@ RegionListBase::setup_col (TreeViewColumn* col, int sort_idx, Gtk::AlignmentEnum col->set_alignment (al); /* ...and this sets the alignment for the data cells */ - CellRendererText* renderer = dynamic_cast (col->get_first_cell_renderer ()); + CellRendererText* renderer = dynamic_cast (col->get_first_cell ()); if (renderer) { renderer->property_xalign () = (al == ALIGN_END ? 1.0 : (al == ALIGN_START ? 0.0 : 0.5)); } @@ -140,7 +140,7 @@ RegionListBase::setup_col (TreeViewColumn* col, int sort_idx, Gtk::AlignmentEnum void RegionListBase::setup_toggle (Gtk::TreeViewColumn* tvc, sigc::slot cb) { - CellRendererToggle* tc = dynamic_cast (tvc->get_first_cell_renderer ()); + CellRendererToggle* tc = dynamic_cast (tvc->get_first_cell ()); tc->property_activatable () = true; tc->signal_toggled ().connect (cb); } @@ -152,7 +152,7 @@ RegionListBase::add_name_column () setup_col (tvc, 0, ALIGN_START, _("Name"), ("Region name")); /* Region Name: make editable */ - CellRendererText* region_name_cell = dynamic_cast (tvc->get_first_cell_renderer ()); + CellRendererText* region_name_cell = dynamic_cast (tvc->get_first_cell ()); region_name_cell->property_editable () = true; region_name_cell->signal_edited ().connect (sigc::mem_fun (*this, &RegionListBase::name_edit)); region_name_cell->signal_editing_started ().connect (sigc::mem_fun (*this, &RegionListBase::name_editing_started)); @@ -169,7 +169,7 @@ RegionListBase::add_tag_column () setup_col (tvc, 2, ALIGN_START, _("Tags"), _("Tags")); /* Tags cell: make editable */ - CellRendererText* region_tags_cell = dynamic_cast (tvc->get_first_cell_renderer ()); + CellRendererText* region_tags_cell = dynamic_cast (tvc->get_first_cell ()); region_tags_cell->property_editable () = true; region_tags_cell->signal_edited ().connect (sigc::mem_fun (*this, &RegionListBase::tag_edit)); region_tags_cell->signal_editing_started ().connect (sigc::mem_fun (*this, &RegionListBase::tag_editing_started)); diff --git a/gtk2_ardour/route_list_base.cc b/gtk2_ardour/route_list_base.cc index 7d2b394b8f..30eaf74805 100644 --- a/gtk2_ardour/route_list_base.cc +++ b/gtk2_ardour/route_list_base.cc @@ -144,7 +144,7 @@ RouteListBase::add_name_column () setup_col (tvc, _("Name"), ("Track/Bus name")); - CellRendererText* cell = dynamic_cast (tvc->get_first_cell_renderer ()); + CellRendererText* cell = dynamic_cast (tvc->get_first_cell ()); cell->signal_editing_started ().connect (sigc::mem_fun (*this, &RouteListBase::name_edit_started)); tvc->set_sizing (TREE_VIEW_COLUMN_FIXED); tvc->set_expand (true); diff --git a/gtk2_ardour/route_list_base.h b/gtk2_ardour/route_list_base.h index d6b60dca29..9a34a02cf2 100644 --- a/gtk2_ardour/route_list_base.h +++ b/gtk2_ardour/route_list_base.h @@ -75,7 +75,7 @@ protected: tvc->set_expand (false); tvc->set_alignment (Gtk::ALIGN_CENTER); - Gtk::CellRendererToggle* tc = dynamic_cast (tvc->get_first_cell_renderer ()); + Gtk::CellRendererToggle* tc = dynamic_cast (tvc->get_first_cell ()); tc->property_activatable () = true; tc->property_radio () = false; tc->signal_toggled ().connect (cb);