diff options
author | stuebinm | 2021-12-26 22:55:16 +0100 |
---|---|---|
committer | stuebinm | 2021-12-26 22:55:16 +0100 |
commit | 4953496ec2e63f2fe29b335d76052a3f8478a00b (patch) | |
tree | 7fd09bb3fb6174ce7c063bb4b67858c22d00fdd6 | |
parent | ee73507353fb60d15de94f1f3212ad0d36bea823 (diff) |
openWebsiteTriggerMessage can also be used for openTab
-rw-r--r-- | lib/Properties.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index e746401..4e8c7d9 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -409,9 +409,9 @@ checkTileLayerProperty p@(Property name _value) = case name of requireProperty "playAudio" "openWebsiteTrigger" -> do isString p - requireProperty "openWebsite" + requireOneOf ["openWebsite", "openTab"] unlessHasProperty "openWebsiteTriggerMessage" - $ suggest "set \"openWebsiteTriggerMessage\" to a custom message to\ + $ suggest "set \"openWebsiteTriggerMessage\" to a custom message to \ \overwrite the default \"press SPACE to open Website\"." "openWebsiteTriggerMessage" -> do isString p @@ -496,6 +496,12 @@ checkTileLayerProperty p@(Property name _value) = case name of warnUnknown p knownTileLayerProperites where requireProperty req = propertyRequiredBy req name + requireOneOf names = do + context <- askContext + when (all (not . containsProperty context) names) + $ complain $ "property " <> prettyprint name <> " requires one of " + <> prettyprint names + isUnsupported = warn $ "property " <> name <> " is not (yet) supported by walint." deprecatedUseInstead instead = warn $ "property \"" <> name <> "\" is deprecated. Use \"" <> instead <> "\" instead." |