From a363afbbf8af9811c9ade2798faf360d1ecbcfbd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:11:55 +0900 Subject: [PATCH] fix: recent servers context menu options --- helpers/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/ui.py b/helpers/ui.py index 62d9541..d7ec741 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -766,7 +766,7 @@ class TreeView(Gtk.TreeView): mod_context_items = ["Open in Steam Workshop", "Delete mod"] subcontext_items = {"Server browser": ["Add to my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"], "My saved servers": ["Remove from my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"], - "Recent servers": ["Remove from history", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"], + "Recent servers": ["Add to my servers", "Remove from history", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"], } # submenu hierarchy https://stackoverflow.com/questions/52847909/how-to-add-a-sub-menu-to-a-gtk-menu if context == "Mod": @@ -779,7 +779,7 @@ class TreeView(Gtk.TreeView): return for item in items: - if subcontext == "Server browser" and item == "Add to my servers": + if subcontext == "Server browser" or "Recent servers" and item == "Add to my servers": record = "%s:%s" %(self.get_column_at_index(7), self.get_column_at_index(8)) proc = call_out(widget, "is_in_favs", record) if proc.returncode == 0: