summaryrefslogtreecommitdiff
path: root/adw/src/preferencesdialog.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-03-27 08:27:32 +0100
committerFelix Morgner <felix.morgner@gmail.com>2025-03-27 08:27:32 +0100
commit5467a7c2b1fb1831ca726d1ecb6b46010d146ebc (patch)
treec1f1ae48c385c5406d8735e915198dc3d3664466 /adw/src/preferencesdialog.cpp
parentcde49b2d8ba32ec5ee1c63087042d8255d88d701 (diff)
downloadturns-5467a7c2b1fb1831ca726d1ecb6b46010d146ebc.tar.xz
turns-5467a7c2b1fb1831ca726d1ecb6b46010d146ebc.zip
adw: clean up implementation
Diffstat (limited to 'adw/src/preferencesdialog.cpp')
-rw-r--r--adw/src/preferencesdialog.cpp12
1 files changed, 6 insertions, 6 deletions
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 <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))
{
}