parent
72d74dd8e2
commit
8d4a264c6d
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
|
@ -202,7 +202,7 @@ jobs:
|
|||
|
||||
- name: Download appimage dependiences
|
||||
run: |
|
||||
wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/c008df652946408f357f502bab67bfcf6f303b4e/linuxdeploy-plugin-gtk.sh"
|
||||
wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
|
||||
wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
||||
chmod +x linuxdeploy-plugin-gtk.sh
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
|
|
|
@ -33,7 +33,7 @@ impl ExcludedItems {
|
|||
}
|
||||
if expression == "DEFAULT" {
|
||||
if cfg!(target_family = "unix") {
|
||||
checked_expressions.push("*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*".to_string());
|
||||
checked_expressions.push("*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*".to_string());
|
||||
}
|
||||
if cfg!(target_family = "windows") {
|
||||
checked_expressions.push("*/.git/*,*/node_modules/*,*/lost+found/*,*:/windows/*".to_string());
|
||||
|
|
|
@ -106,8 +106,15 @@ pub fn common_open_function(tree_view: >k::TreeView, column_name: i32, column_
|
|||
}
|
||||
}
|
||||
|
||||
if open::that(&end_path).is_err() {
|
||||
println!("Failed to open {}", end_path);
|
||||
match open::that(&end_path) {
|
||||
Ok(t) => {
|
||||
if !t.success() {
|
||||
println!("Failed to open {}, status {:?}", end_path, t.code());
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
println!("Failed to open {}", end_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,18 +258,25 @@ pub fn initialize_gui(gui_data: &GuiData) {
|
|||
break 'dir;
|
||||
}
|
||||
};
|
||||
if img.width() == 0 || img.height() == 0 {
|
||||
add_text_to_text_view(&text_view_errors, format!("Cannot create preview of image {}, with 0 width or height", file_name).as_str());
|
||||
break 'dir;
|
||||
}
|
||||
let ratio = img.width() / img.height();
|
||||
let requested_dimensions = (400, 400);
|
||||
let new_size;
|
||||
let mut new_size;
|
||||
match ratio.cmp(&(requested_dimensions.0 / requested_dimensions.1)) {
|
||||
Ordering::Greater => {
|
||||
new_size = (requested_dimensions.0, (img.height() * requested_dimensions.0) / img.width());
|
||||
new_size = (std::cmp::max(new_size.0, 1), std::cmp::max(new_size.1, 1));
|
||||
}
|
||||
Ordering::Less => {
|
||||
new_size = ((img.width() * requested_dimensions.1) / img.height(), requested_dimensions.1);
|
||||
new_size = (std::cmp::max(new_size.0, 1), std::cmp::max(new_size.1, 1));
|
||||
}
|
||||
Ordering::Equal => {
|
||||
new_size = requested_dimensions;
|
||||
new_size = (std::cmp::max(new_size.0, 1), std::cmp::max(new_size.1, 1));
|
||||
}
|
||||
}
|
||||
let img = img.resize(new_size.0, new_size.1, FilterType::Triangle);
|
||||
|
|
|
@ -426,7 +426,7 @@ pub fn reset_configuration(gui_data: &GuiData, manual_clearing: bool) {
|
|||
{
|
||||
let entry_excluded_items = gui_data.entry_excluded_items.clone();
|
||||
if cfg!(target_family = "unix") {
|
||||
entry_excluded_items.set_text("*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*");
|
||||
entry_excluded_items.set_text("*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*");
|
||||
}
|
||||
if cfg!(target_family = "windows") {
|
||||
entry_excluded_items.set_text("*/.git/*,*/node_modules/*,*/lost+found/*,*:/windows/*");
|
||||
|
|
Loading…
Reference in a new issue