mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Allow removing tags via the button
This commit is contained in:
parent
af57fe020c
commit
a790d913af
3 changed files with 50 additions and 5 deletions
|
|
@ -65,6 +65,14 @@ impl MusicusSearchTag {
|
|||
obj
|
||||
}
|
||||
|
||||
pub fn connect_remove<F: Fn(&Self) + 'static>(&self, f: F) -> glib::SignalHandlerId {
|
||||
self.connect_local("remove", true, move |values| {
|
||||
let obj = values[0].get::<Self>().unwrap();
|
||||
f(&obj);
|
||||
None
|
||||
})
|
||||
}
|
||||
|
||||
pub fn tag(&self) -> &Tag {
|
||||
self.imp().tag.get().unwrap()
|
||||
}
|
||||
|
|
@ -75,7 +83,7 @@ impl MusicusSearchTag {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Tag {
|
||||
Composer(Person),
|
||||
Performer(Person),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue