mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Initialize comment entry in recording editor
This commit is contained in:
parent
a763b8a9c3
commit
9ee7bf166d
1 changed files with 4 additions and 2 deletions
|
|
@ -12,7 +12,6 @@ use std::rc::Rc;
|
||||||
|
|
||||||
/// A widget for creating or editing a recording.
|
/// A widget for creating or editing a recording.
|
||||||
// TODO: Disable buttons if no performance is selected.
|
// TODO: Disable buttons if no performance is selected.
|
||||||
// TODO: Initialize comment entry.
|
|
||||||
pub struct RecordingEditor {
|
pub struct RecordingEditor {
|
||||||
pub widget: gtk::Box,
|
pub widget: gtk::Box,
|
||||||
backend: Rc<Backend>,
|
backend: Rc<Backend>,
|
||||||
|
|
@ -56,7 +55,10 @@ impl RecordingEditor {
|
||||||
scroll.add(&performance_list.widget);
|
scroll.add(&performance_list.widget);
|
||||||
|
|
||||||
let (id, work, performances) = match recording {
|
let (id, work, performances) = match recording {
|
||||||
Some(recording) => (recording.id, Some(recording.work), recording.performances),
|
Some(recording) => {
|
||||||
|
comment_entry.set_text(&recording.comment);
|
||||||
|
(recording.id, Some(recording.work), recording.performances)
|
||||||
|
}
|
||||||
None => (rand::random::<u32>().into(), None, Vec::new()),
|
None => (rand::random::<u32>().into(), None, Vec::new()),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue