[libadwaita/wip/exalm/screenshots-2: 8/15] 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: 8/15] toast-overlay: Allow adding toasts via in GtkBuilder
- Date: Mon, 20 Dec 2021 15:37:46 +0000 (UTC)
commit c48fd686ec5dee7071185aa557252a9b4c1e491f
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]