mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-04 04:01:03 +02:00
refactor: move most of the horrible add_module
macro content into proper functions
This commit is contained in:
parent
490f3f3f65
commit
2c1b2924d4
15 changed files with 317 additions and 344 deletions
|
@ -17,7 +17,7 @@ use tokio::sync::mpsc::{Receiver, Sender};
|
|||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct TrayModule {
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
pub common: Option<CommonConfig>,
|
||||
}
|
||||
|
||||
/// Gets a GTK `Image` component
|
||||
|
@ -92,6 +92,10 @@ impl Module<MenuBar> for TrayModule {
|
|||
type SendMessage = NotifierItemMessage;
|
||||
type ReceiveMessage = NotifierItemCommand;
|
||||
|
||||
fn name() -> &'static str {
|
||||
"tray"
|
||||
}
|
||||
|
||||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue