diff --git a/flatpak/cargo-sources.json b/flatpak/cargo-sources.json index 2764156..8b20ba1 100644 --- a/flatpak/cargo-sources.json +++ b/flatpak/cargo-sources.json @@ -12,6 +12,19 @@ "dest": "cargo/vendor/ReSet-Lib-0.2.8", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/ReSet-Lib/ReSet-Lib-0.3.5.crate", + "sha256": "a0f2428f460a6604b353461d8244b3ce8841adcd964a2165cd2f9b975462b19d", + "dest": "cargo/vendor/ReSet-Lib-0.3.5" + }, + { + "type": "inline", + "contents": "{\"package\": \"a0f2428f460a6604b353461d8244b3ce8841adcd964a2165cd2f9b975462b19d\", \"files\": {}}", + "dest": "cargo/vendor/ReSet-Lib-0.3.5", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", diff --git a/src/components/base/cardEntryImpl.rs b/src/components/base/cardEntryImpl.rs index 673d20a..476d088 100644 --- a/src/components/base/cardEntryImpl.rs +++ b/src/components/base/cardEntryImpl.rs @@ -1,9 +1,8 @@ use std::cell::RefCell; use std::collections::HashMap; -use crate::components::base::listEntry::ListEntry; use gtk::subclass::prelude::*; -use gtk::{glib, CompositeTemplate, TemplateChild, Label, DropDown, StringList}; +use gtk::{glib, CompositeTemplate, DropDown, Label, StringList, TemplateChild}; use super::cardEntry; @@ -19,7 +18,7 @@ pub struct CardEntry { pub resetCardList: TemplateChild, // first string is the alias name, the first return string is the index of the adapter and the // second the name of the profile - pub resetCardMap: RefCell> + pub resetCardMap: RefCell>, } #[glib::object_subclass] diff --git a/src/components/base/listEntryImpl.rs b/src/components/base/listEntryImpl.rs index 8681143..0cb1c74 100644 --- a/src/components/base/listEntryImpl.rs +++ b/src/components/base/listEntryImpl.rs @@ -1,8 +1,6 @@ -use std::collections::HashMap; - use crate::components::base::listEntry; use gtk::subclass::prelude::*; -use gtk::{glib, CompositeTemplate, DropDown, Label, StringList}; +use gtk::{glib, CompositeTemplate}; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] diff --git a/src/components/base/mod.rs b/src/components/base/mod.rs index c2458df..65350fb 100644 --- a/src/components/base/mod.rs +++ b/src/components/base/mod.rs @@ -1,9 +1,9 @@ -pub mod settingBox; -pub mod settingBoxImpl; +pub mod cardEntry; +pub mod cardEntryImpl; pub mod listEntry; pub mod listEntryImpl; pub mod popup; pub mod popupImpl; +pub mod settingBox; +pub mod settingBoxImpl; pub mod utils; -pub mod cardEntry; -pub mod cardEntryImpl; diff --git a/src/components/base/settingBox.rs b/src/components/base/settingBox.rs index 30b309c..7ef8e63 100644 --- a/src/components/base/settingBox.rs +++ b/src/components/base/settingBox.rs @@ -16,4 +16,5 @@ impl SettingBox { entry.append(child); entry } -} \ No newline at end of file +} + diff --git a/src/components/bluetooth/bluetoothBox.rs b/src/components/bluetooth/bluetoothBox.rs index c389dc2..a39b044 100644 --- a/src/components/bluetooth/bluetoothBox.rs +++ b/src/components/bluetooth/bluetoothBox.rs @@ -18,7 +18,7 @@ use crate::components::base::listEntry::ListEntry; use crate::components::base::utils::Listeners; use crate::components::bluetooth::bluetoothBoxImpl; use crate::components::bluetooth::bluetoothEntry::BluetoothEntry; -use crate::components::bluetooth::bluetoothEntryImpl::DeviceTypes; +// use crate::components::bluetooth::bluetoothEntryImpl::DeviceTypes; glib::wrapper! { pub struct BluetoothBox(ObjectSubclass) @@ -170,7 +170,7 @@ pub fn start_bluetooth_listener(listeners: Arc, bluetooth_box: Arc Duration::from_millis(5000) + // || time.elapsed().unwrap() > Duration::from_millis(5000) { glib::spawn_future(async move { glib::idle_add_once(move || { diff --git a/src/components/bluetooth/bluetoothEntry.rs b/src/components/bluetooth/bluetoothEntry.rs index 744f406..f917555 100644 --- a/src/components/bluetooth/bluetoothEntry.rs +++ b/src/components/bluetooth/bluetoothEntry.rs @@ -1,7 +1,7 @@ use std::time::Duration; use crate::components::bluetooth::bluetoothEntryImpl; -use crate::components::bluetooth::bluetoothEntryImpl::DeviceTypes; +// use crate::components::bluetooth::bluetoothEntryImpl::DeviceTypes; use adw::glib; use adw::glib::Object; use adw::subclass::prelude::ObjectSubclassIsExt; @@ -23,7 +23,10 @@ impl BluetoothEntry { let entry: BluetoothEntry = Object::builder().build(); let entryImp = entry.imp(); entryImp.resetBluetoothLabel.get().set_text(&device.name); - entryImp.resetBluetoothAddress.get().set_text(&device.address); + entryImp + .resetBluetoothAddress + .get() + .set_text(&device.address); // entryImp // .resetBluetoothDeviceType // .get() diff --git a/src/components/bluetooth/bluetoothEntryImpl.rs b/src/components/bluetooth/bluetoothEntryImpl.rs index ab70163..7dfe7bc 100644 --- a/src/components/bluetooth/bluetoothEntryImpl.rs +++ b/src/components/bluetooth/bluetoothEntryImpl.rs @@ -1,8 +1,8 @@ +use crate::components::bluetooth::bluetoothEntry; +use gtk::subclass::prelude::*; +use gtk::{glib, Button, CompositeTemplate, Image, Label}; use std::cell::RefCell; use ReSet_Lib::bluetooth::bluetooth::BluetoothDevice; -use gtk::{Button, CompositeTemplate, glib, Image, Label}; -use gtk::subclass::prelude::*; -use crate::components::bluetooth::bluetoothEntry; #[derive(Default, Copy, Clone)] pub enum DeviceTypes { @@ -26,7 +26,7 @@ pub struct BluetoothEntry { #[template_child] pub resetBluetoothButton: TemplateChild