diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-03-27 08:27:32 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-03-27 08:27:32 +0100 |
| commit | 5467a7c2b1fb1831ca726d1ecb6b46010d146ebc (patch) | |
| tree | c1f1ae48c385c5406d8735e915198dc3d3664466 /adw/src/preferencesrow.cpp | |
| parent | cde49b2d8ba32ec5ee1c63087042d8255d88d701 (diff) | |
| download | turns-5467a7c2b1fb1831ca726d1ecb6b46010d146ebc.tar.xz turns-5467a7c2b1fb1831ca726d1ecb6b46010d146ebc.zip | |
adw: clean up implementation
Diffstat (limited to 'adw/src/preferencesrow.cpp')
| -rw-r--r-- | adw/src/preferencesrow.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/adw/src/preferencesrow.cpp b/adw/src/preferencesrow.cpp index ef9b281..039da96 100644 --- a/adw/src/preferencesrow.cpp +++ b/adw/src/preferencesrow.cpp @@ -10,7 +10,8 @@ #include <gtkmm/init.h> #include <gtkmm/listboxrow.h> -#include <gtkmm/private/widget_p.h> +#include <gtkmm/object.h> +#include <gtkmm/private/listboxrow_p.h> #include <adwaita.h> #include <glib-object.h> @@ -21,13 +22,13 @@ namespace turns::adw namespace { auto constinit _class = PreferencesRow::Class{}; - } + } // namespace auto PreferencesRow::Class::init() -> Glib::Class const & { if (!gtype_) { - class_init_func_ = &PreferencesRow::Class::class_init_function; + class_init_func_ = &class_init_function; register_derived_type(adw_preferences_row_get_type()); } return *this; @@ -35,13 +36,13 @@ namespace turns::adw auto PreferencesRow::Class::class_init_function(void * gclass, void * data) -> void { - auto const klass = static_cast<AdwPreferencesRowClass *>(gclass); - Gtk::Widget_Class::class_init_function(klass, data); + auto const klass = static_cast<BaseClassType *>(gclass); + CppClassParent::class_init_function(klass, data); } auto PreferencesRow::Class::wrap_new(GObject * object) -> Glib::ObjectBase * { - return new PreferencesRow(ADW_PREFERENCES_ROW(object)); + return Gtk::manage(new PreferencesRow(ADW_PREFERENCES_ROW(object))); } auto PreferencesRow::get_type() -> GType @@ -90,8 +91,7 @@ namespace turns::adw } PreferencesRow::PreferencesRow(BaseObjectType * gobj) - : Glib::ObjectBase{nullptr} - , Gtk::ListBoxRow(GTK_LIST_BOX_ROW(gobj)) + : Gtk::ListBoxRow(GTK_LIST_BOX_ROW(gobj)) { } @@ -101,7 +101,6 @@ namespace Glib { auto wrap(AdwPreferencesRow * object, bool copy) -> Glib::RefPtr<turns::adw::PreferencesRow> { - return Glib::make_refptr_for_instance<turns::adw::PreferencesRow>( - dynamic_cast<turns::adw::PreferencesRow *>(Glib::wrap_auto(G_OBJECT(object), copy))); + return Glib::make_refptr_for_instance(dynamic_cast<turns::adw::PreferencesRow *>(Glib::wrap_auto(G_OBJECT(object), copy))); } } // namespace Glib
\ No newline at end of file |
