mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
Revert "Fix Pango markup not escaped"
This commit is contained in:
parent
0085e51ff6
commit
a9a32817e0
14 changed files with 23 additions and 40 deletions
|
@ -1,6 +1,6 @@
|
|||
use glib::{markup_escape_text, IsA};
|
||||
use glib::IsA;
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Label, Orientation, Widget};
|
||||
use gtk::{Orientation, Widget};
|
||||
|
||||
/// Represents a widget's size
|
||||
/// and location relative to the bar's start edge.
|
||||
|
@ -75,16 +75,3 @@ impl<W: IsA<Widget>> IronbarGtkExt for W {
|
|||
unsafe { self.set_data(key, value) }
|
||||
}
|
||||
}
|
||||
|
||||
pub trait IronbarLabelExt {
|
||||
/// Sets a label's pango markup, escaping it in the process.
|
||||
/// This should be used for any label values
|
||||
/// which could contain special characters, for example `&`.
|
||||
fn set_markup_escaped(&self, text: &str);
|
||||
}
|
||||
|
||||
impl IronbarLabelExt for Label {
|
||||
fn set_markup_escaped(&self, text: &str) {
|
||||
self.set_markup(markup_escape_text(text).as_str())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue