mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Make update containers checkbox required if the dangerzone podman image does not exist
This commit is contained in:
parent
5e0c521293
commit
6bac63fb5c
1 changed files with 7 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import subprocess
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
|
@ -109,6 +110,12 @@ class SettingsWidget(QtWidgets.QWidget):
|
|||
else:
|
||||
self.update_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
# Is update containers required?
|
||||
output = subprocess.check_output(["podman", "image", "ls", "dangerzone"])
|
||||
if b"localhost/dangerzone" not in output:
|
||||
self.update_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
self.update_checkbox.setEnabled(False)
|
||||
|
||||
def update_ui(self):
|
||||
# Either save or open must be checked
|
||||
if (
|
||||
|
|
Loading…
Reference in a new issue