ui,prefs: added checksum option to the popup section

Added option to select by default on the pop-ups checksum verification.
This commit is contained in:
Gustavo Iñiguez Goia 2023-11-19 23:12:15 +01:00
parent 4499a5aaf0
commit afe92de45e
Failed to generate hash of commit
3 changed files with 67 additions and 15 deletions

View file

@ -309,6 +309,7 @@ class PreferencesDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
self.dstIPCheck.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_DSTIP))
self.dstPortCheck.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_DSTPORT))
self.uidCheck.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_UID))
self.checkSum.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_CHECKSUM))
# by default, if no configuration exists, enable notifications.
self.groupNotifs.setChecked(self._cfg.getBool(Config.NOTIFICATIONS_ENABLED, True))
@ -611,6 +612,7 @@ class PreferencesDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
self._cfg.setSettings(self._cfg.DEFAULT_POPUP_ADVANCED_DSTIP, bool(self.dstIPCheck.isChecked()))
self._cfg.setSettings(self._cfg.DEFAULT_POPUP_ADVANCED_DSTPORT, bool(self.dstPortCheck.isChecked()))
self._cfg.setSettings(self._cfg.DEFAULT_POPUP_ADVANCED_UID, bool(self.uidCheck.isChecked()))
self._cfg.setSettings(self._cfg.DEFAULT_POPUP_ADVANCED_CHECKSUM, bool(self.checkSum.isChecked()))
self._cfg.setSettings(self._cfg.NOTIFICATIONS_ENABLED, bool(self.groupNotifs.isChecked()))
self._cfg.setSettings(self._cfg.NOTIFICATIONS_TYPE,

View file

@ -449,6 +449,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
self.checkDstIP.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_DSTIP))
self.checkDstPort.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_DSTPORT))
self.checkUserID.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_UID))
self.checkSum.setChecked(self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED_CHECKSUM))
if self._cfg.getBool(self._cfg.DEFAULT_POPUP_ADVANCED):
self.checkAdvanced.toggle()

View file

@ -501,7 +501,7 @@
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,0">
<item>
<widget class="QCheckBox" name="uidCheck">
<property name="sizePolicy">
@ -550,6 +550,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkSum">
<property name="text">
<string>checksum</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
@ -1208,7 +1215,7 @@ Temporary rules will still be valid, and you can use them when prompted to allow
<item row="3" column="0" colspan="3">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
@ -1276,7 +1283,7 @@ Temporary rules will still be valid, and you can use them when prompted to allow
</property>
<property name="icon">
<iconset theme="emblem-important">
<normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</iconset>
<normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</iconset>
</property>
</item>
<item>
@ -1285,7 +1292,7 @@ Temporary rules will still be valid, and you can use them when prompted to allow
</property>
<property name="icon">
<iconset theme="emblem-default">
<normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</iconset>
<normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</normaloff>../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.designer/backup</iconset>
</property>
</item>
</widget>
@ -1629,6 +1636,9 @@ Temporary rules will still be valid, and you can use them when prompted to allow
</layout>
</widget>
<widget class="QWidget" name="page_8">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
@ -1641,17 +1651,7 @@ Temporary rules will still be valid, and you can use them when prompted to allow
<string>Rules</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0">
<widget class="QCheckBox" name="enableChecksums">
<property name="statusTip">
<string>Compute and verify binaries checksums when they try to establish new connections</string>
</property>
<property name="text">
<string>Enable checksums verification</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="9" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -1664,6 +1664,55 @@ Temporary rules will still be valid, and you can use them when prompted to allow
</property>
</spacer>
</item>
<item row="3" column="0">
<layout class="QFormLayout" name="formLayout_3">
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>sha1</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>md5</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enableChecksums">
<property name="statusTip">
<string>Compute and verify binaries checksums when they try to establish new connections</string>
</property>
<property name="text">
<string>Enable checksums verification</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>