Commit graph

897 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
54a8efb32f
i18n: renamed ukranian translation file 2025-05-29 00:34:56 +02:00
Gustavo Iñiguez Goia
7a3ad173e1
i18n: added ukranian translation 2025-05-29 00:24:50 +02:00
Gustavo Iñiguez Goia
2fbbf12e0a
ui: translations updated 2025-05-28 22:35:00 +02:00
Gustavo Iñiguez Goia
9009eef635
ui: added HighContrast theme icons
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/
2025-05-23 22:30:19 +02:00
Gustavo Iñiguez Goia
3f5b6b45a7
ui: added default terminal icon for popups
By default we try to discover the icon of an app, but if we don't find
any, we'll use a default terminal icon (from HighContrast theme).
2025-05-21 19:10:43 +02:00
Gustavo Iñiguez Goia
913a88ccd6
ui: use HighContrast icons for dark qt-material themes
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.
2025-05-19 01:22:51 +02:00
Jost Alemann
f09ae22c61 ui: remove unused imports 2025-05-18 20:40:39 +02:00
Gustavo Iñiguez Goia
582823d34a
ui: added English language to the preferences
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
2025-05-14 23:24:38 +02:00
Gustavo Iñiguez Goia
8248c2e0ed ui: better app icon discovery
On some DEs like Xfce4 (Ubuntu 24) we were not displaying icons on the
popups.
2025-04-25 17:30:14 +02:00
Gustavo Iñiguez Goia
7ca5c0905f
added network_aliases init file 2025-04-24 16:49:23 +02:00
Gustavo Iñiguez Goia
c8bec89d70
reorganized network aliases feature
- Moved to their own files/dirs.
 - Added Nolan Carouge as author and contributor.
2025-04-24 16:06:11 +02:00
Gustavo Iñiguez Goia
3ef922ef84
ui,fw: improved fw rule dialog buttons layout
Closes: #1330
2025-04-23 14:11:31 +02:00
Gustavo Iñiguez Goia
c8d96d030e
Merge pull request #1324 from petterreinholdtsen/duration-12-hours
Introduce new 12 hour duration option.
2025-04-23 13:13:50 +02:00
Petter Reinholdtsen
dc3d7c7eee Introduce new 12 hour duration option.
Fixes #1286
2025-04-19 00:25:24 +02:00
Self Denial
f69d64d067
ui,stats: handle dict-wrapped notifs in callback
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.
2025-04-16 00:19:45 -06:00
Gustavo Iñiguez Goia
1b17fe246e
ui: better errors when saving the preferences
Don't overwrite errors if any, to avoid shadowing possible problems.
2025-04-15 12:12:56 +02:00
Tim
fc7b4243ad
Update i18n ru_RU 2025-04-03 15:25:51 +02:00
Gustavo Iñiguez Goia
9d5d53d07f
ui,stats: improved rules selection
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
Use the Time column to select rows when in detail view, and the Name
column when listing app rules.
2025-04-01 11:57:33 +02:00
Gustavo Iñiguez Goia
320ec18b31
ui: improved rows selection (4)
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.
2025-03-31 14:51:12 +02:00
Gustavo Iñiguez Goia
fe715a5cf1
ui: fixed crash selecting rows on old PyQt versions
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.
2025-03-30 19:21:20 +02:00
Gustavo Iñiguez Goia
e6bd14e816 ui,stats: fixed copying selected rows 2025-03-30 19:06:35 +02:00
Gustavo Iñiguez Goia
b2f2e44b8a
ui: improved diplaying default icons
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.
2025-03-29 17:05:34 +01:00
Gustavo Iñiguez Goia
f2eb3fab13 ui: fixed selecting rows when in detail view
When the user double clicked on a rule to view the details, we were not
using the correct column to track selections.
2025-03-27 23:56:27 +01:00
Gustavo Iñiguez Goia
b276d36786
ui: fixed deleting rules with DEL key
Adapted to the latest changes.
2025-03-26 00:13:16 +01:00
Gustavo Iñiguez Goia
a3d75476ac
Merge pull request #1298 from atriwidada/l10n-update
Update Indonesian translation
2025-03-21 13:11:26 +01:00
Gustavo Iñiguez Goia
5e91442dfc
ui: display highlighted text properly
when the cells of a table are customized.
2025-03-21 11:15:22 +01:00
Gustavo Iñiguez Goia
7db4c9a9aa
ui: added needed import to highlight rows 2025-03-21 10:13:38 +01:00
Gustavo Iñiguez Goia
12af2c3eb9
ui: fixed displaying highlighted color of cells
When the properties of a cell was customized, the background color of
the highlighted cell was not respected/restored.
2025-03-21 00:43:39 +01:00
Gustavo Iñiguez Goia
f1c8b16281
ui: restore deleted line 2025-03-21 00:04:39 +01:00
Gustavo Iñiguez Goia
0fbbbcca10
ui: improved rows selection (3)
- 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
2025-03-20 23:50:11 +01:00
Andika Triwidada
fcd14bc0e9 Update Indonesian translation 2025-03-20 12:18:35 +00:00
Gustavo Iñiguez Goia
b113ed0960
ui: improved rows selection (2)
- 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
2025-03-19 16:35:05 +01:00
Gustavo Iñiguez Goia
fe7300825a
ui: improved rows selection
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
2025-03-19 00:35:01 +01:00
Gustavo Iñiguez Goia
c3183c2683
ui,popups: removed extra Allow option
Allow option was duplicated in a combobox.

