Skip to content

Commit

Permalink
remove useless pref
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed Mar 22, 2018
1 parent 1cdba88 commit aa72b87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 4 additions & 10 deletions ports/servo/browser.rs
Expand Up @@ -83,10 +83,8 @@ impl Browser {
fn handle_key_from_window(&mut self, ch: Option<char>, key: Key, state: KeyState, mods: KeyModifiers) {
match (mods, ch, key) {
(CMD_OR_CONTROL, Some('r'), _) => {
if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() {
if let Some(id) = self.browser_id {
self.event_queue.push(WindowEvent::Reload(id));
}
if let Some(id) = self.browser_id {
self.event_queue.push(WindowEvent::Reload(id));
}
}
(CMD_OR_CONTROL, Some('l'), _) => {
Expand All @@ -105,9 +103,7 @@ impl Browser {
}
}
(CMD_OR_CONTROL, Some('q'), _) => {
if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() {
self.event_queue.push(WindowEvent::Quit);
}
self.event_queue.push(WindowEvent::Quit);
}
(_, Some('3'), _) => if mods ^ KeyModifiers::CONTROL == KeyModifiers::SHIFT {
self.event_queue.push(WindowEvent::CaptureWebRender);
Expand Down Expand Up @@ -137,9 +133,7 @@ impl Browser {
}
}
(KeyModifiers::NONE, None, Key::Escape) => {
if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() {
self.event_queue.push(WindowEvent::Quit);
}
self.event_queue.push(WindowEvent::Quit);
}
_ => {
let event = self.platform_handle_key(key, mods);
Expand Down
1 change: 0 additions & 1 deletion resources/prefs.json
Expand Up @@ -63,7 +63,6 @@
"network.http-cache.disabled": false,
"network.mime.sniff": false,
"session-history.max-length": 20,
"shell.builtin-key-shortcuts.enabled": true,
"shell.homepage": "https://servo.org",
"shell.keep_screen_on.enabled": false,
"shell.native-orientation": "both",
Expand Down

0 comments on commit aa72b87

Please sign in to comment.