diff options
Diffstat (limited to 'app/src/widgets/participant_row.cpp')
| -rw-r--r-- | app/src/widgets/participant_row.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/app/src/widgets/participant_row.cpp b/app/src/widgets/participant_row.cpp index 9e0419a..75321e5 100644 --- a/app/src/widgets/participant_row.cpp +++ b/app/src/widgets/participant_row.cpp @@ -45,22 +45,14 @@ namespace turns::app::widgets if (participant) { - set_title(participant->get_name()); - auto priority = participant->get_priority(); - set_subtitle(std::vformat(_(lang::priority_number), std::make_format_args(priority))); - } - } - - auto participant_row::set_subtitle(Glib::ustring const & value) -> void - { - m_subtitle->property_label() = value; - } + m_title_label = Glib::Binding::bind_property(participant->property_name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE); - auto participant_row::set_title(Glib::ustring const & value) -> void - { - m_title->property_label() = value; + m_subtitle_label = Glib::Binding::bind_property(participant->property_priority(), + m_subtitle->property_label(), + Glib::Binding::Flags::SYNC_CREATE, + [](auto n) { return std::vformat(_(lang::priority_number), std::make_format_args(n)); }); + } } - auto participant_row::handle_delete() -> void { auto index = Glib::Variant<int>::create(get_index()); |
