Commit graph

13 commits

Author SHA1 Message Date
Thomas Haller
a2c4f071e4
all: drop /*<skip>*/ annotations for enums
We don't run glib-mkenums for certain sources like "core" and
"libnm-glib-aux".

These annotations have no effect. Drop them.
They also mess with the automated formatting.
2022-02-08 11:14:01 +01:00
Thomas Haller
615221a99c format: reformat source tree with clang-format 13.0
We use clang-format for automatic formatting of our source files.
Since clang-format is actively maintained software, the actual
formatting depends on the used version of clang-format. That is
unfortunate and painful, but really unavoidable unless clang-format
would be strictly bug-compatible.

So the version that we must use is from the current Fedora release, which
is also tested by our gitlab-ci. Previously, we were using Fedora 34 with
clang-tools-extra-12.0.1-1.fc34.x86_64.

As Fedora 35 comes along, we need to update our formatting as Fedora 35
comes with version "13.0.0~rc1-1.fc35".
An alternative would be to freeze on version 12, but that has different
problems (like, it's cumbersome to rebuild clang 12 on Fedora 35 and it
would be cumbersome for our developers which are on Fedora 35 to use a
clang that they cannot easily install).

The (differently painful) solution is to reformat from time to time, as we
switch to a new Fedora (and thus clang) version.
Usually we would expect that such a reformatting brings minor changes.
But this time, the changes are huge. That is mentioned in the release
notes [1] as

  Makes PointerAligment: Right working with AlignConsecutiveDeclarations. (Fixes https://llvm.org/PR27353)

[1] https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2021-11-29 09:31:09 +00:00
Thomas Haller
e2bd2f3f91
tui: fix order of includes in "nmt-page-bond-port.c"
Headers should be included in a particular order. See the CONTRIBUTING
file.
2021-08-26 23:05:12 +02:00
Gris Ge
9958510f28
bond: add support of queue_id of bond port
Introduced `NMSettingBondPort` to hold the new setting class with single
property `NM_SETTING_BOND_PORT_QUEUE_ID`.

For dbus interface, please use `bond-port` as setting name and
`queue-id` as property name.

Unit test cases for ifcfg reader and writer included.

Signed-off-by: Gris Ge <fge@redhat.com>

https://bugzilla.redhat.com/show_bug.cgi?id=1949127

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/952
2021-08-26 23:04:31 +02:00
Thomas Haller
650922eeaa
tui: fix order of includes 2021-08-20 22:16:36 +02:00
Gris Ge
e69c5e4bab
libnm: Use _nm_connection_ensure_setting()
Use `_nm_connection_ensure_setting()` to eliminate the
duplicated codes. This function will retrieve the specific setting from
connection, if not found, create new one and attach to the connection.

Signed-off-by: Gris Ge <fge@redhat.com>
2021-08-20 19:02:23 +02:00
Thomas Haller
ea49b50651
all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
Javier Sánchez Parra
b0f5b1d97a
tui: add WireGuard support to nmtui
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/736
2021-08-17 14:10:12 +02:00
Thomas Haller
f57679dd93
all: use nm_g_idle_add() instead of g_idle_add()
g_idle_add() is discouraged, because we shouldn't use guint source
IDs.
2021-07-26 15:30:09 +02:00
Thomas Haller
4e109bacab
clang-format: use "IndentPPDirectives:None" instead of "BeforeHash"
Subjectively, I think this looks better.
2021-07-09 08:49:06 +02:00
Thomas Haller
463db1c7a6
tui: use internal _nm_utils_ip4_prefix_to_netmask() helper
nm_utils_ip4_prefix_to_netmask() is public API of libnm.
As we also want to have this function at a few places where
we don't have libnm, we have an internal variant
_nm_utils_ip4_prefix_to_netmask().

Use the internal variant consistently and everywhere.
2021-05-11 13:56:48 +02:00
Andrew Zaborowski
f0fe7384e1
all: Replace deprecated NM_CONNECTION_SERIALIZE_* flags
Review and replace usages of the two nm_connection_to_dbus() flags
marked deprecated in commit 84648e562c98 ('libnm: Refactor
NM_CONNECTION_SERIALIZE_* flags'):

NM_CONNECTION_SERIALIZE_NO_SECRETS and
NM_CONNECTION_SERIALIZE_ONLY_SECRETS.
2021-04-01 17:19:15 +02:00
Thomas Haller
d8dd6e94e6
tui: move from "clients/tui/" to "src/nmtui/" 2021-03-15 17:10:54 +01:00