diff --git a/xpra/client/gtk3/menu_helper.py b/xpra/client/gtk3/menu_helper.py index 8017053424..a2cc088fbf 100644 --- a/xpra/client/gtk3/menu_helper.py +++ b/xpra/client/gtk3/menu_helper.py @@ -336,7 +336,7 @@ def populate_encodingsmenu(encodings_submenu, get_current_encoding, set_encoding def encoding_changed(item): ensure_item_selected(encodings_submenu, item) enc = NAME_TO_ENCODING.get(item.get_label()) - log("encoding_changed(%s) enc=%s, current=%s", item, enc, encodings_submenu.get_current_encoding()) + log.warn("encoding_changed(%s) enc=%s, current=%s", item, enc, encodings_submenu.get_current_encoding()) if enc is not None and encodings_submenu.get_current_encoding() != enc: encodings_submenu.set_encoding(enc) @@ -352,6 +352,7 @@ def encoding_changed(item): encodings_submenu.append(encoding_item) encodings_submenu.index_to_encoding[i] = encoding encodings_submenu.encoding_to_index[encoding] = i + log.error(f"{NAME_TO_ENCODING=}") encodings_submenu.show_all() diff --git a/xpra/client/gtk3/tray_menu.py b/xpra/client/gtk3/tray_menu.py index be7a7f441a..60e3ac9ad8 100644 --- a/xpra/client/gtk3/tray_menu.py +++ b/xpra/client/gtk3/tray_menu.py @@ -81,6 +81,8 @@ SERVER_NOT_SUPPORTED = "Not supported by the server" +GENERIC_ENCODINGS = ("", "stream", "grayscale") + class GTKTrayMenu(MenuHelper): @@ -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: @@ -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")