Create basic function to disable selecting object
This commit is contained in:
parent
4b96634305
commit
45e0bde981
|
@ -370,6 +370,9 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
let tree_selection = tree_view_duplicate_finder.get_selection();
|
||||
tree_selection.set_select_function(Some(Box::new(select_function)));
|
||||
|
||||
scrolled_window_duplicate_finder.add(&tree_view_duplicate_finder);
|
||||
scrolled_window_duplicate_finder.show_all();
|
||||
|
||||
|
@ -432,7 +435,6 @@ fn main() {
|
|||
for (name, entry) in hashmap {
|
||||
let name: String = name[..(name.len() - 1)].to_string();
|
||||
let index = name.rfind('/').unwrap();
|
||||
println!("{}", name);
|
||||
let values: [&dyn ToValue; 4] = [
|
||||
&(name[index + 1..].to_string()),
|
||||
&(name[..index].to_string()),
|
||||
|
@ -604,3 +606,8 @@ pub fn print_text_messages_to_text_view(text_messages: &Messages, text_view: >
|
|||
|
||||
text_view.get_buffer().unwrap().set_text(messages.as_str());
|
||||
}
|
||||
|
||||
fn select_function(_ts: >k::TreeSelection, _tm: >k::TreeModel, _tp: >k::TreePath, _b: bool) -> bool {
|
||||
// TODO Create proper function to disable selecting header rows
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue