Sync with SVG-Edit 2.5beta
This commit is contained in:
parent
79a2299363
commit
d1678ceb49
69 changed files with 1405 additions and 896 deletions
|
@ -13,6 +13,19 @@ import os
|
|||
import json
|
||||
from types import DictType
|
||||
|
||||
def changeTooltipTarget(j):
|
||||
"""
|
||||
Moves the tooltip target for some tools
|
||||
"""
|
||||
tools = ['rect_width', 'rect_height']
|
||||
for row in j:
|
||||
try:
|
||||
id = row['id']
|
||||
if id in tools:
|
||||
row['id'] = row['id'] + '_tool'
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def updateMainMenu(j):
|
||||
"""
|
||||
Converts title into textContent for items in the main menu
|
||||
|
@ -58,7 +71,7 @@ def processFile(filename):
|
|||
j = json.loads(in_string)
|
||||
|
||||
# process the JSON object here
|
||||
# updateMainMenu(j)
|
||||
changeTooltipTarget(j)
|
||||
|
||||
# now write it out back to the file
|
||||
s = ourPrettyPrint(j).encode("UTF-8")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue