Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #137 and #310 #323

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion DisplayCAL/CGATS.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ def __bytes__(self):
for key in iterable:
value = self[key]
if isinstance(value, str):
print("value could not be a str: {}".format(value))
value = value.encode("utf-8")

if key == "DATA":
Expand Down
4 changes: 2 additions & 2 deletions DisplayCAL/display_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -13431,7 +13431,7 @@ def correction_type_handler(event):
else:
description = "%s (%s %s) & %s" % (
instrument or self.worker.get_instrument_name(),
lang.getstr("observer." + observer),
lang.getstr(f"observer.{observer}"),
lang.getstr("observer"),
manufacturer_display or self.worker.get_display_name(True, True),
)
Expand Down Expand Up @@ -13774,7 +13774,7 @@ def correction_type_handler(event):
cgats = re.sub(
rb'(\nDISPLAY\s+"[^"]*"\n)',
b'\nREFERENCE "%s"\\1'
% reference_ti3[0].get("TARGET_INSTRUMENT").replace(r"\\", r"\\\\"),
% reference_ti3[0].get("TARGET_INSTRUMENT").replace(b"\\", b"\\\\"),
cgats,
)
if not re.search(rb'\nTECHNOLOGY\s+".+?"\n', cgats) and tech:
Expand Down
4 changes: 2 additions & 2 deletions DisplayCAL/util_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def get_model_id():
output, errors = p.communicate()
except BaseException:
return None
# TODO: There is possibly an error waiting for us here in the next line. Not on Mac
# can not test it right now!
if isinstance(output, bytes):
output = output.decode("utf-8")
return "".join(output).split(None, 1)[-1].strip()


Expand Down
6 changes: 4 additions & 2 deletions DisplayCAL/wxwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -7395,7 +7395,6 @@ def fade(self, direction="in", i=1):


class TooltipWindow(InvincibleFrame):

"""A tooltip-style window"""

def __init__(
Expand Down Expand Up @@ -7465,7 +7464,10 @@ def __init__(
cls = BetterStaticFancyText
else:
cls = wx.StaticText
col = cls(self.panel, -1, "")
# We need to initialize the label with something,
# so initialize it with with "dummy text",
# and it will be replaced later on...
col = cls(self.panel, -1, "dummy text")
if isinstance(col, wx.Panel):
col.BackgroundColour = self.panel.BackgroundColour
if "<" in label and wrap:
Expand Down
Loading