[libadwaita/wip/exalm/screenshots-2: 14/21] preferences-window: Allow adding toasts with GtkBuilder




commit a026eed5319047858a3671c4240ed5588954164b
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Dec 20 17:53:15 2021 +0500

    preferences-window: Allow adding toasts with GtkBuilder
    
    Match AdwToastOverlay.

 src/adw-preferences-window.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/adw-preferences-window.c b/src/adw-preferences-window.c
index 0d8af508..8df89277 100644
--- a/src/adw-preferences-window.c
+++ b/src/adw-preferences-window.c
@@ -660,6 +660,8 @@ adw_preferences_window_buildable_add_child (GtkBuildable *buildable,
 
   if (priv->content_stack && ADW_IS_PREFERENCES_PAGE (child))
     adw_preferences_window_add (self, ADW_PREFERENCES_PAGE (child));
+  else if (ADW_IS_TOAST (child))
+    adw_preferences_window_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]