Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
hacks added to resolve inconsistencies in libwacom-data
  • Loading branch information
tb2097 authored Feb 6, 2019
1 parent 58d0a01 commit d1cfcd2
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions wacom-gui/wacom_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,19 @@ def get_connected_tablets(self):
else:
dev_type = device
try:
if dev_type not in self.device_data.keys():
dev_type = dev_type.replace("Pro", "Pro 2")
# Cintiq Pro 24 hack
if dev_type == 'Wacom Cintiq Pro 24':
if 'Wacom Cintiq Pro 24 P' in self.device_data.keys():
dev_type = 'Wacom Cintiq Pro 24 P'
else:
dev_type = 'Wacom Cintiq Pro 24 PT'
# ExpressKeys hack
if dev_type == 'Wacom Express Key Remote':
dev_type = 'Wacom ExpressKey Remote'
# PTH-660/PTH-860 hack
if dev_type == 'Wacom Intuos Pro':
if dev_type not in self.device_data.keys():
dev_type = dev_type.replace("Pro", "Pro 2")
devID = self.device_data[dev_type]['devID']
if self.device_data[dev_type]['devID'] not in self.tablets.keys():
self.tablets[devID] = []
Expand Down Expand Up @@ -191,10 +202,11 @@ def __get_libwacom_data(self):
for device, data in self.device_data.items():
# get button svg info
if 'pad' in data.keys():
if data['pad']['buttons'].__len__() == 0:
del data['pad']['buttons']
else:
self.pretty_svg(device)
if 'buttons' in data['pad'].keys():
if data['pad']['buttons'].__len__() == 0:
del data['pad']['buttons']
else:
self.pretty_svg(device)


def pretty_svg(self, device):
Expand Down

0 comments on commit d1cfcd2

Please sign in to comment.