Reported by @tredondo in #1269.
2025-03-04 22:46:46 +01:00
Gustavo Iñiguez Goia
58cb9544e4
ui: popups layuout improvements
- 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.
2025-02-26 21:25:48 +01:00
Gustavo Iñiguez Goia
d46f1562ff
ui:renamed daemon version label for better clarity
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
2025-02-25 13:11:50 +01:00
Gustavo Iñiguez Goia
acf7c653af
ui: replace hardcoded emoji by its code
to avoid rendering issues.
2025-02-24 23:24:13 +01:00
Gustavo Iñiguez Goia
d81374ebc7
ui,popups: fixed dest host regexp
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
2025-02-21 00:28:22 +01:00
Gustavo Iñiguez Goia
8c1da76dff
ui: avoid restart messages when changing node options
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.
2025-02-19 00:04:39 +01:00
Gustavo Iñiguez Goia
5fdb60dccb
ui,prefs: fixed QueueBypass option. 2025-02-18 23:40:56 +01:00
Gustavo Iñiguez Goia
e25d741f76
ui: improved compatibility with python3.8
- Do not use placeholdertext with comboboxes.
 - Do not use removesuffix().
2025-02-18 15:44:51 +01:00
Gustavo Iñiguez Goia
65d6cccd63
ui: perform db updates in the main thread
we may end up with db corruptions otherwise.
2025-02-17 16:49:49 +01:00
Gustavo Iñiguez Goia
4c805331bb
Merge pull request #1266 from MEschenbacher/ui-stats-optimize-format
ui: dialogs: stats: optimize string format
2025-02-14 00:21:59 +01:00
Gustavo Iñiguez Goia
740465a447
ui: improved search in detail views
Allow to filter by more fields.
2025-02-10 00:58:40 +01:00
Gustavo Iñiguez Goia
4afa22c5b5
ui: fixed displaying icons
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.
2025-02-10 00:20:16 +01:00
Maximilian Eschenbacher
4ea11a1ca7
ui: dialogs: stats: optimize string format
This commit does not change behaviour but reduces the multitude text
arguments of format() down to one.

Ref: c5e24c04f1 ("ui,netstat: allow to filter listed connections")
2025-02-07 19:23:31 +01:00
Gustavo Iñiguez Goia
4a37c88db6
ui: fixed typo 2025-02-07 00:02:23 +01:00
Gustavo Iñiguez Goia
b87bc2e826
ui: stop scheduled task on exit
On closing the GUI, stop the schedulded tasks to disable temporal rules.
Otherwise the GUI won't exit until all tasks finish.
2025-02-06 23:51:14 +01:00
Gustavo Iñiguez Goia
1a39122c1d
netstat: dump AF_PACKET sockets from the kernel
We'll try to dump the AF_PACKET sockets from the kernel. If it's not
possible, we'll fallback to read /proc/net/packet.
2025-02-06 01:49:40 +01:00
Gustavo Iñiguez Goia
335f2a783d netstat: allow to list XDP sockets
- daemon: Allow to dump XDP sockets from kernel.
 - ui: Added options to filter by RAW protocol and AF_XDP family.
 - Bumped vishvananda/netlink version to v1.3.0.
 - Updated go.mod and go.sum
2025-02-05 00:05:02 +01:00