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/preferencesdialog.cpp | |
| parent | 87a7ddf206eff38e175c82bdc31ce6f7bd088f93 (diff) | |
| download | libadwaitamm-5d7c8646d5ed2a57bc322b62de192fbdf70429de.tar.xz libadwaitamm-5d7c8646d5ed2a57bc322b62de192fbdf70429de.zip | |
adw: clean up implementation
Diffstat (limited to 'src/preferencesdialog.cpp')
| -rw-r--r-- | src/preferencesdialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp index b18c0e6..10419fe 100644 --- a/src/preferencesdialog.cpp +++ b/src/preferencesdialog.cpp @@ -12,6 +12,7 @@ #include <glibmm/wrap.h> #include <gtkmm/init.h> +#include <gtkmm/object.h> #include <gtkmm/private/widget_p.h> #include <gtkmm/widget.h> @@ -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<AdwPreferencesDialogClass *>(gclass); - Gtk::Widget_Class::class_init_function(klass, data); + auto const klass = static_cast<BaseClassType *>(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)) { } |
