From 51babee1fc579cd99d32d1b7156ee553ed847339 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 4 Apr 2025 20:26:02 +0200 Subject: adw: move ToastPriority --- adw/src/toast.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'adw/src/toast.cpp') diff --git a/adw/src/toast.cpp b/adw/src/toast.cpp index 9ec0a5b..205e69f 100644 --- a/adw/src/toast.cpp +++ b/adw/src/toast.cpp @@ -1,5 +1,6 @@ #include "adwaitamm/toast.hpp" +#include "adwaitamm/enums.hpp" #include "adwaitamm/helpers/properties.hpp" #include @@ -23,9 +24,6 @@ namespace Adwaita { - static_assert(static_cast(Toast::Priority::NORMAL) == ADW_TOAST_PRIORITY_NORMAL); - static_assert(static_cast(Toast::Priority::HIGH) == ADW_TOAST_PRIORITY_HIGH); - namespace { auto constinit _class = Toast::Class{}; @@ -118,9 +116,9 @@ namespace Adwaita return Glib::wrap(adw_toast_get_custom_title(const_cast(Glib::unwrap(this)))); } - auto Toast::get_priority() const -> Priority + auto Toast::get_priority() const -> ToastPriority { - return static_cast(adw_toast_get_priority(const_cast(Glib::unwrap(this)))); + return static_cast(adw_toast_get_priority(const_cast(Glib::unwrap(this)))); } auto Toast::get_timeout() const -> unsigned @@ -163,7 +161,7 @@ namespace Adwaita adw_toast_set_detailed_action_name(Glib::unwrap(this), Glib::c_str_or_nullptr(value)); } - auto Toast::set_priority(Priority value) -> void + auto Toast::set_priority(ToastPriority value) -> void { adw_toast_set_priority(Glib::unwrap(this), static_cast(value)); } @@ -203,9 +201,9 @@ namespace Adwaita return helpers::make_property_proxy(*this, "custom-title"); } - auto Toast::property_priority() -> Glib::PropertyProxy + auto Toast::property_priority() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "priority"); + return helpers::make_property_proxy(*this, "priority"); } auto Toast::property_timeout() -> Glib::PropertyProxy -- cgit v1.2.3