Skip to content

Commit

Permalink
#3978 fix top client, skip util with older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Sep 24, 2023
1 parent e14aafb commit de7aca9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,7 @@ def bundle_tests():
if cythonize_more_ENABLED:
if client_ENABLED:
ace("xpra.client.base.fileprint_mixin")
#ace("xpra.client.base.top_client")
ace("xpra.client.base.top_client")
ace("xpra.client.base.gobject_client_base")
if client_ENABLED and gtk3_ENABLED:
ace("xpra.client.gtk3.cairo_backing")
Expand Down Expand Up @@ -2340,13 +2340,13 @@ def bundle_tests():
ace("xpra.x11.desktop.desktop_server")
ace("xpra.x11.desktop.monitor_server")
ace("xpra.child_reaper")
ace("xpra.common")
ace("xpra.util")
ace("xpra.queue_scheduler")
ace("xpra.scaling_parser")
ace("xpra.simple_stats")
if cython_version>=3:
ace("xpra.splash_screen")
ace("xpra.common")
ace("xpra.util")
ace("xpra.os_util")


Expand Down
7 changes: 4 additions & 3 deletions xpra/client/base/top_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def dictget(self, dictinstance, *parts) -> typedict:
d = self.td(d.dictget(part, {}))
return d

def get_client_info(self, ci):
def get_client_info(self, ci : typedict) -> tuple:
#version info:
ctype = ci.strget("type", "unknown")
title = f"{ctype} client version "
Expand Down Expand Up @@ -761,14 +761,15 @@ def get_client_info(self, ci):
qs_color = YELLOW
if avg<50:
qs_color = RED
return tuple((s, c) for s,c in (
str_color = [
(title, WHITE),
(conn_info, WHITE),
(gl_info, WHITE),
(csv(audio_info), WHITE),
(batch_latency, bl_color),
(qs_info, qs_color),
) if s)
]
return tuple((s, c) for s,c in str_color if s)

def _audio_info(self, ci, mode="speaker"):
minfo = self.dictget(ci, "audio", mode) or self.dictget(ci, "sound", mode)
Expand Down

0 comments on commit de7aca9

Please sign in to comment.