mirror of
https://github.com/13hannes11/toolbx-tuner.git
synced 2024-09-03 23:21:00 +02:00
add detection of installed tools in host environment
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
use crate::gtk::Align;
|
||||
use crate::util::prerequisit::get_installed_terminals;
|
||||
use crate::util::prerequisit::is_toolbox_installed;
|
||||
|
||||
use crate::util::toolbox::ToolbxContainer;
|
||||
use relm4::adw::prelude::PreferencesGroupExt;
|
||||
use relm4::factory::FactoryHashMap;
|
||||
@@ -181,8 +184,9 @@ impl Component for App {
|
||||
};
|
||||
|
||||
sender.spawn_oneshot_command(|| {
|
||||
// TODO: actually check for compatibility
|
||||
AppCommandMsg::PrerequisitsInstalled(true)
|
||||
let terminals = get_installed_terminals().unwrap_or_default();
|
||||
let toolbox_installed = is_toolbox_installed().unwrap_or(false);
|
||||
AppCommandMsg::PrerequisitsInstalled(terminals.len() > 0 && toolbox_installed)
|
||||
});
|
||||
|
||||
actions.add_action(shortcuts_action);
|
||||
|
||||
Reference in New Issue
Block a user