1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 02:31:04 +02:00

feat: introduce logging in some areas

This commit is contained in:
Jake Stanger 2022-08-25 21:53:57 +01:00
parent 6dcae66570
commit 1e38719996
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 15 additions and 0 deletions

View file

@ -5,6 +5,7 @@ use color_eyre::Result;
use gtk::gdk::Monitor;
use gtk::prelude::*;
use gtk::{Application, ApplicationWindow, Orientation};
use tracing::{debug, info};
pub fn create_bar(
app: &Application,
@ -41,10 +42,12 @@ pub fn create_bar(
win.add(&content);
win.connect_destroy_event(|_, _| {
info!("Shutting down");
gtk::main_quit();
Inhibit(false)
});
debug!("Showing bar");
win.show_all();
Ok(())
@ -104,6 +107,7 @@ fn add_modules(content: &gtk::Box, modules: Vec<ModuleConfig>, info: &ModuleInfo
let widget = $module.into_widget(&info)?;
widget.set_widget_name($name);
content.add(&widget);
debug!("Added module of type {}", $name);
}};
}