mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 11:36:11 +08:00
Merge Controller and View structs into one Application struct.
The `View` sturct was mostly a layer of indirection, and the controller benefitted by absorbing the gtk::Application subclass parts, so now those two are merged into a new gtk::Application subclass.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
mod controller;
|
||||
mod application;
|
||||
mod pipewire_connection;
|
||||
mod view;
|
||||
|
||||
use controller::MediaType;
|
||||
use application::MediaType;
|
||||
use gtk::{
|
||||
glib::{self, PRIORITY_DEFAULT},
|
||||
prelude::*,
|
||||
@@ -56,10 +56,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let pw_thread =
|
||||
std::thread::spawn(move || pipewire_connection::thread_main(gtk_sender, pw_receiver));
|
||||
|
||||
let view = view::View::new();
|
||||
let _controller = controller::Controller::new(view.clone(), gtk_receiver);
|
||||
let app = application::Application::new(gtk_receiver);
|
||||
|
||||
view.run(&std::env::args().collect::<Vec<_>>());
|
||||
app.run(&std::env::args().collect::<Vec<_>>());
|
||||
|
||||
pw_sender
|
||||
.send(GtkMessage::Terminate)
|
||||
|
||||
Reference in New Issue
Block a user