summaryrefslogtreecommitdiff
path: root/adw/src/preferencesrow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adw/src/preferencesrow.cpp')
-rw-r--r--adw/src/preferencesrow.cpp19
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