Extract the server catalog model into aqomui/catalog.py #125
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The #83 seam-3 catalog: server_dict / protocol_dict / favourites and every operation on them, as a plain Qt-free class the widgets render.
Moves out of AqomuiGui:
json.dumpsites)pop_boxes)filter_servers,filter_by_text,show_favourite_serverskeep only the row hiding)index_listplusdisplay_latency's bisect bookkeeping)change_favourite,choose_random_server)downloaded): per-provider server replacement, favourite preservation, protocolselectedcarry-overdel_single_server,del_provider,apply_edit)connect_profile's filtering and Fastest / Fast-Random / Random modes)utils.create_server_dictis the same model's connect-time projectionInterface: queries (keys visible under a filter, resolve profile/random/favourite to a concrete server dict), mutations (merge import, toggle favourite, delete, record latency), one changed notification the list widget repopulates from — far narrower than the ~600 lines it absorbs.
Qt-free per the #83 placement rule: the cli recreates catalog operations by hand today (protocol selection, provider deletion, server listing) and has drifted doing it — both its
create_server_dictcalls pass two args to the three-arg signature, so-c/-vdie on TypeError.Tangles: #123 resolves random/profile/favourite modes through this model and lands with or after it; #52 sits under the country handling; #70 reshapes only the rendering side.
PR #173 (seam 2, verified live, pending merge) got there first, so per the tangle note this catalog absorbs the other half: the server.json/protocol.json sites now go through config.load_json/save_json with the config.SERVER_FILE/PROTOCOL_FILE constants, and the catalog takes over those call sites when it lands.
#173's verification also confirmed the cli-drift claim above the hard way: applyoptions had never executed once — phantom self.dbus_call plus load_firewall missing its stage argument, both repaired in #173. The -c/-v death on the two-arg create_server_dict calls remains and stays this issue's to fix.