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.
- Pressing the Space key on a view paginates the view forward.
- Apply rule actions both to visible selections (the ones the user
sees), and non-visible selections (those out of the viewport).
- Right clicking on a selection does not discard the selection.
- Left clicking on a selection discards the selection and selects the
clicked row.
- Left clicking on a selected row selects/deselects the row.
ref: #1291
- Fixed the use of Ctrl + mouse dragging to select/deselect rows of
an existing selection.
- Misc: fixed var name, removed unused code, avoid adding non valid
rows to the selection.
ref: #1291
Previously while scrolling, only one row remained selected, and using
the mouse to select rows didn't work.
Now:
- All selected rows remain selected while scrolling.
- The mouse can be used to select rows.
Previous functionality has not chaged:
- Selecting a row toggles the selection.
- ESC discard the selection.
- CTRL + key up/down or click selects/deselects rows.
- CTRL+c copies selected rows to the clipboard.
ref: #1291
- Convert remote syslog to remote. There's no real difference between
both, and the code was the same.
Maybe we could limit the logging formats allowed.
- Remote logger: Added option to reopen the connection after n errors
trying to send messages.
tested on several distros with different kernels, as well as in a
private fork and this test doesn't fail.
So until we figure out why it's failing here, let's skip it for now.
- Fixed issue when configuring several loggers.
- Remote logger:
- open as many connections with the remote server as
specified in the Workers field.
- open and handle every connection in each own goroutine.
- get rid of the locks.
- Moved Info message to Trace.
- When applying a default action on a connection (because the daemon is
not connected to the GUI), log the connection details. It eases the
task of creating rules without a GUI.
- Removed hardcoded sizes for buttons.
- Buttons horizontal layout adjusted to properly show the countdown
(#1274).
Note:
'Maximum' vertical policy does not seem to work with qt-material
and QToolButton, the button height is resized to 0. 'Preferred' seems
to work as expected.
The GUI and daemon versions are displayed in 2 different locations:
- ui: in the title of the main window.
- daemon: in the lower right corner.
Now instead of showing the daemon version as "Version: x.y.z", we
show "Daemon version: x.y.z".
Closes: #1278
We were not matching the end of the domain, which could lead to allow
more domains than expected.
kudos to @FWDekker for reporting this issue.
Closes: #1264
When saving the preferences, we check if the user changed the address of
the node. Usually the current node address is the same than the one
loaded, but some gRPC versions does not report it, so we use
"unix:/local" as the address of the node.
As this address is different than the one configured, we were displaying
unnecessary restart messages to the users.
- Minimize the risk of race conditions when we're prompting the user to
allow/deny a connection, while we're still reading proc's environ file.
(this was actually a leak).
- Preallocate the Env map with the expected environ vars.
Some use cases:
- Reject connections initiated by certain paths:
Deny all connections initiated by cron*:
/usr/sbin/cron
/usr/bin/curl
"action": "reject",
"operator: {
"type": "list",
"operand": "list",
"data": "",
"list": [
{
"type": "regexp",
"operand": "process.parent.path",
// /usr/bin/crond , /usr/bin/crontab, ...
"data": "^/usr/(s|)bin/cron"
}
]
}
- Reject or Allow connections of binaries launched by another app:
"action": "allow",
"operator": {
"type": "list",
"operand": "list",
"data": "",
"list": [
{
"type": "simple",
"operand": "process.parent.path",
"data": "/opt/spotify/bin/spotify"
},
{
"type": "simple",
"operand": "process.path",
"data": "/usr/bin/wget"
}
]
}
You can also combine multiple parent paths, to allow a command launched
from a specific chain of processes:
/usr/lib/systemd/systemd
/usr/sbin/cron
/bin/sh
/usr/bin/curl
The order is checked from the newest process to the oldest (curl -> sh
-> cron -> systemd)
The operand can be used with any of the existing types (simple, regexp,
etc).
Related: #406
In some distros like Ubuntu 25, we were not displaying the fw button
icon, which made the button practically hidden to the user.
We assumed that if 'document-new' or 'emblem' icons were available,
the rest of the icons would be available as well, so we wouldn't need
to fallback to Qt's builtin icons.
However on Ubuntu 25 for example, despite of 'document-new' being
available, the icon 'security-high' was not being displayed when it was
loaded from the stats.ui file.
Loading it from code with QIcon.fromTheme() works fine, and even if
it's not found (which sometimes happens), we'd fallback to Qt's builtin
icons.
Other icons may be optional, but icons without text need to have an
icon always.
- minor formatting change.
- removed unused code.