diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-06-05 18:09:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-06-05 18:09:07 +0200 |
| commit | 8b7ba278cd17db8ffeb73a9af619d5443f751ebc (patch) | |
| tree | ea5a3c9ba9e58303f55ce6ba11a04e59a10c370b /gui | |
| parent | 54b464b1b5adb6f1b489777ce65e8299d49b8249 (diff) | |
| download | turns-8b7ba278cd17db8ffeb73a9af619d5443f751ebc.tar.xz turns-8b7ba278cd17db8ffeb73a9af619d5443f751ebc.zip | |
gui: make sure Tracker widget is registered
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/include/tracker.hpp | 2 | ||||
| -rw-r--r-- | gui/src/init.cpp | 2 | ||||
| -rw-r--r-- | gui/src/tracker.cpp | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/gui/include/tracker.hpp b/gui/include/tracker.hpp index 2bf43ae..05921fa 100644 --- a/gui/include/tracker.hpp +++ b/gui/include/tracker.hpp @@ -52,8 +52,6 @@ namespace Turns::gui auto load(Glib::RefPtr<Gio::File> file) -> void; private: - Tracker(); - /** Setup */ auto setup_actions() -> void; auto setup_colors() -> void; diff --git a/gui/src/init.cpp b/gui/src/init.cpp index 220f1f4..378065c 100644 --- a/gui/src/init.cpp +++ b/gui/src/init.cpp @@ -8,6 +8,7 @@ #include "participant_editor.hpp" #include "participant_row.hpp" #include "preferences.hpp" +#include "tracker.hpp" #include "turn_order_view.hpp" #include <glib-object.h> @@ -17,5 +18,6 @@ auto Turns::gui::init() -> void g_type_ensure(ParticipantRow{nullptr}.get_type()); g_type_ensure(ParticipantEditor{nullptr}.get_type()); g_type_ensure(Preferences{}.get_type()); + g_type_ensure(Tracker{{}, {}}.get_type()); g_type_ensure(TurnOrderView{}.get_type()); } diff --git a/gui/src/tracker.cpp b/gui/src/tracker.cpp index c9ae2c5..683c2c7 100644 --- a/gui/src/tracker.cpp +++ b/gui/src/tracker.cpp @@ -82,11 +82,6 @@ namespace Turns::gui } } // namespace - Tracker::Tracker() - : Tracker{{}, gui::get_settings()} - { - } - Tracker::Tracker(Glib::RefPtr<Adwaita::Application> const & app, Glib::RefPtr<Gio::Settings> const & settings) : Glib::ObjectBase{TYPE_NAME} , template_widget{TEMPLATE, app} @@ -102,6 +97,11 @@ namespace Turns::gui , m_subtitle{m_title->property_subtitle()} , m_css{Gtk::CssProvider::create()} { + if (!settings) + { + return; + } + setup_colors(); setup_actions(); |
