Remove unused parameters from callbacks

This commit is contained in:
Elias Projahn 2025-02-16 16:30:24 +01:00
parent a8c66da52f
commit fca6ce841c
19 changed files with 35 additions and 37 deletions

View file

@ -99,7 +99,7 @@ impl MusicusEnsembleEditor {
}
#[template_callback]
fn save(&self, _: &gtk::Button) {
fn save(&self) {
let library = self.imp().library.get().unwrap();
let name = self.imp().name_editor.translation();

View file

@ -102,7 +102,7 @@ impl MusicusInstrumentEditor {
}
#[template_callback]
fn save(&self, _: &gtk::Button) {
fn save(&self) {
let library = self.imp().library.get().unwrap();
let name = self.imp().name_editor.translation();

View file

@ -172,7 +172,7 @@ impl MusicusPerformerRoleSelectorPopover {
}
#[template_callback]
fn back_button_clicked(&self, _: &gtk::Button) {
fn back_button_clicked(&self) {
self.imp().stack.set_visible_child(&*self.imp().role_view);
self.imp().role_search_entry.grab_focus();
}

View file

@ -319,7 +319,7 @@ impl MusicusRecordingEditor {
}
#[template_callback]
fn save(&self, _: &gtk::Button) {
fn save(&self) {
let library = self.imp().library.get().unwrap();
// TODO: No work selected?

View file

@ -138,12 +138,12 @@ impl MusicusRecordingEditorEnsembleRow {
}
#[template_callback]
fn open_role_popover(&self, _: &gtk::Button) {
fn open_role_popover(&self) {
self.imp().role_popover.get().unwrap().popup();
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -177,12 +177,12 @@ impl MusicusRecordingEditorPerformerRow {
}
#[template_callback]
fn open_role_popover(&self, _: &gtk::Button) {
fn open_role_popover(&self) {
self.imp().role_popover.get().unwrap().popup();
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -182,7 +182,7 @@ impl RecordingSelectorPopover {
}
#[template_callback]
fn back_to_composer(&self, _: &gtk::Button) {
fn back_to_composer(&self) {
self.imp()
.stack
.set_visible_child(&*self.imp().composer_view);
@ -204,7 +204,7 @@ impl RecordingSelectorPopover {
}
#[template_callback]
fn back_to_work(&self, _: &gtk::Button) {
fn back_to_work(&self) {
self.imp().stack.set_visible_child(&*self.imp().work_view);
self.imp().work_search_entry.grab_focus();
}

View file

@ -94,7 +94,7 @@ impl MusicusRoleEditor {
}
#[template_callback]
fn save(&self, _: &gtk::Button) {
fn save(&self) {
let library = self.imp().library.get().unwrap();
let name = self.imp().name_editor.translation();

View file

@ -82,13 +82,13 @@ impl MusicusTranslationEntry {
}
#[template_callback]
fn open_lang_popover(&self, _: &gtk::Button) {
fn open_lang_popover(&self) {
self.imp().lang_popover.popup();
self.imp().lang_entry.grab_focus();
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -317,7 +317,7 @@ impl MusicusWorkEditor {
}
#[template_callback]
fn save(&self, _: &gtk::Button) {
fn save(&self) {
let library = self.imp().library.get().unwrap();
let name = self.imp().name_editor.translation();

View file

@ -138,12 +138,12 @@ impl MusicusWorkEditorComposerRow {
}
#[template_callback]
fn open_role_popover(&self, _: &gtk::Button) {
fn open_role_popover(&self) {
self.imp().role_popover.get().unwrap().popup();
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -123,7 +123,7 @@ impl MusicusWorkEditorPartRow {
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -164,7 +164,7 @@ impl MusicusWorkSelectorPopover {
}
#[template_callback]
fn back_button_clicked(&self, _: &gtk::Button) {
fn back_button_clicked(&self) {
self.imp()
.stack
.set_visible_child(&*self.imp().composer_view);

View file

@ -161,12 +161,12 @@ impl MusicusHomePage {
}
#[template_callback]
fn back_button_clicked(&self, _: &gtk::Button) {
fn back_button_clicked(&self) {
self.imp().search_entry.reset();
}
#[template_callback]
fn edit_button_clicked(&self, _: &gtk::Button) {
fn edit_button_clicked(&self) {
if let Some(tag) = self.imp().search_entry.tags().first() {
match tag {
Tag::Composer(person) | Tag::Performer(person) => {
@ -194,9 +194,7 @@ impl MusicusHomePage {
}
#[template_callback]
fn play(&self, _: &gtk::Button) {
log::info!("Play button clicked");
fn play(&self) {
let program = Program::from_query(self.imp().search_entry.query());
self.player().set_program(program);

View file

@ -219,7 +219,7 @@ impl LibraryManager {
}
// #[template_callback]
// fn add_person(&self, _: &gtk::Button) {
// fn add_person(&self) {
// self.imp()
// .navigation
// .get()
@ -232,7 +232,7 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_role(&self, _: &gtk::Button) {
// fn add_role(&self) {
// self.imp()
// .navigation
// .get()
@ -245,7 +245,7 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_instrument(&self, _: &gtk::Button) {
// fn add_instrument(&self) {
// self.imp()
// .navigation
// .get()
@ -258,7 +258,7 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_work(&self, _: &gtk::Button) {
// fn add_work(&self) {
// self.imp()
// .navigation
// .get()
@ -271,7 +271,7 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_ensemble(&self, _: &gtk::Button) {
// fn add_ensemble(&self) {
// self.imp()
// .navigation
// .get()
@ -284,7 +284,7 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_recording(&self, _: &gtk::Button) {
// fn add_recording(&self) {
// self.imp()
// .navigation
// .get()
@ -297,12 +297,12 @@ impl LibraryManager {
// }
// #[template_callback]
// fn add_medium(&self, _: &gtk::Button) {
// fn add_medium(&self) {
// todo!("Medium import");
// }
// #[template_callback]
// fn add_album(&self, _: &gtk::Button) {
// fn add_album(&self) {
// todo!("Album editor");
// // self.imp()
// // .navigation

View file

@ -217,7 +217,7 @@ impl PlayerBar {
}
#[template_callback]
fn previous(&self, _: &gtk::Button) {
fn previous(&self) {
self.player().previous();
}
@ -227,12 +227,12 @@ impl PlayerBar {
}
#[template_callback]
fn next(&self, _: &gtk::Button) {
fn next(&self) {
self.player().next();
}
#[template_callback]
fn play_pause(&self, _: &gtk::Button) {
fn play_pause(&self) {
self.player().play_pause();
}
}

View file

@ -111,7 +111,7 @@ impl MusicusPlaylistPage {
}
#[template_callback]
fn close(&self, _: &gtk::Button) {
fn close(&self) {
self.emit_by_name::<()>("close", &[]);
}
}

View file

@ -79,7 +79,7 @@ impl MusicusSearchTag {
}
#[template_callback]
fn remove(&self, _: &gtk::Button) {
fn remove(&self) {
self.emit_by_name::<()>("remove", &[]);
}
}

View file

@ -64,7 +64,7 @@ impl MusicusWelcomePage {
}
#[template_callback]
async fn choose_library_folder(&self, _: &gtk::Button) {
async fn choose_library_folder(&self) {
let dialog = gtk::FileDialog::builder()
.title(gettext("Select music library folder"))
.modal(true)