Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 243 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ edition = "2024"

[dependencies]
gtk4 = "0.10.1"
sysinfo = "0.32"
mime_guess = "2.0"
6 changes: 4 additions & 2 deletions src/files_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use std::{
rc::Rc,
};

pub fn build_files_panel(fmstate: Rc<RefCell<FmState>>) -> (ScrolledWindow, StringList, ListView) {
pub fn build_files_panel(
fmstate: Rc<RefCell<FmState>>,
) -> (ScrolledWindow, StringList, ListView, SingleSelection) {
let files_list = StringList::new(&[]);
let files_selection = SingleSelection::new(Some(files_list.clone()));

Expand Down Expand Up @@ -204,7 +206,7 @@ pub fn build_files_panel(fmstate: Rc<RefCell<FmState>>) -> (ScrolledWindow, Stri
let list_view = ListView::new(Some(files_selection.clone()), Some(factory));
let scroll = ScrolledWindow::builder().child(&list_view).vexpand(true).hexpand(true).build();

(scroll, files_list, list_view)
(scroll, files_list, list_view, files_selection)
}

pub fn populate_files_list(files_list: &gtk4::StringList, dir: &gio::File, show_hidden: &bool) {
Expand Down
Loading