all repos — openbox @ cdf2d7eaf8d686606d0c7ddabfd7f39d2bfb832a

openbox fork - make it a bit more like ryudo

check for oldschool fonts
Dana Jansens danakj@orodu.net
commit

cdf2d7eaf8d686606d0c7ddabfd7f39d2bfb832a

parent

dd74424f014b0f4ea8e2a84179afcadd70c1b817

1 files changed, 28 insertions(+), 7 deletions(-)

jump to
M tools/themeupdate/themeupdate.pytools/themeupdate/themeupdate.py

@@ -57,7 +57,7 @@ invalid.append('rootCommand')

invalid.append('menu.frame.justify') for inv in invalid: if key.find(inv) != -1: - out(key + ' is no longer supported. Remove (Y/n)? ') + out(key + ' is no longer supported.\nRemove (Y/n)? ') if read_bool(): out('Removing "' + key + '"\n') data.pop(i)

@@ -76,7 +76,7 @@ if key and value:

if key == 'window.button.pressed': out('The window.button.pressed option has been replaced by ' + 'window.button.pressed.focus and ' + - 'window.button.pressed.unfocus. Update (Y/n)? ') + 'window.button.pressed.unfocus.\nUpdate (Y/n)? ') if read_bool(): out('Removing "window.button.pressed"\n') data.pop(i)

@@ -91,7 +91,27 @@ n += 1

break i += 1 - +def fonts(data): + for l in data: + key, value = getkeyval(l) + if key and value: + if key == 'window.font': + out('You appear to specify fonts using the old X fonts ' + + 'syntax.\nShall I remove all fonts from the theme (Y/n)? ') + if not read_bool(): + return + i = 0 + n = len(data) + while i < n: + l = data[i] + key, value = getkeyval(l) + if key and value: + if key.find('font') != -1: + out('Removing "' + key + '"\n') + data.pop(i) + i -= 1 + n -= 1 + i += 1

@@ -110,7 +130,7 @@

def usage(): - print 'Usage: ' + sys.argv[0] + ' /path/to/themerc' + print 'Usage: ' + sys.argv[0] + ' /path/to/themerc > newthemerc' print sys.exit()

@@ -127,9 +147,10 @@ data = file.readlines()

for i in range(len(data)): data[i] = data[i].strip() -simple_replace(data) -remove(data) -pressed(data) +#simple_replace(data) +#remove(data) +#pressed(data) +fonts(data) for l in data: print l