From 9d18485db854f4d430e7c45d9538330b21dd66c3 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 25 Apr 2025 11:56:28 +0200 Subject: adw: perform basic code cleanup --- adw/src/actionrow.cpp | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'adw/src/actionrow.cpp') diff --git a/adw/src/actionrow.cpp b/adw/src/actionrow.cpp index 8242a6e..9c33aec 100644 --- a/adw/src/actionrow.cpp +++ b/adw/src/actionrow.cpp @@ -1,33 +1,42 @@ +/** + * @author Felix Morgner (felix.morgner@gmail.com) + * @copyright Copyright (c) 2025 + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + #include "adwaitamm/actionrow.hpp" -#include "adwaitamm/private/actionrow_p.hpp" #include "adwaitamm/preferencesrow.hpp" +#include "adwaitamm/private/actionrow_p.hpp" -#include #include #include #include #include #include -#include #include -#include -#include -#include -#include #include -#include #include #include -#include namespace Adwaita + { namespace { auto constinit _class = ActionRow_Class{}; + + namespace property_name + { + auto constexpr activatable_widget = "activatable-widget"; + auto constexpr icon_name = "icon-name"; + auto constexpr subtitle = "subtitle"; + auto constexpr subtitle_lines = "subtitle-lines"; + auto constexpr subtitle_selectable = "subtitle-selectable"; + auto constexpr title_lines = "title-lines"; + } // namespace property_name } // namespace auto ActionRow::get_type() -> GType @@ -139,62 +148,62 @@ namespace Adwaita auto ActionRow::property_activatable_widget() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "activatable-widget"); + return Glib::PropertyProxy(this, property_name::activatable_widget); } auto ActionRow::property_activatable_widget() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "activatable-widget"); + return Glib::PropertyProxy_ReadOnly(this, property_name::activatable_widget); } auto ActionRow::property_icon_name() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "icon-name"); + return Glib::PropertyProxy(this, property_name::icon_name); } auto ActionRow::property_icon_name() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "icon-name"); + return Glib::PropertyProxy_ReadOnly(this, property_name::icon_name); } auto ActionRow::property_subtitle() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "subtitle"); + return Glib::PropertyProxy(this, property_name::subtitle); } auto ActionRow::property_subtitle() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "subtitle"); + return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle); } auto ActionRow::property_subtitle_lines() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "subtitle-lines"); + return Glib::PropertyProxy(this, property_name::subtitle_lines); } auto ActionRow::property_subtitle_lines() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "subtitle-lines"); + return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle_lines); } auto ActionRow::property_subtitle_selectable() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "subtitle-selectable"); + return Glib::PropertyProxy(this, property_name::subtitle_selectable); } auto ActionRow::property_subtitle_selectable() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "subtitle-selectable"); + return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle_selectable); } auto ActionRow::property_title_lines() noexcept -> Glib::PropertyProxy { - return Glib::PropertyProxy(this, "title-lines"); + return Glib::PropertyProxy(this, property_name::title_lines); } auto ActionRow::property_title_lines() const noexcept -> Glib::PropertyProxy_ReadOnly { - return Glib::PropertyProxy_ReadOnly(this, "title-lines"); + return Glib::PropertyProxy_ReadOnly(this, property_name::title_lines); } } // namespace Adwaita -- cgit v1.2.3