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 | 5d7c8646d5ed2a57bc322b62de192fbdf70429de (patch) | |
| tree | e00b64cf8427edf627c9254c330926a03d8c3ea1 /src/preferencesrow.cpp | |
| parent | 87a7ddf206eff38e175c82bdc31ce6f7bd088f93 (diff) | |
| download | libadwaitamm-5d7c8646d5ed2a57bc322b62de192fbdf70429de.tar.xz libadwaitamm-5d7c8646d5ed2a57bc322b62de192fbdf70429de.zip | |
adw: clean up implementation
Diffstat (limited to 'src/preferencesrow.cpp')
| -rw-r--r-- | src/preferencesrow.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/preferencesrow.cpp b/src/preferencesrow.cpp index ef9b281..039da96 100644 --- a/src/preferencesrow.cpp +++ b/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 |
