mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 03:47:23 +01:00
editor: Popup recording selector in track editor by default
This commit is contained in:
parent
3b02dc98a6
commit
18ba84c86f
1 changed files with 12 additions and 3 deletions
|
|
@ -114,7 +114,16 @@ mod imp {
|
|||
}
|
||||
|
||||
impl WidgetImpl for TracksEditor {}
|
||||
impl NavigationPageImpl for TracksEditor {}
|
||||
|
||||
impl NavigationPageImpl for TracksEditor {
|
||||
fn shown(&self) {
|
||||
self.parent_shown();
|
||||
|
||||
if self.recording.borrow().is_none() {
|
||||
self.obj().select_recording();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glib::wrapper! {
|
||||
|
|
@ -143,12 +152,12 @@ impl TracksEditor {
|
|||
}
|
||||
|
||||
#[template_callback]
|
||||
fn select_recording(&self, _: &adw::ActionRow) {
|
||||
fn select_recording(&self) {
|
||||
self.imp().recordings_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
#[template_callback]
|
||||
async fn add_files(&self, _: &adw::ActionRow) {
|
||||
async fn add_files(&self) {
|
||||
let dialog = gtk::FileDialog::builder()
|
||||
.title(gettext("Select audio files"))
|
||||
.modal(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue