From 056dbc12ed21abf601609751eee117a06d3d26a7 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Fri, 2 Feb 2018 14:26:28 +0000 Subject: [PATCH] Allow 'Scale' in icon theme per-directory sections --- xdg/IconTheme.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xdg/IconTheme.py b/xdg/IconTheme.py index d795484..e026d4e 100644 --- a/xdg/IconTheme.py +++ b/xdg/IconTheme.py @@ -72,6 +72,10 @@ def getThreshold(self, directory): else: return 2 + def getScale(self, directory): + value = self.get('Scale', type="integer", group=directory) + return value or 1 + # validation stuff def checkExtras(self): # header @@ -168,6 +172,8 @@ def checkKey(self, key, value, group): self.checkValue(key, value, type="integer") if self.type != "Threshold": self.errors.append("Key 'Threshold' give, but Type is %s" % self.type) + elif key == "Scale": + self.checkValue(key, value, type="integer") elif re.match("^X-[a-zA-Z0-9-]+", key): pass else: