change: return client name from controller

This commit is contained in:
aclist committed 2026-10-21 12:59:54 +09:00
1 parent 07460a1f8f
commit eed40e6f1a
3 files changed
+25 -2

No files matched your search

+5
View File
@@ -541,6 +541,11 @@ class Controller(GObject.GObject):
def update_status(self) -> None:
self.mediator.preconnect.mark_finished()
def get_client_name(self) -> str:
# NOTE: only possible values are "Steam" and "Flatpak"
cmd = self.query_config(Preferences.CLIENT)
return cmd.split()[0].capitalize()
def present_window(self) -> None:
self.mediator.window.present_with_time(Gdk.CURRENT_TIME)
+1 -2
View File
@@ -185,8 +185,7 @@ class ConnectionManager:
allows_downloads = (True, "")
client = self.controller.query_config(Preferences.CLIENT)
# TODO: add test
client_name = client.split()[0].capitalize()
client_name = self.controller.get_client_name()
running = is_steam_running(client)
steam_proc = SteamProcess(client_name, running)
self.client = client