summaryrefslogtreecommitdiff
path: root/adw/src/actionrow.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-25 11:56:28 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-25 11:56:28 +0200
commit9d18485db854f4d430e7c45d9538330b21dd66c3 (patch)
tree99b3af6fa6855ef808bf7efca2d2438f669f9ec8 /adw/src/actionrow.cpp
parent95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0 (diff)
downloadturns-9d18485db854f4d430e7c45d9538330b21dd66c3.tar.xz
turns-9d18485db854f4d430e7c45d9538330b21dd66c3.zip
adw: perform basic code cleanup
Diffstat (limited to 'adw/src/actionrow.cpp')
-rw-r--r--adw/src/actionrow.cpp51
1 files changed, 30 insertions, 21 deletions
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 <glibmm/class.h>
#include <glibmm/object.h>
#include <glibmm/objectbase.h>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
-#include <glibmm/utility.h>
#include <glibmm/wrap.h>
-#include <gtkmm/init.h>
-#include <gtkmm/listboxrow.h>
-#include <gtkmm/object.h>
-#include <gtkmm/private/widget_p.h>
#include <gtkmm/widget.h>
-#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
-#include <gtk/gtk.h>
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<Gtk::Widget *>
{
- return Glib::PropertyProxy<Gtk::Widget *>(this, "activatable-widget");
+ return Glib::PropertyProxy<Gtk::Widget *>(this, property_name::activatable_widget);
}
auto ActionRow::property_activatable_widget() const noexcept -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *>
{
- return Glib::PropertyProxy_ReadOnly<Gtk::Widget *>(this, "activatable-widget");
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget *>(this, property_name::activatable_widget);
}
auto ActionRow::property_icon_name() noexcept -> Glib::PropertyProxy<Glib::ustring>
{
- return Glib::PropertyProxy<Glib::ustring>(this, "icon-name");
+ return Glib::PropertyProxy<Glib::ustring>(this, property_name::icon_name);
}
auto ActionRow::property_icon_name() const noexcept -> Glib::PropertyProxy_ReadOnly<Glib::ustring>
{
- return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "icon-name");
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, property_name::icon_name);
}
auto ActionRow::property_subtitle() noexcept -> Glib::PropertyProxy<Glib::ustring>
{
- return Glib::PropertyProxy<Glib::ustring>(this, "subtitle");
+ return Glib::PropertyProxy<Glib::ustring>(this, property_name::subtitle);
}
auto ActionRow::property_subtitle() const noexcept -> Glib::PropertyProxy_ReadOnly<Glib::ustring>
{
- return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "subtitle");
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, property_name::subtitle);
}
auto ActionRow::property_subtitle_lines() noexcept -> Glib::PropertyProxy<int>
{
- return Glib::PropertyProxy<int>(this, "subtitle-lines");
+ return Glib::PropertyProxy<int>(this, property_name::subtitle_lines);
}
auto ActionRow::property_subtitle_lines() const noexcept -> Glib::PropertyProxy_ReadOnly<int>
{
- return Glib::PropertyProxy_ReadOnly<int>(this, "subtitle-lines");
+ return Glib::PropertyProxy_ReadOnly<int>(this, property_name::subtitle_lines);
}
auto ActionRow::property_subtitle_selectable() noexcept -> Glib::PropertyProxy<bool>
{
- return Glib::PropertyProxy<bool>(this, "subtitle-selectable");
+ return Glib::PropertyProxy<bool>(this, property_name::subtitle_selectable);
}
auto ActionRow::property_subtitle_selectable() const noexcept -> Glib::PropertyProxy_ReadOnly<bool>
{
- return Glib::PropertyProxy_ReadOnly<bool>(this, "subtitle-selectable");
+ return Glib::PropertyProxy_ReadOnly<bool>(this, property_name::subtitle_selectable);
}
auto ActionRow::property_title_lines() noexcept -> Glib::PropertyProxy<int>
{
- return Glib::PropertyProxy<int>(this, "title-lines");
+ return Glib::PropertyProxy<int>(this, property_name::title_lines);
}
auto ActionRow::property_title_lines() const noexcept -> Glib::PropertyProxy_ReadOnly<int>
{
- return Glib::PropertyProxy_ReadOnly<int>(this, "title-lines");
+ return Glib::PropertyProxy_ReadOnly<int>(this, property_name::title_lines);
}
} // namespace Adwaita