From 5467a7c2b1fb1831ca726d1ecb6b46010d146ebc Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 27 Mar 2025 08:27:32 +0100 Subject: adw: clean up implementation --- adw/src/preferencesdialog.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'adw/src/preferencesdialog.cpp') diff --git a/adw/src/preferencesdialog.cpp b/adw/src/preferencesdialog.cpp index b18c0e6..10419fe 100644 --- a/adw/src/preferencesdialog.cpp +++ b/adw/src/preferencesdialog.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -30,7 +31,7 @@ namespace turns::adw { if (!gtype_) { - class_init_func_ = &PreferencesDialog::Class::class_init_function; + class_init_func_ = &class_init_function; register_derived_type(adw_preferences_dialog_get_type()); } return *this; @@ -38,13 +39,13 @@ namespace turns::adw auto PreferencesDialog::Class::class_init_function(void * gclass, void * data) -> void { - auto const klass = static_cast(gclass); - Gtk::Widget_Class::class_init_function(klass, data); + auto const klass = static_cast(gclass); + CppClassParent::class_init_function(klass, data); } auto PreferencesDialog::Class::wrap_new(GObject * object) -> Glib::ObjectBase * { - return new PreferencesDialog(ADW_PREFERENCES_DIALOG(object)); + return Gtk::manage(new PreferencesDialog(ADW_PREFERENCES_DIALOG(object))); } auto PreferencesDialog::get_type() -> GType @@ -63,8 +64,7 @@ namespace turns::adw } PreferencesDialog::PreferencesDialog(AdwPreferencesDialog * gobj) - : Glib::ObjectBase{nullptr} - , adw::Dialog(ADW_DIALOG(gobj)) + : adw::Dialog(ADW_DIALOG(gobj)) { } -- cgit v1.2.3