1
0
Fork 0
mirror of synced 2024-05-17 19:03:08 +12:00
This commit is contained in:
Rafał Mikrut 2023-05-07 14:03:35 +02:00
parent 755e5e6a74
commit 9c6f2fa2ad
3 changed files with 8 additions and 6 deletions

View file

@ -272,8 +272,10 @@ impl SameMusic {
pub fn set_check_type(&mut self, check_type: CheckingMethod) {
assert!([CheckingMethod::AudioTags, CheckingMethod::AudioContent].contains(&check_type));
self.check_type = check_type
self.check_type = check_type;
}
#[must_use]
pub fn get_check_type(&self) -> CheckingMethod {
self.check_type
}

View file

@ -65,12 +65,12 @@ pub fn connect_same_music_change_mode(gui_data: &GuiData) {
fn disable_enable_buttons(buttons: &[CheckButton; 7], scales: &[Widget; 4], current_mode: CheckingMethod) {
match current_mode {
CheckingMethod::AudioTags => {
buttons.iter().for_each(|e| e.show());
scales.iter().for_each(|e| e.hide());
buttons.iter().for_each(WidgetExt::show);
scales.iter().for_each(WidgetExt::hide);
}
CheckingMethod::AudioContent => {
buttons.iter().for_each(|e| e.hide());
scales.iter().for_each(|e| e.show());
buttons.iter().for_each(WidgetExt::hide);
scales.iter().for_each(WidgetExt::show);
}
_ => panic!(),
}

View file

@ -775,7 +775,7 @@ pub fn scale_set_min_max_values(scale: &Scale, minimum: f64, maximum: f64, curre
scale.set_fill_level(maximum);
scale.set_value(current_value);
if let Some(step) = step {
scale.adjustment().set_step_increment(step)
scale.adjustment().set_step_increment(step);
}
}