More clippy fixes
This commit is contained in:
parent
85ce87449f
commit
63e3860179
@ -5,7 +5,6 @@ use gtk::prelude::*;
|
|||||||
use gtk::Application;
|
use gtk::Application;
|
||||||
use ui::gtk::GtkLauncherUI;
|
use ui::gtk::GtkLauncherUI;
|
||||||
use waycast_core::WaycastLauncher;
|
use waycast_core::WaycastLauncher;
|
||||||
use waycast_plugins;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let app = Application::builder()
|
let app = Application::builder()
|
||||||
@ -15,16 +14,10 @@ fn main() {
|
|||||||
app.connect_activate(|app| {
|
app.connect_activate(|app| {
|
||||||
let mut file_search_plugin = waycast_plugins::file_search::new();
|
let mut file_search_plugin = waycast_plugins::file_search::new();
|
||||||
|
|
||||||
match file_search_plugin.add_search_path("/home/javi/working-files/DJ Music/") {
|
if let Err(e) = file_search_plugin.add_search_path("/home/javi/working-files/DJ Music/") { eprintln!("{}", e) }
|
||||||
Err(e) => eprintln!("{}", e),
|
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut project_plugin = waycast_plugins::projects::new();
|
let mut project_plugin = waycast_plugins::projects::new();
|
||||||
match project_plugin.add_search_path("/home/javi/projects") {
|
if let Err(e) = project_plugin.add_search_path("/home/javi/projects") { eprintln!("{}", e) }
|
||||||
Err(e) => eprintln!("{}", e),
|
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the core launcher
|
// Create the core launcher
|
||||||
let launcher = WaycastLauncher::new()
|
let launcher = WaycastLauncher::new()
|
||||||
|
@ -142,12 +142,10 @@ impl GtkLauncherUI {
|
|||||||
Image::from_icon_name("application-x-executable")
|
Image::from_icon_name("application-x-executable")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if let Some(default) = find_icon_file("vscode", "48", &icon_theme) {
|
||||||
|
image = gtk::Image::from_file(default);
|
||||||
} else {
|
} else {
|
||||||
if let Some(default) = find_icon_file("vscode", "48", &icon_theme) {
|
image = Image::from_icon_name("application-x-executable");
|
||||||
image = gtk::Image::from_file(default);
|
|
||||||
} else {
|
|
||||||
image = Image::from_icon_name("application-x-executable");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
image.set_pixel_size(icon_size);
|
image.set_pixel_size(icon_size);
|
||||||
image.set_widget_name("item-icon");
|
image.set_widget_name("item-icon");
|
||||||
@ -428,7 +426,7 @@ fn find_icon_file(
|
|||||||
for cat in &categories {
|
for cat in &categories {
|
||||||
let path = base
|
let path = base
|
||||||
.join(icon_theme.theme_name())
|
.join(icon_theme.theme_name())
|
||||||
.join(if !(size == "scalable".to_string()) {
|
.join(if (size != "scalable") {
|
||||||
format!("{}x{}", size, size)
|
format!("{}x{}", size, size)
|
||||||
} else {
|
} else {
|
||||||
size.to_string()
|
size.to_string()
|
||||||
@ -446,7 +444,7 @@ fn find_icon_file(
|
|||||||
for cat in &categories {
|
for cat in &categories {
|
||||||
let path = base
|
let path = base
|
||||||
.join("hicolor")
|
.join("hicolor")
|
||||||
.join(if !(size == "scalable".to_string()) {
|
.join(if (size != "scalable") {
|
||||||
format!("{}x{}", size, size)
|
format!("{}x{}", size, size)
|
||||||
} else {
|
} else {
|
||||||
size.to_string()
|
size.to_string()
|
||||||
|
@ -22,5 +22,5 @@ pub fn get_files_with_extension<P: AsRef<Path>>(
|
|||||||
files.push(f);
|
files.push(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(files);
|
Ok(files)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user