Blubb
This commit is contained in:
parent
ca28ad51ed
commit
cd89d5f608
@ -248,8 +248,7 @@ impl PrefsDialog {
|
||||
let behavior_prefs = BehaviorPrefs {
|
||||
vol_control_cmd,
|
||||
vol_scroll_step: self.scroll_step_spin.get_value(),
|
||||
middle_click_action: From::from(self.middle_click_combo
|
||||
.get_active()),
|
||||
middle_click_action: self.middle_click_combo.get_active().into(),
|
||||
custom_command,
|
||||
};
|
||||
|
||||
|
@ -39,15 +39,15 @@ impl From<i32> for MiddleClickAction {
|
||||
1 => MiddleClickAction::ShowPreferences,
|
||||
2 => MiddleClickAction::VolumeControl,
|
||||
3 => MiddleClickAction::CustomCommand,
|
||||
_ => Default::default(),
|
||||
_ => MiddleClickAction::ToggleMute,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl Into<i32> for MiddleClickAction {
|
||||
fn into(self) -> i32 {
|
||||
match self {
|
||||
impl From<MiddleClickAction> for i32 {
|
||||
fn from(action: MiddleClickAction) -> Self {
|
||||
match action {
|
||||
MiddleClickAction::ToggleMute => 0,
|
||||
MiddleClickAction::ShowPreferences => 1,
|
||||
MiddleClickAction::VolumeControl => 2,
|
||||
|
Loading…
Reference in New Issue
Block a user