CHORE: Improve consistency in string and function names #2

This commit is contained in:
GithubAnon0000 2025-09-29 23:27:56 +02:00
parent 7b52687c42
commit 453df4b373
4 changed files with 7 additions and 7 deletions

View file

@ -426,7 +426,7 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="hideColoredButtons">
<widget class="QCheckBox" name="showColoredButtons">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>

View file

@ -137,7 +137,7 @@ class Preferences(QDialog):
form.showEstimates.setChecked(reviewing.show_intervals_on_buttons)
form.showProgress.setChecked(reviewing.show_remaining_due_counts)
form.showPlayButtons.setChecked(not reviewing.hide_audio_play_buttons)
form.hideColoredButtons.setChecked(not reviewing.show_colored_buttons)
form.showColoredButtons.setChecked(not reviewing.show_colored_buttons)
form.interrupt_audio.setChecked(reviewing.interrupt_audio_when_answering)
editing = self.prefs.editing
@ -173,7 +173,7 @@ class Preferences(QDialog):
reviewing.show_intervals_on_buttons = form.showEstimates.isChecked()
reviewing.time_limit_secs = form.timeLimit.value() * 60
reviewing.hide_audio_play_buttons = not self.form.showPlayButtons.isChecked()
reviewing.show_colored_buttons = not self.form.hideColoredButtons.isChecked()
reviewing.show_colored_buttons = not self.form.showColoredButtons.isChecked()
reviewing.interrupt_audio_when_answering = self.form.interrupt_audio.isChecked()
editing = self.prefs.editing

View file

@ -55,7 +55,7 @@ pub enum BoolKey {
#[strum(to_string = "addToCur")]
AddingDefaultsToCurrentDeck,
#[strum(to_string = "hideColor")]
HideColoredButtons,
ShowColoredButtons,
}
/// This is a workaround for old clients that used ints to represent boolean
@ -73,7 +73,7 @@ impl Collection {
// some keys default to true
BoolKey::InterruptAudioWhenAnswering
| BoolKey::ShowIntervalsAboveAnswerButtons
| BoolKey::HideColoredButtons
| BoolKey::ShowColoredButtons
| BoolKey::AddingDefaultsToCurrentDeck
| BoolKey::FutureDueShowBacklog
| BoolKey::ShowRemainingDueCountsInStudy

View file

@ -97,7 +97,7 @@ impl Collection {
show_remaining_due_counts: self.get_config_bool(BoolKey::ShowRemainingDueCountsInStudy),
show_intervals_on_buttons: self
.get_config_bool(BoolKey::ShowIntervalsAboveAnswerButtons),
show_colored_buttons: self.get_config_bool(BoolKey::HideColoredButtons),
show_colored_buttons: self.get_config_bool(BoolKey::ShowColoredButtons),
time_limit_secs: self.get_answer_time_limit_secs(),
load_balancer_enabled: self.get_config_bool(BoolKey::LoadBalancerEnabled),
fsrs_short_term_with_steps_enabled: self
@ -120,7 +120,7 @@ impl Collection {
BoolKey::ShowIntervalsAboveAnswerButtons,
s.show_intervals_on_buttons,
)?;
self.set_config_bool_inner(BoolKey::HideColoredButtons, s.show_colored_buttons)?;
self.set_config_bool_inner(BoolKey::ShowColoredButtons, s.show_colored_buttons)?;
self.set_answer_time_limit_secs(s.time_limit_secs)?;
self.set_config_bool_inner(BoolKey::LoadBalancerEnabled, s.load_balancer_enabled)?;
self.set_config_bool_inner(