mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Update text on startup dialog
This commit is contained in:
parent
38f7283eed
commit
fcbba61b85
|
@ -334,6 +334,8 @@ class LutrisInitDialog(Gtk.Dialog):
|
|||
|
||||
def show_progress(self):
|
||||
self.progress.set_fraction(self.runtime_updater.percentage_completed())
|
||||
if self.runtime_updater.status_text and self.label.get_text() != self.runtime_updater.status_text:
|
||||
self.label.set_text(self.runtime_updater.status_text)
|
||||
return True
|
||||
|
||||
def init_cb(self, _result, error: Exception):
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import concurrent.futures
|
||||
import os
|
||||
import time
|
||||
from gettext import gettext as _
|
||||
|
||||
from gi.repository import GLib
|
||||
|
||||
|
@ -269,11 +270,13 @@ class RuntimeUpdater:
|
|||
runner_path = os.path.join(settings.RUNNER_DIR, name, "-".join([upstream_runner["version"], upstream_runner["architecture"]]))
|
||||
if system.path_exists(runner_path):
|
||||
continue
|
||||
self.status_text = _(f"Updating {name}")
|
||||
archive_download_path = os.path.join(settings.CACHE_DIR, os.path.basename(upstream_runner["url"]))
|
||||
downloader = Downloader(upstream_runner["url"], archive_download_path)
|
||||
downloader.start()
|
||||
self.downloaders = {"wine": downloader}
|
||||
downloader.join()
|
||||
self.status_text = _(f"Extracting {name}")
|
||||
extract_archive(archive_download_path, runner_path)
|
||||
|
||||
|
||||
|
@ -289,7 +292,9 @@ class RuntimeUpdater:
|
|||
logger.debug("Skipping runtime %s for %s", name, remote_runtime["architecture"])
|
||||
continue
|
||||
runtime = Runtime(remote_runtime["name"], self)
|
||||
self.status_text = _(f"Updating {remote_runtime['name']}")
|
||||
if remote_runtime["url"]:
|
||||
|
||||
downloader = runtime.download(remote_runtime)
|
||||
if downloader:
|
||||
self.downloaders[runtime] = downloader
|
||||
|
|
Loading…
Reference in a new issue