Skip to content

Commit

Permalink
#4398 quality and speed can be used with all generic encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 20, 2024
1 parent 0715128 commit 2c9301c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xpra/client/gtk3/tray_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@

SERVER_NOT_SUPPORTED = "Not supported by the server"

GENERIC_ENCODINGS = ("", "stream", "grayscale")


class GTKTrayMenu(MenuHelper):

Expand Down Expand Up @@ -810,7 +812,8 @@ def set_quality(self, q) -> None:
def set_qualitymenu(self, *_args) -> None:
if self.quality:
enc = self.client.encoding
with_quality = enc in self.client.server_encodings_with_quality or enc == "auto"
# 'auto' is recorded as '' unfortunately:
with_quality = enc in self.client.server_encodings_with_quality or enc in GENERIC_ENCODINGS
can_use = with_quality and not self.client.mmap_enabled
set_sensitive(self.quality, can_use)
if self.client.mmap_enabled:
Expand Down Expand Up @@ -862,7 +865,7 @@ def set_speed(self, s) -> None:
def set_speedmenu(self, *_args) -> None:
if self.speed:
enc = self.client.encoding
with_speed = enc in self.client.server_encodings_with_speed or enc == "auto"
with_speed = enc in self.client.server_encodings_with_speed or enc in GENERIC_ENCODINGS
set_sensitive(self.speed, with_speed and not self.client.mmap_enabled)
if self.client.mmap_enabled:
self.speed.set_tooltip_text("Quality is always 100% with mmap")
Expand Down

0 comments on commit 2c9301c

Please sign in to comment.