From 0fa2c861d6475e967bd1925d821020b8a0dbc7e2 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 6 Jul 2023 22:02:31 +0200 Subject: [PATCH] Adapt to removal of glib::Inhibit Part-of: --- utils/fallbackswitch/examples/gtk_fallbackswitch.rs | 7 ++----- utils/togglerecord/examples/gtk_recording.rs | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs index f3bd64b6..2b644c94 100644 --- a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs +++ b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs @@ -6,13 +6,10 @@ // // SPDX-License-Identifier: MPL-2.0 -use gio::prelude::*; - use gst::glib; use gst::prelude::*; use gtk::prelude::*; -use gtk::Inhibit; use std::cell::RefCell; @@ -145,11 +142,11 @@ fn create_ui(app: >k::Application) { window.connect_close_request(move |_| { let app = match app_weak.upgrade() { Some(app) => app, - None => return Inhibit(false), + None => return glib::ControlFlow::Break, }; app.quit(); - Inhibit(false) + glib::ControlFlow::Break }); let bus = pipeline.bus().unwrap(); diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs index 5b2a8d88..17d90cd3 100644 --- a/utils/togglerecord/examples/gtk_recording.rs +++ b/utils/togglerecord/examples/gtk_recording.rs @@ -9,9 +9,7 @@ use gst::glib; use gst::prelude::*; -use gio::prelude::*; use gtk::prelude::*; -use gtk::Inhibit; use std::cell::RefCell; fn create_pipeline() -> ( @@ -275,11 +273,11 @@ fn create_ui(app: >k::Application) { window.connect_close_request(move |_| { let app = match app_weak.upgrade() { Some(app) => app, - None => return Inhibit(false), + None => return glib::ControlFlow::Break, }; app.quit(); - Inhibit(false) + glib::ControlFlow::Break }); let bus = pipeline.bus().unwrap();