Añade soporte para inyectar acciones en código

This commit is contained in:
Manuel Cillero 2025-07-21 08:58:09 +02:00
parent 86e4c4f110
commit 613ab5243c
10 changed files with 316 additions and 4 deletions

View file

@ -1,3 +1,4 @@
use crate::core::action::add_action;
use crate::core::extension::ExtensionRef;
use crate::core::theme::all::THEMES;
use crate::{service, trace};
@ -105,6 +106,16 @@ fn add_to_dropped(list: &mut Vec<ExtensionRef>, extension: ExtensionRef) {
}
}
// REGISTRO DE LAS ACCIONES ************************************************************************
pub fn register_actions() {
for extension in ENABLED_EXTENSIONS.read().unwrap().iter() {
for a in extension.actions().into_iter() {
add_action(a);
}
}
}
// INICIALIZA LAS EXTENSIONES **********************************************************************
pub fn initialize_extensions() {