From c5c0130ae226c4c90b48f3dc9ab9c3dc6bb513cc Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 1 Aug 2025 09:08:17 -0500 Subject: [PATCH] Add debug messages --- src/main.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3467a33..264aa70 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,17 @@ fn main() { }); let webview = WebView::new(); + webview.connect_load_changed(|_, load_event| { + eprintln!("Loaded: {load_event:?}"); + }); + webview.connect_load_failed(|_, load_event, failing_uri, error| { + eprintln!( + "Load failed: {load_event:?} while loading {failing_uri} - {}", + error.message() + ); + false + }); + window.add(&webview); window.show_all(); @@ -25,7 +36,10 @@ fn main() { .build() .unwrap() .block_on(async { - sender.send("https://kitchen.pyrocufflink.blue/").await.unwrap(); + sender + .send("https://kitchen.pyrocufflink.blue/") + .await + .unwrap(); }) }); glib::spawn_future_local(async move {