Allow input capture & emulation being disabled (#158)

* Input capture and emulation can now be disabled and will prompt the user to enable again.

* Improved error handling to deliver more useful error messages
This commit is contained in:
Ferdinand Schober
2024-07-16 20:34:46 +02:00
committed by GitHub
parent 55bdf1e63e
commit bea7d6f8a5
41 changed files with 2079 additions and 1543 deletions

View File

@@ -8,7 +8,7 @@ use std::{
process, str,
};
use crate::frontend::{gtk::window::Window, FrontendRequest};
use crate::frontend::gtk::window::Window;
use adw::Application;
use endi::{Endian, ReadBytes};
@@ -113,7 +113,6 @@ fn build_ui(app: &Application) {
});
let window = Window::new(app, tx);
window.request(FrontendRequest::Enumerate());
glib::spawn_future_local(clone!(@weak window => async move {
loop {
@@ -150,6 +149,12 @@ fn build_ui(app: &Application) {
}
window.imp().set_port(port);
}
FrontendEvent::CaptureStatus(s) => {
window.set_capture(s.into());
}
FrontendEvent::EmulationStatus(s) => {
window.set_emulation(s.into());
}
}
}
}));