mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-19 11:08:32 +02:00
lowercase for takotori
This commit is contained in:
parent
4f425c6428
commit
f0214edd02
|
@ -1,11 +1,11 @@
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
|
use adw::BreakpointCondition;
|
||||||
use adw::glib::clone;
|
use adw::glib::clone;
|
||||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||||
use adw::BreakpointCondition;
|
|
||||||
use glib::Object;
|
use glib::Object;
|
||||||
|
use gtk::{Application, FlowBox, gio, glib};
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::{gio, glib, Application, FlowBox};
|
|
||||||
|
|
||||||
use crate::components::window::handleSidebarClick::{
|
use crate::components::window::handleSidebarClick::{
|
||||||
HANDLE_AUDIO_CLICK, HANDLE_BLUETOOTH_CLICK, HANDLE_CONNECTIVITY_CLICK, HANDLE_MICROPHONE_CLICK,
|
HANDLE_AUDIO_CLICK, HANDLE_BLUETOOTH_CLICK, HANDLE_CONNECTIVITY_CLICK, HANDLE_MICROPHONE_CLICK,
|
||||||
|
@ -39,15 +39,11 @@ impl Window {
|
||||||
fn setupCallback(&self) {
|
fn setupCallback(&self) {
|
||||||
let selfImp = self.imp();
|
let selfImp = self.imp();
|
||||||
|
|
||||||
selfImp
|
selfImp.resetSearchEntry.connect_search_changed(clone!(@ weak self as window => move |_| {
|
||||||
.resetSearchEntry
|
|
||||||
.connect_search_changed(clone!(@ weak self as window => move |_| {
|
|
||||||
window.filterList();
|
window.filterList();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
selfImp
|
selfImp.resetSideBarToggle.connect_clicked(clone!(@ weak self as window => move |_| {
|
||||||
.resetSideBarToggle
|
|
||||||
.connect_clicked(clone!(@ weak self as window => move |_| {
|
|
||||||
window.toggleSidebar();
|
window.toggleSidebar();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -59,9 +55,7 @@ impl Window {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
selfImp
|
selfImp.resetClose.connect_clicked(clone!(@ weak self as window => move |_| {
|
||||||
.resetClose
|
|
||||||
.connect_clicked(clone!(@ weak self as window => move |_| {
|
|
||||||
window.close();
|
window.close();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -73,9 +67,7 @@ impl Window {
|
||||||
|
|
||||||
fn handleDynamicSidebar(&self) {
|
fn handleDynamicSidebar(&self) {
|
||||||
let selfImp = self.imp();
|
let selfImp = self.imp();
|
||||||
selfImp
|
selfImp.resetSidebarBreakpoint.set_condition(BreakpointCondition::parse("max-width: 500sp").as_ref().ok());
|
||||||
.resetSidebarBreakpoint
|
|
||||||
.set_condition(BreakpointCondition::parse("max-width: 500sp").as_ref().ok());
|
|
||||||
selfImp.resetSidebarBreakpoint.add_setter(
|
selfImp.resetSidebarBreakpoint.add_setter(
|
||||||
&Object::from(selfImp.resetOverlaySplitView.get()),
|
&Object::from(selfImp.resetOverlaySplitView.get()),
|
||||||
"collapsed",
|
"collapsed",
|
||||||
|
@ -98,25 +90,13 @@ impl Window {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if mainEntry
|
if mainEntry.imp().name.borrow().to_lowercase().contains(&text.to_lowercase()) {
|
||||||
.imp()
|
|
||||||
.name
|
|
||||||
.borrow()
|
|
||||||
.to_lowercase()
|
|
||||||
.contains(&text.to_lowercase())
|
|
||||||
{
|
|
||||||
mainEntry.set_visible(true);
|
mainEntry.set_visible(true);
|
||||||
} else {
|
} else {
|
||||||
mainEntry.set_visible(false);
|
mainEntry.set_visible(false);
|
||||||
}
|
}
|
||||||
for subEntry in subEntries {
|
for subEntry in subEntries {
|
||||||
if subEntry
|
if subEntry.imp().name.borrow().to_lowercase().contains(&text.to_lowercase()) {
|
||||||
.imp()
|
|
||||||
.name
|
|
||||||
.borrow()
|
|
||||||
.to_lowercase()
|
|
||||||
.contains(&text.to_lowercase())
|
|
||||||
{
|
|
||||||
subEntry.set_visible(true);
|
subEntry.set_visible(true);
|
||||||
mainEntry.set_visible(true);
|
mainEntry.set_visible(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -211,9 +191,7 @@ impl Window {
|
||||||
|
|
||||||
fn setupPopoverButtons(&self) {
|
fn setupPopoverButtons(&self) {
|
||||||
let selfImp = self.imp();
|
let selfImp = self.imp();
|
||||||
selfImp
|
selfImp.resetAboutButton.connect_clicked(clone!(@ weak self as window => move |_| {
|
||||||
.resetAboutButton
|
|
||||||
.connect_clicked(clone!(@ weak self as window => move |_| {
|
|
||||||
let dialog = adw::AboutWindow::builder()
|
let dialog = adw::AboutWindow::builder()
|
||||||
.application_name("ReSet")
|
.application_name("ReSet")
|
||||||
// .application_icon("")
|
// .application_icon("")
|
||||||
|
@ -225,8 +203,8 @@ impl Window {
|
||||||
.transient_for(&window)
|
.transient_for(&window)
|
||||||
.modal(true)
|
.modal(true)
|
||||||
.copyright("© 2022-2023 Xetibo")
|
.copyright("© 2022-2023 Xetibo")
|
||||||
.developers(vec!["DashieTM".to_string(), "Takatori".to_string()])
|
.developers(vec!["DashieTM".to_string(), "takatori".to_string()])
|
||||||
.designers(vec!["DashieTM".to_string(), "Takatori".to_string()])
|
.designers(vec!["DashieTM".to_string(), "takatori".to_string()])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
dialog.present();
|
dialog.present();
|
||||||
|
@ -245,9 +223,7 @@ impl SidebarEntry {
|
||||||
let entry: SidebarEntry = Object::builder().build();
|
let entry: SidebarEntry = Object::builder().build();
|
||||||
let entryImp = entry.imp();
|
let entryImp = entry.imp();
|
||||||
entryImp.resetSidebarLabel.get().set_text(entryName);
|
entryImp.resetSidebarLabel.get().set_text(entryName);
|
||||||
entryImp
|
entryImp.resetSidebarImage.set_from_icon_name(Some(iconName));
|
||||||
.resetSidebarImage
|
|
||||||
.set_from_icon_name(Some(iconName));
|
|
||||||
entryImp.category.set(category);
|
entryImp.category.set(category);
|
||||||
entryImp.isSubcategory.set(isSubcategory);
|
entryImp.isSubcategory.set(isSubcategory);
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue