mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 22:31:03 +02:00
refactor: address requested changes (3)
This commit is contained in:
parent
d5e4e08863
commit
2fd49e0f3a
4 changed files with 5 additions and 5 deletions
|
@ -9,6 +9,7 @@ use gtk::prelude::*;
|
||||||
use gtk::{Application, ApplicationWindow, IconTheme, Orientation, Window, WindowType};
|
use gtk::{Application, ApplicationWindow, IconTheme, Orientation, Window, WindowType};
|
||||||
use gtk_layer_shell::LayerShell;
|
use gtk_layer_shell::LayerShell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tracing::{debug, info};
|
use tracing::{debug, info};
|
||||||
|
|
||||||
|
@ -268,7 +269,7 @@ impl Bar {
|
||||||
output_name: &self.monitor_name,
|
output_name: &self.monitor_name,
|
||||||
location: $location,
|
location: $location,
|
||||||
icon_theme: &icon_theme,
|
icon_theme: &icon_theme,
|
||||||
icon_overrides: &self.ironbar.config.borrow().icon_overrides,
|
icon_overrides: Arc::new(self.ironbar.config.borrow().icon_overrides.clone()),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ use color_eyre::Result;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::Label;
|
use gtk::Label;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::sync::Arc;
|
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
|
||||||
|
@ -151,7 +150,7 @@ impl Module<gtk::Box> for FocusedModule {
|
||||||
container.add(&label);
|
container.add(&label);
|
||||||
|
|
||||||
{
|
{
|
||||||
let icon_overrides = Arc::new(info.icon_overrides.clone());
|
let icon_overrides = info.icon_overrides.clone();
|
||||||
let icon_theme = info.icon_theme.clone();
|
let icon_theme = info.icon_theme.clone();
|
||||||
|
|
||||||
glib_recv!(context.subscribe(), data => {
|
glib_recv!(context.subscribe(), data => {
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl Module<gtk::Box> for LauncherModule {
|
||||||
let items = arc_mut!(items);
|
let items = arc_mut!(items);
|
||||||
let items2 = Arc::clone(&items);
|
let items2 = Arc::clone(&items);
|
||||||
|
|
||||||
let icon_overrides = Arc::new(info.icon_overrides.clone());
|
let icon_overrides = info.icon_overrides.clone();
|
||||||
|
|
||||||
let tx = context.tx.clone();
|
let tx = context.tx.clone();
|
||||||
let tx2 = context.tx.clone();
|
let tx2 = context.tx.clone();
|
||||||
|
|
|
@ -72,7 +72,7 @@ pub struct ModuleInfo<'a> {
|
||||||
pub monitor: &'a Monitor,
|
pub monitor: &'a Monitor,
|
||||||
pub output_name: &'a str,
|
pub output_name: &'a str,
|
||||||
pub icon_theme: &'a IconTheme,
|
pub icon_theme: &'a IconTheme,
|
||||||
pub icon_overrides: &'a HashMap<String, String>,
|
pub icon_overrides: Arc<HashMap<String, String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue