]> Dogcows Code - chaz/openbox/blobdiff - tools/themeupdate/themeupdate.py
fix autohiding
[chaz/openbox] / tools / themeupdate / themeupdate.py
index 08ddd0edc29fb5191d78ca12e40a573ef2f3b042..171be0b9595d3ea73f6bb37fd98f7fd3d2150a46 100755 (executable)
@@ -59,11 +59,22 @@ def simple_replace(data):
 def remove(data):
     invalid = []
     invalid.append('toolbar')
+    for inv in invalid:
+        while 1:
+            i, key, nul = find_key(data, inv)
+            if i >= 0:
+                out(key + ' is no longer supported.\nRemove (Y/n)? ')
+                if read_bool():
+                    out('Removing "' + key + '"\n')
+                    data.pop(i)
+            else:
+                break
     invalid.append('rootCommand')
+    invalid.append('menu.bullet')
     invalid.append('menu.frame.justify')
     for inv in invalid:
         while 1:
-            i, key, nul = find_key(data, inv)
+            i, key, nul = find_key(data, inv, True)
             if i >= 0:
                 out(key + ' is no longer supported.\nRemove (Y/n)? ')
                 if read_bool():
@@ -201,8 +212,7 @@ def err_missing(data):
 
 
 def usage():
-    print 'Usage: ' + sys.argv[0] + ' /path/to/themerc > newthemerc'
-    print
+    out('Usage: themupdate.py /path/to/themerc > newthemerc\n\n')
     sys.exit()
 
 try:
@@ -210,8 +220,7 @@ try:
 except IndexError:
     usage()
 except IOError:
-    print 'Unable to open file "' + sys.argv[1] + '"'
-    print
+    out('Unable to open file "' + sys.argv[1] + '"\n\n')
     usage()
 
 data = file.readlines()
This page took 0.020513 seconds and 4 git commands to generate.