mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
change: return client name from controller
This commit is contained in:
1 parent
07460a1f8f
commit
eed40e6f1a
3 files changed
+25
-2
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user