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 c1a859c commit c4a4f3e
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,9 @@

SERVER_NOT_SUPPORTED = "Not supported by the server"

# 'auto' is recorded as '' unfortunately:
GENERIC_ENCODINGS = ("", "stream", "grayscale")


class GTKTrayMenu(MenuHelper):

Expand Down Expand Up @@ -810,7 +813,7 @@ 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 self.client.encoding == "auto"
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 self.client.encoding == "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 c4a4f3e

Please sign in to comment.