diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2016-05-24 21:41:59 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2016-05-24 21:41:59 +0200 |
commit | 1d2dc97ffac110ee8dca2d3a83deb6953bcfee01 (patch) | |
tree | cfaa9fbebddc34bc9fbf89c6314af05d0a9e332b /mageiaSync/mageiasync.py | |
parent | d4199bcbe8297c00d70cc1c612a41c07e0a88fc9 (diff) | |
download | MageiaSync-1d2dc97ffac110ee8dca2d3a83deb6953bcfee01.tar MageiaSync-1d2dc97ffac110ee8dca2d3a83deb6953bcfee01.tar.gz MageiaSync-1d2dc97ffac110ee8dca2d3a83deb6953bcfee01.tar.bz2 MageiaSync-1d2dc97ffac110ee8dca2d3a83deb6953bcfee01.tar.xz MageiaSync-1d2dc97ffac110ee8dca2d3a83deb6953bcfee01.zip |
After signature checking, show an icon, nothing if not OK
Diffstat (limited to 'mageiaSync/mageiasync.py')
-rw-r--r-- | mageiaSync/mageiasync.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index cc060d9..b67ea52 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -2,7 +2,7 @@ from PyQt5.QtWidgets import ( QProgressDialog, QMainWindow, QDialog, QFileDialog, QApplication) -from PyQt5.QtGui import ( QStandardItemModel,QStandardItem, QDesktopServices, ) +from PyQt5.QtGui import ( QStandardItemModel,QStandardItem, QDesktopServices, QIcon, ) from PyQt5.QtCore import ( QLibraryInfo, QUrl, QItemSelectionModel ) from PyQt5 import QtCore # , Qt, QThread, QObject, pyqtSignal) import sys @@ -259,21 +259,35 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): self.model.setData(self.model.index(row, col, QtCore.QModelIndex()), self.tr("Checking")) def md5Check(self,check): + verified=False if check>=128: val=self.tr("OK") row=check-128 + if row >= 64: + verified=True + row -= 64 else: val=self.tr("Failed") row=check + if verified: + # we add an icon for the GPG key + self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()),QIcon("preflight-verifier"),1) self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()), val) def sha1Check(self,check): + verified=False if check>=128: val=self.tr("OK") row=check-128 + if row >= 64: + verified=True + row -= 64 else: val=self.tr("Failed") row=check + if verified: + # we add an icon for the GPG key + self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()),QIcon("preflight-verifier"),1) self.model.setData(self.model.index(row, 3, QtCore.QModelIndex()), val) def dateCheck(self,check): |