[libadwaita/wip/exalm/screenshots-2: 14/23] toast-overlay: Allow adding toasts via in GtkBuilder
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/screenshots-2: 14/23] toast-overlay: Allow adding toasts via in GtkBuilder
- Date: Tue, 21 Dec 2021 07:05:47 +0000 (UTC)
commit 7d89d6ca1b7a216a5deabd4f467d653ee43d0b9d
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Dec 13 16:35:11 2021 +0100
toast-overlay: Allow adding toasts via in GtkBuilder
This will help making automatic screenshots for toasts.
src/adw-toast-overlay.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/adw-toast-overlay.c b/src/adw-toast-overlay.c
index 8a3a8e3c..a9c4eac5 100644
--- a/src/adw-toast-overlay.c
+++ b/src/adw-toast-overlay.c
@@ -474,6 +474,8 @@ adw_toast_overlay_buildable_add_child (GtkBuildable *buildable,
if (!type && GTK_IS_WIDGET (child))
adw_toast_overlay_set_child (self, GTK_WIDGET (child));
+ else if (!type && ADW_IS_TOAST (child))
+ adw_toast_overlay_add_toast (self, g_object_ref (ADW_TOAST (child)));
else
parent_buildable_iface->add_child (buildable, builder, child, type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]