examples: Update for gio::Application::run() API simplification

This commit is contained in:
Sebastian Dröge 2021-04-08 10:36:05 +03:00
parent 8d983066f5
commit 8da8e31d63
2 changed files with 2 additions and 7 deletions

View file

@ -17,7 +17,6 @@ use gio::prelude::*;
use gtk::prelude::*;
use std::cell::RefCell;
use std::env;
fn create_ui(app: &gtk::Application) {
let pipeline = gst::Pipeline::new(None);
@ -155,6 +154,5 @@ fn main() {
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
app.connect_activate(create_ui);
let args = env::args().collect::<Vec<_>>();
app.run(&args);
app.run();
}

View file

@ -25,8 +25,6 @@ use gio::prelude::*;
use gtk::prelude::*;
use std::env;
use std::os::raw::c_void;
use std::cell::RefCell;
@ -269,6 +267,5 @@ fn main() {
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
app.connect_activate(create_ui);
let args = env::args().collect::<Vec<_>>();
app.run(&args);
app.run();
}