mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-02-16 17:59:46 +03:00
Tracing: added some debug and info messages
This commit is contained in:
parent
a00df927f6
commit
a3c760bbce
3 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,8 @@ fn main() {
|
||||||
// Set UI language
|
// Set UI language
|
||||||
unsafe {
|
unsafe {
|
||||||
i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap();
|
i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap();
|
||||||
|
|
||||||
|
tracing::info!("Set UI language to {}", i18n::LANG);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the app
|
// Run the app
|
||||||
|
|
|
@ -98,6 +98,8 @@ impl SimpleComponent for AboutDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
|
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
|
||||||
|
tracing::debug!("Called about dialog event: {:?}", msg);
|
||||||
|
|
||||||
match msg {
|
match msg {
|
||||||
AppMsg::Show => {
|
AppMsg::Show => {
|
||||||
self.visible = true;
|
self.visible = true;
|
||||||
|
|
|
@ -125,6 +125,8 @@ impl SimpleComponent for App {
|
||||||
root: &Self::Root,
|
root: &Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
|
tracing::info!("Initializing main window");
|
||||||
|
|
||||||
let widgets = view_output!();
|
let widgets = view_output!();
|
||||||
|
|
||||||
if crate::APP_DEBUG {
|
if crate::APP_DEBUG {
|
||||||
|
@ -168,10 +170,14 @@ impl SimpleComponent for App {
|
||||||
READY = true;
|
READY = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!("Main window initialized. App is ready");
|
||||||
|
|
||||||
ComponentParts { model, widgets }
|
ComponentParts { model, widgets }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
|
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
|
||||||
|
tracing::debug!("Called main window event: {:?}", msg);
|
||||||
|
|
||||||
match msg {
|
match msg {
|
||||||
AppMsg::OpenPreferences => {
|
AppMsg::OpenPreferences => {
|
||||||
self.preferences_window.widgets().preferences_window.show();
|
self.preferences_window.widgets().preferences_window.show();
|
||||||
|
|
Loading…
Add table
Reference in a new issue