Let a downloaded program be downloaded again

The button disappeared the moment anything landed, and nothing else on
the window asks for that download. So a machine that got the processor
build before its graphics driver was installed can never be given the
Vulkan one, and nobody can pick up a newer whisper.cpp either: both of
those are the same missing control.

It reads "Download again" once a copy is here, and stays hidden while a
system one is on the PATH, because that is the copy that would run.
This commit is contained in:
2026-09-05 09:45:00 +03:00
parent c3bf328eef
commit 00a5283adb
3 changed files with 33 additions and 2 deletions
+10 -2
View File
@@ -349,10 +349,18 @@ class LocalModelBox(QGroupBox):
path = ggml.program_path(self.program)
if not path:
self.program_label.setText(t("Not installed."))
self.install_button.setText(t("Download"))
self.install_button.setVisible(True)
return
self.install_button.setVisible(not ggml.installed_program(self.program)
and not ggml.system_program(self.program))
# A copy that is here is not a copy that is right. whisper.cpp releases
# every few weeks, and a graphics card installed after Dikte was
# changes which build this machine should be running; the button was
# hidden the moment anything landed, and nothing else on this window
# asks for the download again.
self.install_button.setText(t("Download again")
if ggml.installed_program(self.program)
else t("Download"))
self.install_button.setVisible(not ggml.system_program(self.program))
if ggml.system_program(self.program):
# Worth saying which one is running: a distribution package is built
# for this machine and may reach the graphics card, while the