mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Remove unused parameters from callbacks
This commit is contained in:
parent
a8c66da52f
commit
fca6ce841c
19 changed files with 35 additions and 37 deletions
|
|
@ -99,7 +99,7 @@ impl MusicusEnsembleEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn save(&self, _: >k::Button) {
|
fn save(&self) {
|
||||||
let library = self.imp().library.get().unwrap();
|
let library = self.imp().library.get().unwrap();
|
||||||
let name = self.imp().name_editor.translation();
|
let name = self.imp().name_editor.translation();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ impl MusicusInstrumentEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn save(&self, _: >k::Button) {
|
fn save(&self) {
|
||||||
let library = self.imp().library.get().unwrap();
|
let library = self.imp().library.get().unwrap();
|
||||||
let name = self.imp().name_editor.translation();
|
let name = self.imp().name_editor.translation();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ impl MusicusPerformerRoleSelectorPopover {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn back_button_clicked(&self, _: >k::Button) {
|
fn back_button_clicked(&self) {
|
||||||
self.imp().stack.set_visible_child(&*self.imp().role_view);
|
self.imp().stack.set_visible_child(&*self.imp().role_view);
|
||||||
self.imp().role_search_entry.grab_focus();
|
self.imp().role_search_entry.grab_focus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ impl MusicusRecordingEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn save(&self, _: >k::Button) {
|
fn save(&self) {
|
||||||
let library = self.imp().library.get().unwrap();
|
let library = self.imp().library.get().unwrap();
|
||||||
|
|
||||||
// TODO: No work selected?
|
// TODO: No work selected?
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,12 @@ impl MusicusRecordingEditorEnsembleRow {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn open_role_popover(&self, _: >k::Button) {
|
fn open_role_popover(&self) {
|
||||||
self.imp().role_popover.get().unwrap().popup();
|
self.imp().role_popover.get().unwrap().popup();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -177,12 +177,12 @@ impl MusicusRecordingEditorPerformerRow {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn open_role_popover(&self, _: >k::Button) {
|
fn open_role_popover(&self) {
|
||||||
self.imp().role_popover.get().unwrap().popup();
|
self.imp().role_popover.get().unwrap().popup();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ impl RecordingSelectorPopover {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn back_to_composer(&self, _: >k::Button) {
|
fn back_to_composer(&self) {
|
||||||
self.imp()
|
self.imp()
|
||||||
.stack
|
.stack
|
||||||
.set_visible_child(&*self.imp().composer_view);
|
.set_visible_child(&*self.imp().composer_view);
|
||||||
|
|
@ -204,7 +204,7 @@ impl RecordingSelectorPopover {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn back_to_work(&self, _: >k::Button) {
|
fn back_to_work(&self) {
|
||||||
self.imp().stack.set_visible_child(&*self.imp().work_view);
|
self.imp().stack.set_visible_child(&*self.imp().work_view);
|
||||||
self.imp().work_search_entry.grab_focus();
|
self.imp().work_search_entry.grab_focus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ impl MusicusRoleEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn save(&self, _: >k::Button) {
|
fn save(&self) {
|
||||||
let library = self.imp().library.get().unwrap();
|
let library = self.imp().library.get().unwrap();
|
||||||
let name = self.imp().name_editor.translation();
|
let name = self.imp().name_editor.translation();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,13 +82,13 @@ impl MusicusTranslationEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn open_lang_popover(&self, _: >k::Button) {
|
fn open_lang_popover(&self) {
|
||||||
self.imp().lang_popover.popup();
|
self.imp().lang_popover.popup();
|
||||||
self.imp().lang_entry.grab_focus();
|
self.imp().lang_entry.grab_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ impl MusicusWorkEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn save(&self, _: >k::Button) {
|
fn save(&self) {
|
||||||
let library = self.imp().library.get().unwrap();
|
let library = self.imp().library.get().unwrap();
|
||||||
|
|
||||||
let name = self.imp().name_editor.translation();
|
let name = self.imp().name_editor.translation();
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,12 @@ impl MusicusWorkEditorComposerRow {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn open_role_popover(&self, _: >k::Button) {
|
fn open_role_popover(&self) {
|
||||||
self.imp().role_popover.get().unwrap().popup();
|
self.imp().role_popover.get().unwrap().popup();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ impl MusicusWorkEditorPartRow {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ impl MusicusWorkSelectorPopover {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn back_button_clicked(&self, _: >k::Button) {
|
fn back_button_clicked(&self) {
|
||||||
self.imp()
|
self.imp()
|
||||||
.stack
|
.stack
|
||||||
.set_visible_child(&*self.imp().composer_view);
|
.set_visible_child(&*self.imp().composer_view);
|
||||||
|
|
|
||||||
|
|
@ -161,12 +161,12 @@ impl MusicusHomePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn back_button_clicked(&self, _: >k::Button) {
|
fn back_button_clicked(&self) {
|
||||||
self.imp().search_entry.reset();
|
self.imp().search_entry.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn edit_button_clicked(&self, _: >k::Button) {
|
fn edit_button_clicked(&self) {
|
||||||
if let Some(tag) = self.imp().search_entry.tags().first() {
|
if let Some(tag) = self.imp().search_entry.tags().first() {
|
||||||
match tag {
|
match tag {
|
||||||
Tag::Composer(person) | Tag::Performer(person) => {
|
Tag::Composer(person) | Tag::Performer(person) => {
|
||||||
|
|
@ -194,9 +194,7 @@ impl MusicusHomePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn play(&self, _: >k::Button) {
|
fn play(&self) {
|
||||||
log::info!("Play button clicked");
|
|
||||||
|
|
||||||
let program = Program::from_query(self.imp().search_entry.query());
|
let program = Program::from_query(self.imp().search_entry.query());
|
||||||
self.player().set_program(program);
|
self.player().set_program(program);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ impl LibraryManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_person(&self, _: >k::Button) {
|
// fn add_person(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -232,7 +232,7 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_role(&self, _: >k::Button) {
|
// fn add_role(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -245,7 +245,7 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_instrument(&self, _: >k::Button) {
|
// fn add_instrument(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -258,7 +258,7 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_work(&self, _: >k::Button) {
|
// fn add_work(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -271,7 +271,7 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_ensemble(&self, _: >k::Button) {
|
// fn add_ensemble(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -284,7 +284,7 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_recording(&self, _: >k::Button) {
|
// fn add_recording(&self) {
|
||||||
// self.imp()
|
// self.imp()
|
||||||
// .navigation
|
// .navigation
|
||||||
// .get()
|
// .get()
|
||||||
|
|
@ -297,12 +297,12 @@ impl LibraryManager {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_medium(&self, _: >k::Button) {
|
// fn add_medium(&self) {
|
||||||
// todo!("Medium import");
|
// todo!("Medium import");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[template_callback]
|
// #[template_callback]
|
||||||
// fn add_album(&self, _: >k::Button) {
|
// fn add_album(&self) {
|
||||||
// todo!("Album editor");
|
// todo!("Album editor");
|
||||||
// // self.imp()
|
// // self.imp()
|
||||||
// // .navigation
|
// // .navigation
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ impl PlayerBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn previous(&self, _: >k::Button) {
|
fn previous(&self) {
|
||||||
self.player().previous();
|
self.player().previous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -227,12 +227,12 @@ impl PlayerBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn next(&self, _: >k::Button) {
|
fn next(&self) {
|
||||||
self.player().next();
|
self.player().next();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn play_pause(&self, _: >k::Button) {
|
fn play_pause(&self) {
|
||||||
self.player().play_pause();
|
self.player().play_pause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ impl MusicusPlaylistPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn close(&self, _: >k::Button) {
|
fn close(&self) {
|
||||||
self.emit_by_name::<()>("close", &[]);
|
self.emit_by_name::<()>("close", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ impl MusicusSearchTag {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn remove(&self, _: >k::Button) {
|
fn remove(&self) {
|
||||||
self.emit_by_name::<()>("remove", &[]);
|
self.emit_by_name::<()>("remove", &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ impl MusicusWelcomePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
async fn choose_library_folder(&self, _: >k::Button) {
|
async fn choose_library_folder(&self) {
|
||||||
let dialog = gtk::FileDialog::builder()
|
let dialog = gtk::FileDialog::builder()
|
||||||
.title(gettext("Select music library folder"))
|
.title(gettext("Select music library folder"))
|
||||||
.modal(true)
|
.modal(true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue