From 0afcbdc28f038b38d8cd7fe3d80191dc3bf31303 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 29 Apr 2025 17:03:31 +0200 Subject: ui: rename participant_row to ParticipantRow --- ui/include/turns/ui/participant_row.hpp | 4 ++-- ui/src/init.cpp | 2 +- ui/src/participant_row.cpp | 18 +++++++++--------- ui/src/participant_row.ui | 2 +- ui/src/turn_order_view.cpp | 2 +- ui/tests/participant_row.cpp | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'ui') diff --git a/ui/include/turns/ui/participant_row.hpp b/ui/include/turns/ui/participant_row.hpp index dc72013..ed7b47c 100644 --- a/ui/include/turns/ui/participant_row.hpp +++ b/ui/include/turns/ui/participant_row.hpp @@ -17,7 +17,7 @@ namespace turns::ui { - struct participant_row : template_widget + struct ParticipantRow : template_widget { auto constexpr inline static children = std::array{ "delete", @@ -27,7 +27,7 @@ namespace turns::ui "toggle_defeated", }; - participant_row(Glib::RefPtr participant); + ParticipantRow(Glib::RefPtr participant); auto delete_enabled() -> Glib::PropertyProxy; auto edit_enabled() -> Glib::PropertyProxy; diff --git a/ui/src/init.cpp b/ui/src/init.cpp index 73bd909..0e7e96d 100644 --- a/ui/src/init.cpp +++ b/ui/src/init.cpp @@ -11,7 +11,7 @@ namespace turns::ui auto register_types() -> void { static_cast(ParticipantEditor{{}}); - static_cast(participant_row{{}}); + static_cast(ParticipantRow{{}}); static_cast(preferences{{}}); static_cast(turn_order_view{{}}); } diff --git a/ui/src/participant_row.cpp b/ui/src/participant_row.cpp index b6d18a8..e5075cd 100644 --- a/ui/src/participant_row.cpp +++ b/ui/src/participant_row.cpp @@ -28,7 +28,7 @@ namespace turns::ui { namespace { - auto constexpr static TYPE_NAME = "participant_row"; + auto constexpr static TYPE_NAME = "ParticipantRow"; auto constexpr static TEMPLATE = "/ch/arknet/Turns/participant_row.ui"; auto css_class_for(core::disposition value) -> Glib::ustring @@ -47,9 +47,9 @@ namespace turns::ui } } // namespace - participant_row::participant_row(Glib::RefPtr participant) + ParticipantRow::ParticipantRow(Glib::RefPtr participant) : Glib::ObjectBase(TYPE_NAME) - , template_widget{TEMPLATE} + , template_widget{TEMPLATE} , m_delete{get_widget("delete")} , m_edit{get_widget("edit")} , m_subtitle{get_widget("subtitle")} @@ -59,8 +59,8 @@ namespace turns::ui , m_edit_enabled{*this, "edit-enabled", true} { - m_delete->signal_clicked().connect(sigc::mem_fun(*this, &participant_row::handle_delete)); - m_edit->signal_clicked().connect(sigc::mem_fun(*this, &participant_row::handle_edit)); + m_delete->signal_clicked().connect(sigc::mem_fun(*this, &ParticipantRow::handle_delete)); + m_edit->signal_clicked().connect(sigc::mem_fun(*this, &ParticipantRow::handle_edit)); Glib::Binding::bind_property(m_subtitle->property_label(), m_subtitle->property_visible(), @@ -124,23 +124,23 @@ namespace turns::ui } } - auto participant_row::delete_enabled() -> Glib::PropertyProxy + auto ParticipantRow::delete_enabled() -> Glib::PropertyProxy { return m_delete_enabled.get_proxy(); } - auto participant_row::edit_enabled() -> Glib::PropertyProxy + auto ParticipantRow::edit_enabled() -> Glib::PropertyProxy { return m_edit_enabled.get_proxy(); } - auto participant_row::handle_delete() -> void + auto ParticipantRow::handle_delete() -> void { auto index = Glib::Variant::create(get_index()); activate_action("win.delete", index); } - auto participant_row::handle_edit() -> void + auto ParticipantRow::handle_edit() -> void { auto index = Glib::Variant::create(get_index()); activate_action("win.edit", index); diff --git a/ui/src/participant_row.ui b/ui/src/participant_row.ui index 1a215c6..b53cc53 100644 --- a/ui/src/participant_row.ui +++ b/ui/src/participant_row.ui @@ -3,7 +3,7 @@ -