summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/src/widgets/participant_row.cpp8
-rw-r--r--ui/src/windows/participant_editor.cpp12
-rw-r--r--ui/tests/windows/participant_editor.cpp4
3 files changed, 12 insertions, 12 deletions
diff --git a/ui/src/widgets/participant_row.cpp b/ui/src/widgets/participant_row.cpp
index 305336e..0a2a3b6 100644
--- a/ui/src/widgets/participant_row.cpp
+++ b/ui/src/widgets/participant_row.cpp
@@ -86,13 +86,13 @@ namespace turns::ui::widgets
if (participant)
{
- Glib::Binding::bind_property(participant->name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE);
+ Glib::Binding::bind_property(participant->property_name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE);
- Glib::Binding::bind_property(participant->priority(), m_subtitle->property_label(), Glib::Binding::Flags::SYNC_CREATE, [](auto n) {
+ 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));
});
- Glib::Binding::bind_property(participant->disposition(),
+ Glib::Binding::bind_property(participant->property_disposition(),
m_toggle_defeated->property_css_classes(),
Glib::Binding::Flags::SYNC_CREATE,
[this](auto value) {
@@ -105,7 +105,7 @@ namespace turns::ui::widgets
return classes;
});
- Glib::Binding::bind_property(participant->is_active(), property_css_classes(), Glib::Binding::Flags::SYNC_CREATE, [this](auto value) {
+ Glib::Binding::bind_property(participant->property_is_active(), property_css_classes(), Glib::Binding::Flags::SYNC_CREATE, [this](auto value) {
auto classes = get_css_classes();
if (!value)
{
diff --git a/ui/src/windows/participant_editor.cpp b/ui/src/windows/participant_editor.cpp
index 1577554..a14593b 100644
--- a/ui/src/windows/participant_editor.cpp
+++ b/ui/src/windows/participant_editor.cpp
@@ -61,9 +61,9 @@ namespace turns::ui::windows
if (m_participant)
{
- gtk_editable_set_text(GTK_EDITABLE(m_name), m_participant->name().get_value().c_str());
- adw_spin_row_set_value(m_priority, m_participant->priority());
- adw_combo_row_set_selected(m_disposition, static_cast<unsigned>(m_participant->disposition().get_value()));
+ gtk_editable_set_text(GTK_EDITABLE(m_name), m_participant->property_name().get_value().c_str());
+ adw_spin_row_set_value(m_priority, m_participant->property_priority());
+ adw_combo_row_set_selected(m_disposition, static_cast<unsigned>(m_participant->property_disposition().get_value()));
}
}
@@ -85,9 +85,9 @@ namespace turns::ui::windows
if (m_participant)
{
- m_participant->name() = name;
- m_participant->priority() = priority;
- m_participant->disposition() = disposition;
+ m_participant->property_name() = name;
+ m_participant->property_priority() = priority;
+ m_participant->property_disposition() = disposition;
}
m_signal_finished.emit(name, priority, disposition);
diff --git a/ui/tests/windows/participant_editor.cpp b/ui/tests/windows/participant_editor.cpp
index b721018..46c9b58 100644
--- a/ui/tests/windows/participant_editor.cpp
+++ b/ui/tests/windows/participant_editor.cpp
@@ -97,13 +97,13 @@ namespace turns::ui::windows::tests
SECTION("has its name field set according to its participant")
{
auto widget = GTK_EDITABLE(Glib::unwrap(builder->get_widget<Gtk::ListBoxRow>("name")));
- REQUIRE(gtk_editable_get_text(widget) == participant->name().get_value());
+ REQUIRE(gtk_editable_get_text(widget) == participant->property_name().get_value());
}
SECTION("has its priority field set according to its participant")
{
auto widget = ADW_SPIN_ROW(Glib::unwrap(builder->get_widget<Gtk::ListBoxRow>("priority")));
- REQUIRE(adw_spin_row_get_value(widget) == participant->priority());
+ REQUIRE(adw_spin_row_get_value(widget) == participant->property_priority());
}
SECTION("allows binding to the finished signal")