mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-12 12:57:44 +02:00
chore: Code cleanup
This commit is contained in:
parent
192dacb333
commit
cb3dd257f1
22 changed files with 121 additions and 106 deletions
|
@ -1,6 +1,6 @@
|
|||
#![allow(non_snake_case)]
|
||||
pub mod window;
|
||||
pub mod windowImpl;
|
||||
pub mod handleSidebarClick;
|
||||
pub mod sidebarEntry;
|
||||
pub mod sidebarEntryImpl;
|
||||
pub mod handleSidebarClick;
|
||||
pub mod window;
|
||||
pub mod windowImpl;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||
use glib::Object;
|
||||
use gtk::{FlowBox, glib};
|
||||
use gtk::prelude::*;
|
||||
use crate::components::base::utils::Listeners;
|
||||
use crate::components::window::sidebarEntryImpl;
|
||||
use crate::components::window::sidebarEntryImpl::{Categories, SidebarAction};
|
||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||
use glib::Object;
|
||||
use gtk::prelude::*;
|
||||
use gtk::{glib, FlowBox};
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct SidebarEntry(ObjectSubclass<sidebarEntryImpl::SidebarEntry>)
|
||||
|
|
|
@ -2,8 +2,8 @@ use std::cell::{Cell, RefCell};
|
|||
use std::sync::Arc;
|
||||
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{CompositeTemplate, FlowBox, glib, Image, Label, ListBoxRow};
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, CompositeTemplate, FlowBox, Image, Label, ListBoxRow};
|
||||
|
||||
use crate::components::base::utils::Listeners;
|
||||
use crate::components::window::handleSidebarClick::HANDLE_HOME;
|
||||
|
@ -29,18 +29,18 @@ pub struct SidebarEntry {
|
|||
pub category: Cell<Categories>,
|
||||
pub isSubcategory: Cell<bool>,
|
||||
pub onClickEvent: RefCell<SidebarAction>,
|
||||
pub name : RefCell<String>,
|
||||
pub name: RefCell<String>,
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub struct SidebarAction {
|
||||
pub onClickEvent: fn(Arc<Listeners>,FlowBox),
|
||||
pub onClickEvent: fn(Arc<Listeners>, FlowBox),
|
||||
}
|
||||
|
||||
impl Default for SidebarAction {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
onClickEvent: HANDLE_HOME
|
||||
onClickEvent: HANDLE_HOME,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue