mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
ui: improved compatibility with python3.8
- Do not use placeholdertext with comboboxes. - Do not use removesuffix().
This commit is contained in:
parent
65d6cccd63
commit
e25d741f76
2 changed files with 8 additions and 11 deletions
|
@ -474,15 +474,15 @@ class PreferencesDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
|||
fwOptions = node_config.get('FwOptions')
|
||||
if fwOptions == None:
|
||||
fwOptions = {}
|
||||
if fwOptions.get('MonitorInterval') == None:
|
||||
fwOptions['MonitorInterval'] = "15"
|
||||
if fwOptions.get('MonitorInterval') == None or fwOptions.get('MonitorInterval') == "":
|
||||
fwOptions['MonitorInterval'] = "15s"
|
||||
if fwOptions.get('QueueBypass') == None:
|
||||
fwOptions['QueueBypass'] = True
|
||||
node_config['FwOptions'] = fwOptions
|
||||
|
||||
monInterval = fwOptions['MonitorInterval'].removesuffix("s")
|
||||
self.checkNodeBypassQueue.setChecked(fwOptions.get('QueueBypass'))
|
||||
monInterval = fwOptions['MonitorInterval'][:-1]
|
||||
self.lineNodeFwMonInterval.setText(monInterval)
|
||||
self.checkNodeBypassQueue.setChecked(fwOptions.get('QueueBypass'))
|
||||
|
||||
stats = node_config.get('Stats')
|
||||
if stats == None:
|
||||
|
|
|
@ -826,9 +826,6 @@ wayland</string>
|
|||
<property name="currentText">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -866,8 +863,8 @@ wayland</string>
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>599</width>
|
||||
<height>323</height>
|
||||
<width>318</width>
|
||||
<height>207</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
|
@ -1120,8 +1117,8 @@ or a network socket: 127.0.0.1:50051</string>
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>599</width>
|
||||
<height>323</height>
|
||||
<width>321</width>
|
||||
<height>136</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
|
|
Loading…
Add table
Reference in a new issue