When the daemon connects to the GUI, the firewall dialog is configured
based on the system firewall configuration (inbound/outbpund policies).
Due to an error, a fw-change notification was being triggered, causing
unnecessary firewall rules reloads.
Allow to use commas to specify multiple data:
- src/dst ip: 1.2.3.4, 5.6.7.8
- dst host: www.a-b-c.org, www.abcd.org
- proto: tcp, udp
- net ifaces: eth0, eth1
- src/dst port: 123, 456
The data will be translated to ^(..|..|..)$ when saving the rule, and
back to "..,..,.." when loading it.
Closes: #1392.
Previously when cloning a rule, we added "clone-{num}-" to the rule.
Depending on the number of rules, the cloned rule might not appear next
to the original.
Now we append "-duplicated-{num}" to the end of the rule name, on the one
hand to make the new rule appear close to the cloned one, and on the other
hand, to be consistent with the menu item that triggers this action.
Closes: #1363.
- In some distros, qt-material icons have stopped loading at startup:
qt.svg: Cannot open file '.../icon:/primary/slider.svg'
The cause of the error is still unknown, but this fix solves it
for now.
- Themes() class moved to its own file.
Closes: #1373.
The HighContrast theme is part of the gnome-themes-standard [0] package
, which is not always available.
Instead of just setting the theme by code, now we distribute the icons.
This ensures that the icons are always clearly visible when using a
qt-material dark theme.
For qt-material light themes and system themes, we'll use the system
icons.
[0] https://download.gnome.org/sources/gnome-themes-standard/
By default we use the system icons theme in the GUI.
The Desktop Environment usually is responsible of switching between
dark and light styles.
However if the user selected a qt-material dark theme from the
Preferences, the icons were not updated, and sometimes they were
practically invisible.
Now if the user selects a qt-material dark theme, we set the
HighContrast icon theme, which ensures that all icons are visible
against dark backgrounds.
Allow to select English language from the Preferences.
This is a static entry like "System default".
It will not load a QTranslator object, so the GUI will use the strings
defined in the code, which are in English.
Closes: #1342
Modify the `_cb_notification_callback` method to properly process notifications that are wrapped in a dictionary to ensure consistent handling regardless of how they're sent from different
parts of the codebase.
discard current selection:
- if the user right clicked on a row not part of a selection.
- if the user clicked on a row, and there's only one row selected.
- if the user clicked on a row already selected.
In PyQt < 5.15 isRowSelected() requires two arguments (row and parent).
Since 5.15, the parent argument is optional, and the default value is an
empty QModelIndex().
In order to support old PyQt versions (Ubuntu 20.x), we add always
the second argument.
- Misc: headers reorganization.
In some DEs, like Enlightenment, some builtins icons may be empty.
The icon is not Null, but there're no available sizes, and the
pixmap is empty.
For now we'll use SP_FileIcon as the default icon, which exists
in this scenario, but we should create a new default icon, and
distribute it with the GUI.