Adapt to removal of glib::Inhibit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1270>
This commit is contained in:
Bilal Elmoussaoui 2023-07-06 22:02:31 +02:00
parent 2abc72b606
commit 0fa2c861d6
2 changed files with 4 additions and 9 deletions

View file

@ -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: &gtk::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();

View file

@ -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: &gtk::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();