mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
Dynamically add bluetooth devices
Add scrolling for wifi Improve audio ui a little
This commit is contained in:
parent
13084ed86d
commit
e34e8ce80f
11 changed files with 263 additions and 141 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::cell::RefCell;
|
||||
use gtk::{CompositeTemplate, glib, ListBox, Switch};
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
|
|
@ -15,6 +16,8 @@ pub struct BluetoothBox {
|
|||
pub resetBluetoothAvailableDevices: TemplateChild<ListBox>,
|
||||
#[template_child]
|
||||
pub resetBluetoothConnectedDevices: TemplateChild<ListBox>,
|
||||
pub availableDevices: RefCell<Vec<BluetoothEntry>>,
|
||||
pub connectedDevices: RefCell<Vec<BluetoothEntry>>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
@ -36,6 +39,9 @@ impl ObjectSubclass for BluetoothBox {
|
|||
impl ObjectImpl for BluetoothBox {
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
let obj = self.obj();
|
||||
obj.scanForDevices();
|
||||
obj.addConnectedDevices();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue