diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 16:45:46 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 16:45:46 +0200 |
| commit | e28cff88c03afa5cd90951deeff62b4efb910421 (patch) | |
| tree | 8f8f35696156c3647e59d07bf139e0a54844766d /app | |
| parent | a23cda29f0acef40d883c37209389c956c14e83b (diff) | |
| download | turns-e28cff88c03afa5cd90951deeff62b4efb910421.tar.xz turns-e28cff88c03afa5cd90951deeff62b4efb910421.zip | |
app: rename participant_list_row
Diffstat (limited to 'app')
| -rw-r--r-- | app/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | app/include/turns/app/widgets/participant_row.hpp (renamed from app/include/turns/app/widgets/participant_list_row.hpp) | 8 | ||||
| -rw-r--r-- | app/src/widgets/participant_row.cpp (renamed from app/src/widgets/participant_list_row.cpp) | 22 | ||||
| -rw-r--r-- | app/src/windows/main.cpp | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index a65a489..eaf16b6 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -2,7 +2,7 @@ add_library("app" "src/application.cpp" - "src/widgets/participant_list_row.cpp" + "src/widgets/participant_row.cpp" "src/windows/main.cpp" "src/windows/participant_editor.cpp" ) diff --git a/app/include/turns/app/widgets/participant_list_row.hpp b/app/include/turns/app/widgets/participant_row.hpp index 6a9a6c2..a8f225f 100644 --- a/app/include/turns/app/widgets/participant_list_row.hpp +++ b/app/include/turns/app/widgets/participant_row.hpp @@ -1,5 +1,5 @@ -#ifndef TURNS_APP_WIDGETS_PARTICIPANT_LIST_ROW_HPP -#define TURNS_APP_WIDGETS_PARTICIPANT_LIST_ROW_HPP +#ifndef TURNS_APP_WIDGETS_PARTICIPANT_ROW_HPP +#define TURNS_APP_WIDGETS_PARTICIPANT_ROW_HPP #include "turns/app/widgets/template_widget.hpp" #include "turns/domain/participant.hpp" @@ -16,7 +16,7 @@ namespace turns::app::widgets { - struct participant_list_row : template_widget<participant_list_row, Gtk::ListBoxRow> + struct participant_row : template_widget<participant_row, Gtk::ListBoxRow> { auto constexpr inline static children = std::array{ "delete", @@ -26,7 +26,7 @@ namespace turns::app::widgets "toggle_defeated", }; - participant_list_row(Glib::RefPtr<domain::participant> participant); + participant_row(Glib::RefPtr<domain::participant> participant); auto set_subtitle(Glib::ustring const & value) -> void; auto set_title(Glib::ustring const & value) -> void; diff --git a/app/src/widgets/participant_list_row.cpp b/app/src/widgets/participant_row.cpp index 9be3c57..9e0419a 100644 --- a/app/src/widgets/participant_list_row.cpp +++ b/app/src/widgets/participant_row.cpp @@ -1,4 +1,4 @@ -#include "turns/app/widgets/participant_list_row.hpp" +#include "turns/app/widgets/participant_row.hpp" #include "turns/lang/messages.hpp" @@ -13,13 +13,13 @@ namespace turns::app::widgets { namespace { - auto constexpr static TYPE_NAME = "participant_list_row"; - auto constexpr static TEMPLATE = "/ch/arknet/Turns/widgets/participant_list_row.ui"; + auto constexpr static TYPE_NAME = "participant_row"; + auto constexpr static TEMPLATE = "/ch/arknet/Turns/widgets/participant_row.ui"; } // namespace - participant_list_row::participant_list_row(Glib::RefPtr<domain::participant> participant) + participant_row::participant_row(Glib::RefPtr<domain::participant> participant) : Glib::ObjectBase(TYPE_NAME) - , template_widget<participant_list_row, Gtk::ListBoxRow>{TEMPLATE} + , template_widget<participant_row, Gtk::ListBoxRow>{TEMPLATE} , m_delete{get_widget<Gtk::Button>("delete")} , m_edit{get_widget<Gtk::Button>("edit")} , m_subtitle{get_widget<Gtk::Label>("subtitle")} @@ -27,8 +27,8 @@ namespace turns::app::widgets , m_toggle_defeated{get_widget<Gtk::ToggleButton>("toggle_defeated")} , m_subtitle_visibility{} { - m_delete->signal_clicked().connect(sigc::mem_fun(*this, &participant_list_row::handle_delete)); - m_edit->signal_clicked().connect(sigc::mem_fun(*this, &participant_list_row::handle_edit)); + 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_subtitle_visibility = Glib::Binding::bind_property(m_subtitle->property_label(), m_subtitle->property_visible(), @@ -51,23 +51,23 @@ namespace turns::app::widgets } } - auto participant_list_row::set_subtitle(Glib::ustring const & value) -> void + auto participant_row::set_subtitle(Glib::ustring const & value) -> void { m_subtitle->property_label() = value; } - auto participant_list_row::set_title(Glib::ustring const & value) -> void + auto participant_row::set_title(Glib::ustring const & value) -> void { m_title->property_label() = value; } - auto participant_list_row::handle_delete() -> void + auto participant_row::handle_delete() -> void { auto index = Glib::Variant<int>::create(get_index()); activate_action("win.delete", index); } - auto participant_list_row::handle_edit() -> void + auto participant_row::handle_edit() -> void { auto index = Glib::Variant<int>::create(get_index()); activate_action("win.edit", index); diff --git a/app/src/windows/main.cpp b/app/src/windows/main.cpp index 95ed221..4f0f8c0 100644 --- a/app/src/windows/main.cpp +++ b/app/src/windows/main.cpp @@ -1,6 +1,6 @@ #include "turns/app/windows/main.hpp" -#include "turns/app/widgets/participant_list_row.hpp" +#include "turns/app/widgets/participant_row.hpp" #include "turns/app/windows/participant_editor.hpp" #include "turns/lang/messages.hpp" @@ -57,7 +57,7 @@ namespace turns::app::windows auto main::handle_create_list_row(Glib::RefPtr<Glib::Object> const item) -> Gtk::Widget * { auto participant = std::dynamic_pointer_cast<domain::participant>(item); - return Gtk::make_managed<widgets::participant_list_row>(participant); + return Gtk::make_managed<widgets::participant_row>(participant); } auto main::handle_add_participant() -> void |
