From b70657eb53068e35113011974dc39dd6a0f72d4b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 19 Jun 2014 13:18:25 +0200 Subject: [PATCH] Validate configs properly. We inherited custom types from String which is wrong and not validated against ValidValues. --- qutebrowser/config/conftypes.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qutebrowser/config/conftypes.py b/qutebrowser/config/conftypes.py index 7c8f57ad7..a2ebada50 100644 --- a/qutebrowser/config/conftypes.py +++ b/qutebrowser/config/conftypes.py @@ -865,14 +865,14 @@ class AutoSearch(BaseType): return False -class Position(String): +class Position(BaseType): """The position of the tab bar.""" valid_values = ValidValues('north', 'south', 'east', 'west') -class SelectOnRemove(String): +class SelectOnRemove(BaseType): """Which tab to select when the focused tab is removed.""" @@ -882,7 +882,7 @@ class SelectOnRemove(String): ('previous', "Select the previously selected tab.")) -class LastClose(String): +class LastClose(BaseType): """Behaviour when the last tab is closed.""" @@ -891,7 +891,7 @@ class LastClose(String): ('quit', "Quit qutebrowser.")) -class AcceptCookies(String): +class AcceptCookies(BaseType): """Whether to accept a cookie.""" @@ -899,7 +899,7 @@ class AcceptCookies(String): ('never', "Don't accept cookies at all.")) -class WindowOpenBehaviour(String): +class WindowOpenBehaviour(BaseType): """What to do when a webview requests a new window.""" @@ -908,7 +908,7 @@ class WindowOpenBehaviour(String): "history will be cleared).")) -class ConfirmQuit(String): +class ConfirmQuit(BaseType): """Whether to display a confirmation when the window is closed.""" @@ -918,7 +918,7 @@ class ConfirmQuit(String): ('never', "Never show a confirmation.")) -class ForwardUnboundKeys(String): +class ForwardUnboundKeys(BaseType): """Whether to forward unbound keys."""