forked from mirrors/gstreamer-rs
examples: Update for gio::Application::run() API simplification
This commit is contained in:
parent
8d983066f5
commit
8da8e31d63
2 changed files with 2 additions and 7 deletions
|
@ -17,7 +17,6 @@ use gio::prelude::*;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::env;
|
|
||||||
|
|
||||||
fn create_ui(app: >k::Application) {
|
fn create_ui(app: >k::Application) {
|
||||||
let pipeline = gst::Pipeline::new(None);
|
let pipeline = gst::Pipeline::new(None);
|
||||||
|
@ -155,6 +154,5 @@ fn main() {
|
||||||
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
|
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
|
||||||
|
|
||||||
app.connect_activate(create_ui);
|
app.connect_activate(create_ui);
|
||||||
let args = env::args().collect::<Vec<_>>();
|
app.run();
|
||||||
app.run(&args);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,6 @@ use gio::prelude::*;
|
||||||
|
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::env;
|
|
||||||
|
|
||||||
use std::os::raw::c_void;
|
use std::os::raw::c_void;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
@ -269,6 +267,5 @@ fn main() {
|
||||||
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
|
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
|
||||||
|
|
||||||
app.connect_activate(create_ui);
|
app.connect_activate(create_ui);
|
||||||
let args = env::args().collect::<Vec<_>>();
|
app.run();
|
||||||
app.run(&args);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue