diff options
| -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 | ||||
| -rw-r--r-- | res/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | res/widgets/participant_row.ui (renamed from res/widgets/participant_list_row.ui) | 2 | ||||
| -rw-r--r-- | res/widgets/widgets.cmb | 4 |
7 files changed, 22 insertions, 22 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 diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt index 6131388..64ec023 100644 --- a/res/CMakeLists.txt +++ b/res/CMakeLists.txt @@ -5,7 +5,7 @@ add_library("res") target_add_glib_resources("res" PREFIX "ch/arknet/Turns" UI_FILES - "widgets/participant_list_row.ui" + "widgets/participant_row.ui" "windows/main.ui" "windows/participant_editor.ui" CSS_FILES diff --git a/res/widgets/participant_list_row.ui b/res/widgets/participant_row.ui index 076d3f4..683fbb6 100644 --- a/res/widgets/participant_list_row.ui +++ b/res/widgets/participant_row.ui @@ -3,7 +3,7 @@ <interface> <!-- interface-name participant_list_item.ui --> <requires lib="gtk" version="4.14"/> - <template class="gtkmm__CustomObject_participant_list_row" parent="GtkListBoxRow"> + <template class="gtkmm__CustomObject_participant_row" parent="GtkListBoxRow"> <property name="activatable">False</property> <property name="child"> <object class="GtkBox"> diff --git a/res/widgets/widgets.cmb b/res/widgets/widgets.cmb index 1534bde..983dbea 100644 --- a/res/widgets/widgets.cmb +++ b/res/widgets/widgets.cmb @@ -2,13 +2,13 @@ <!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd"> <cambalache-project version="0.17.3" target_tk="gtk-4.0"> <ui> - (1,1,"participant_list_item.ui","participant_list_row.ui",None,None,None,None,None,None,None) + (1,1,"participant_list_item.ui","participant_row.ui",None,None,None,None,None,None,None) </ui> <ui_library> (1,"gtk","4.14",None) </ui_library> <object> - (1,1,"GtkListBoxRow","gtkmm__CustomObject_participant_list_row",None,None,None,None,-1,None,None), + (1,1,"GtkListBoxRow","gtkmm__CustomObject_participant_row",None,None,None,None,-1,None,None), (1,2,"GtkBox",None,1,None,None,None,-1,None,None), (1,3,"GtkBox",None,2,None,None,None,-1,None,None), (1,5,"GtkBox",None,2,None,None,None,-1,None,None), |
