mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
refactor: move dynamic_label.rs to dynamic_string.rs and fix failing test
This commit is contained in:
parent
d20972cb32
commit
64f54040ef
5 changed files with 4 additions and 7 deletions
|
@ -7,7 +7,7 @@ use crate::modules::workspaces::WorkspaceUpdate;
|
|||
use crate::modules::{Module, ModuleInfoBuilder, ModuleLocation, ModuleUpdateEvent, WidgetContext};
|
||||
use crate::popup::Popup;
|
||||
use crate::script::{OutputStream, Script};
|
||||
use crate::widgets::DynamicString;
|
||||
use crate::dynamic_string::DynamicString;
|
||||
use crate::{await_sync, Config};
|
||||
use chrono::{DateTime, Local};
|
||||
use color_eyre::Result;
|
||||
|
|
|
@ -134,7 +134,7 @@ mod tests {
|
|||
DynamicString::new(
|
||||
"Uptime: {{1000:uptime -p | cut -d ' ' -f2-}}",
|
||||
move |string| {
|
||||
label.set_label(string);
|
||||
label.set_label(&string);
|
||||
Continue(true)
|
||||
},
|
||||
);
|
|
@ -8,7 +8,7 @@ mod modules;
|
|||
mod popup;
|
||||
mod script;
|
||||
mod style;
|
||||
mod widgets;
|
||||
mod dynamic_string;
|
||||
|
||||
use crate::bar::create_bar;
|
||||
use crate::config::{Config, MonitorConfig};
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::config::CommonConfig;
|
|||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::popup::{ButtonGeometry, Popup};
|
||||
use crate::script::Script;
|
||||
use crate::widgets::DynamicString;
|
||||
use crate::dynamic_string::DynamicString;
|
||||
use color_eyre::{Report, Result};
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Button, Label, Orientation};
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
mod dynamic_label;
|
||||
|
||||
pub use dynamic_label::DynamicString;
|
Loading…
Add table
Reference in a new issue