From 31c7b383b4066d22ef2a4b579201543d02a21006 Mon Sep 17 00:00:00 2001 From: Pavel Baksy Date: Mon, 5 Jan 2026 11:14:31 +0100 Subject: [PATCH] Fix toast notifications by adding AdwToastOverlay --- meson.build | 2 +- src/main-window.ui | 6 +++++- src/window.py | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 0411c9c..3603c11 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('roster', - version: '0.4.0', + version: '0.4.1', meson_version: '>= 1.0.0', default_options: [ 'warning_level=2', 'werror=false', ], ) diff --git a/src/main-window.ui b/src/main-window.ui index a79da86..d258f3d 100644 --- a/src/main-window.ui +++ b/src/main-window.ui @@ -7,7 +7,9 @@ 1200 800 - + + + horizontal 180 False @@ -209,6 +211,8 @@ + + diff --git a/src/window.py b/src/window.py index 4188ecd..f3d41d8 100644 --- a/src/window.py +++ b/src/window.py @@ -39,6 +39,9 @@ import uuid class RosterWindow(Adw.ApplicationWindow): __gtype_name__ = 'RosterWindow' + # Toast overlay + toast_overlay = Gtk.Template.Child() + # Top bar widgets save_request_button = Gtk.Template.Child() new_request_button = Gtk.Template.Child() @@ -750,10 +753,7 @@ class RosterWindow(Adw.ApplicationWindow): toast = Adw.Toast() toast.set_title(message) toast.set_timeout(3) - - # Get the toast overlay (we need to add one) - # For now, just print to console - print(f"Toast: {message}") + self.toast_overlay.add_toast(toast) # Project Management Methods