mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-08 14:42:02 +02:00
chore: Format project
This commit is contained in:
parent
3d2f38ee46
commit
d72f916e8a
|
@ -9,9 +9,9 @@ use adw::glib::Object;
|
|||
use adw::prelude::{ButtonExt, ComboRowExt, PreferencesRowExt, RangeExt};
|
||||
use dbus::blocking::Connection;
|
||||
use dbus::Error;
|
||||
use glib::prelude::Cast;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use glib::{clone, Propagation};
|
||||
use glib::prelude::Cast;
|
||||
use gtk::{gio, StringObject};
|
||||
use re_set_lib::audio::audio_structures::OutputStream;
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ use std::{
|
|||
};
|
||||
|
||||
use adw::prelude::{ComboRowExt, PreferencesRowExt};
|
||||
use glib::{subclass::types::ObjectSubclassIsExt, ControlFlow, Propagation};
|
||||
use glib::prelude::Cast;
|
||||
use glib::{subclass::types::ObjectSubclassIsExt, ControlFlow, Propagation};
|
||||
use gtk::{
|
||||
gio,
|
||||
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
||||
|
|
|
@ -9,9 +9,9 @@ use adw::glib::Object;
|
|||
use adw::prelude::{ButtonExt, ComboRowExt, PreferencesRowExt, RangeExt};
|
||||
use dbus::blocking::Connection;
|
||||
use dbus::Error;
|
||||
use glib::prelude::Cast;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use glib::{clone, Propagation};
|
||||
use glib::prelude::Cast;
|
||||
use gtk::{gio, StringObject};
|
||||
use re_set_lib::audio::audio_structures::InputStream;
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ use adw::{
|
|||
prelude::{ComboRowExt, PreferencesRowExt},
|
||||
ComboRow,
|
||||
};
|
||||
use glib::{subclass::types::ObjectSubclassIsExt, Propagation};
|
||||
use glib::prelude::Cast;
|
||||
use glib::{subclass::types::ObjectSubclassIsExt, Propagation};
|
||||
use gtk::{
|
||||
gio,
|
||||
prelude::{BoxExt, ButtonExt, CheckButtonExt, ListBoxRowExt, RangeExt},
|
||||
|
|
|
@ -4,9 +4,9 @@ use adw::glib::Object;
|
|||
use adw::prelude::{ComboRowExt, PreferencesRowExt};
|
||||
use dbus::blocking::Connection;
|
||||
use dbus::Error;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use glib::{clone};
|
||||
use glib::clone;
|
||||
use glib::prelude::Cast;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use gtk::{gio, StringList, StringObject};
|
||||
|
||||
use components::utils::create_dropdown_label_factory;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::components::base::list_entry_impl;
|
||||
use adw::glib::{Object};
|
||||
use adw::glib::Object;
|
||||
use glib::prelude::IsA;
|
||||
use gtk::prelude::ListBoxRowExt;
|
||||
use gtk::Widget;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::components::base::setting_box_impl;
|
||||
use adw::glib::{Object};
|
||||
use adw::glib::Object;
|
||||
use glib::prelude::IsA;
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::Widget;
|
||||
|
|
|
@ -8,9 +8,9 @@ use adw::subclass::prelude::ObjectSubclassIsExt;
|
|||
use dbus::blocking::Connection;
|
||||
use dbus::message::SignalArgs;
|
||||
use dbus::{Error, Path};
|
||||
use glib::{clone, ControlFlow};
|
||||
use glib::prelude::Cast;
|
||||
use glib::property::PropertySet;
|
||||
use glib::{clone, ControlFlow};
|
||||
use gtk::glib::Variant;
|
||||
use gtk::prelude::{ActionableExt, ButtonExt, ListBoxRowExt, WidgetExt};
|
||||
use gtk::{gio, StringObject};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pub mod audio;
|
||||
pub mod base;
|
||||
pub mod bluetooth;
|
||||
mod plugin;
|
||||
pub mod utils;
|
||||
pub mod wifi;
|
||||
pub mod window;
|
||||
mod plugin;
|
||||
|
|
|
@ -50,7 +50,7 @@ impl TSideBarInfo for ReSetSidebarInfo {
|
|||
}
|
||||
|
||||
fn plugin_click_event(&self) -> PluginClickEvent {
|
||||
Rc::new(|_,_,_| {})
|
||||
Rc::new(|_, _, _| {})
|
||||
}
|
||||
|
||||
fn plugin_boxes(&self) -> Option<Vec<gtk::Box>> {
|
||||
|
@ -67,7 +67,6 @@ pub struct PluginSidebarInfo {
|
|||
pub plugin_boxes: Vec<gtk::Box>,
|
||||
}
|
||||
|
||||
|
||||
impl TSideBarInfo for PluginSidebarInfo {
|
||||
fn name(&self) -> &'static str {
|
||||
self.name
|
||||
|
@ -93,4 +92,3 @@ impl TSideBarInfo for PluginSidebarInfo {
|
|||
Some(self.plugin_boxes.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
pub mod function;
|
||||
pub mod function;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use adw::gdk::pango::EllipsizeMode;
|
||||
use adw::prelude::ListModelExtManual;
|
||||
use adw::{ActionRow, ComboRow};
|
||||
use glib::{Object};
|
||||
use glib::prelude::Cast;
|
||||
use glib::Object;
|
||||
use gtk::prelude::{GObjectPropertyExpressionExt, ListBoxRowExt, ListItemExt, WidgetExt};
|
||||
use gtk::{Align, SignalListItemFactory, StringObject};
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ use adw::glib::Object;
|
|||
use adw::prelude::{ActionRowExt, ButtonExt, PreferencesGroupExt, PreferencesRowExt};
|
||||
use dbus::blocking::Connection;
|
||||
use dbus::{Error, Path};
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use glib::{clone};
|
||||
use glib::clone;
|
||||
use glib::property::PropertySet;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use gtk::prelude::{BoxExt, ListBoxRowExt};
|
||||
use gtk::{gio, Align, Button, Orientation};
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ use dbus::blocking::Connection;
|
|||
use dbus::message::SignalArgs;
|
||||
use dbus::Error;
|
||||
use dbus::Path;
|
||||
use glib::{clone, ControlFlow};
|
||||
use glib::prelude::Cast;
|
||||
use glib::property::PropertySet;
|
||||
use glib::{clone, ControlFlow};
|
||||
use gtk::glib::Variant;
|
||||
use gtk::prelude::ActionableExt;
|
||||
use gtk::{gio, StringList, StringObject};
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::time::Duration;
|
|||
|
||||
use crate::components::utils::{BASE, DBUS_PATH, WIRELESS};
|
||||
use crate::components::wifi::utils::get_connection_settings;
|
||||
use adw::glib::{Object};
|
||||
use adw::glib::Object;
|
||||
use adw::prelude::{ActionRowExt, ButtonExt, EditableExt, PopoverExt, PreferencesRowExt};
|
||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||
use dbus::blocking::Connection;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use adw::prelude::{ComboRowExt, PreferencesGroupExt, PreferencesRowExt};
|
||||
use glib::{subclass::types::ObjectSubclassIsExt};
|
||||
use glib::property::PropertySet;
|
||||
use glib::subclass::types::ObjectSubclassIsExt;
|
||||
use gtk::prelude::WidgetExt;
|
||||
use re_set_lib::{
|
||||
network::network_structures::WifiStrength,
|
||||
|
|
|
@ -10,7 +10,7 @@ use adw::prelude::{ActionRowExt, ComboRowExt, PreferencesGroupExt};
|
|||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||
use dbus::arg::PropMap;
|
||||
use dbus::{Error, Path};
|
||||
use glib::{clone};
|
||||
use glib::clone;
|
||||
use glib::property::PropertySet;
|
||||
use gtk::prelude::{ActionableExt, ButtonExt, EditableExt, ListBoxRowExt, WidgetExt};
|
||||
use re_set_lib::network::connection::{
|
||||
|
|
|
@ -2,13 +2,16 @@ use std::cell::RefCell;
|
|||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use adw::BreakpointCondition;
|
||||
use adw::glib::clone;
|
||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||
use adw::BreakpointCondition;
|
||||
use glib::Object;
|
||||
use gtk::{AccessibleRole, Align, Application, FlowBox, FlowBoxChild, Frame, gio, ListBoxRow, Orientation, StateFlags};
|
||||
use gtk::{DirectionType, prelude::*};
|
||||
use gtk::gio::ActionEntry;
|
||||
use gtk::{
|
||||
gio, AccessibleRole, Align, Application, FlowBox, FlowBoxChild, Frame, ListBoxRow, Orientation,
|
||||
StateFlags,
|
||||
};
|
||||
use gtk::{prelude::*, DirectionType};
|
||||
use re_set_lib::utils::plugin_setup::FRONTEND_PLUGINS;
|
||||
|
||||
use crate::components::base::setting_box::SettingBox;
|
||||
|
@ -157,17 +160,24 @@ impl ReSetWindow {
|
|||
(plugin.frontend_startup)();
|
||||
|
||||
let event = Rc::new(
|
||||
move |reset_main: FlowBox, position: Rc<RefCell<Position>>, boxes: Vec<gtk::Box>| {
|
||||
if handle_init(listeners.clone(), position, Position::Custom(String::from(sidebar_info.name))) {
|
||||
move |reset_main: FlowBox,
|
||||
position: Rc<RefCell<Position>>,
|
||||
boxes: Vec<gtk::Box>| {
|
||||
if handle_init(
|
||||
listeners.clone(),
|
||||
position,
|
||||
Position::Custom(String::from(sidebar_info.name)),
|
||||
) {
|
||||
return;
|
||||
}
|
||||
reset_main.remove_all();
|
||||
for plugin_box in &boxes {
|
||||
let frame = wrap_in_flow_box_child(SettingBox::new(&plugin_box.clone()));
|
||||
let frame =
|
||||
wrap_in_flow_box_child(SettingBox::new(&plugin_box.clone()));
|
||||
reset_main.insert(&frame, -1);
|
||||
}
|
||||
reset_main.set_max_children_per_line(boxes.len() as u32);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
plugin_sidebar_list.push(PluginSidebarInfo {
|
||||
|
|
|
@ -3,8 +3,8 @@ use std::rc::Rc;
|
|||
use std::sync::Arc;
|
||||
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{CompositeTemplate, FlowBox, Image, Label, ListBoxRow};
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{CompositeTemplate, FlowBox, Image, Label, ListBoxRow};
|
||||
|
||||
use crate::components::base::utils::{Listeners, Position};
|
||||
use crate::components::window::handle_sidebar_click::HANDLE_HOME;
|
||||
|
@ -41,7 +41,7 @@ impl Default for SidebarAction {
|
|||
fn default() -> Self {
|
||||
Self {
|
||||
on_click_event: Some(HANDLE_HOME),
|
||||
on_plugin_click_event: Rc::new(|_,_,_|{}),
|
||||
on_plugin_click_event: Rc::new(|_, _, _| {}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue